diff --git a/.repo-metadata-full.json b/.repo-metadata-full.json
index 49b3491111d7..2f186cb19587 100644
--- a/.repo-metadata-full.json
+++ b/.repo-metadata-full.json
@@ -946,7 +946,7 @@
"Notebooks": {
"language": "php",
"distribution_name": "google/cloud-notebooks",
- "release_level": "preview",
+ "release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/cloud-notebooks/latest",
"library_type": "GAPIC_AUTO",
"api_shortname": "notebooks"
diff --git a/Notebooks/.OwlBot.yaml b/Notebooks/.OwlBot.yaml
index 2d69b69eeaf2..00c8349f0880 100644
--- a/Notebooks/.OwlBot.yaml
+++ b/Notebooks/.OwlBot.yaml
@@ -1,4 +1,4 @@
deep-copy-regex:
- - source: /google/cloud/notebooks/(v1|v1beta1|v2)/.*-php/(.*)
+ - source: /google/cloud/notebooks/(v2|v1)/.*-php/(.*)
dest: /owl-bot-staging/Notebooks/$1/$2
api-name: Notebooks
diff --git a/Notebooks/README.md b/Notebooks/README.md
index a8cd01275c58..6439f55bb670 100644
--- a/Notebooks/README.md
+++ b/Notebooks/README.md
@@ -30,9 +30,8 @@ on authenticating your client. Once authenticated, you'll be ready to start maki
### Version
-This component is considered beta. As such, it should be expected to be mostly
-stable and we're working towards a release candidate. We will address issues
-and requests with a higher priority.
+This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in
+any minor or patch releases. We will address issues and requests with the highest priority.
### Next Steps
diff --git a/Notebooks/metadata/V1Beta1/Environment.php b/Notebooks/metadata/V1Beta1/Environment.php
deleted file mode 100644
index ea3e0767c410..000000000000
Binary files a/Notebooks/metadata/V1Beta1/Environment.php and /dev/null differ
diff --git a/Notebooks/metadata/V1Beta1/Instance.php b/Notebooks/metadata/V1Beta1/Instance.php
deleted file mode 100644
index 1e3214032d01..000000000000
Binary files a/Notebooks/metadata/V1Beta1/Instance.php and /dev/null differ
diff --git a/Notebooks/metadata/V1Beta1/Service.php b/Notebooks/metadata/V1Beta1/Service.php
deleted file mode 100644
index 388980ecae6b..000000000000
--- a/Notebooks/metadata/V1Beta1/Service.php
+++ /dev/null
@@ -1,153 +0,0 @@
-internalAddGeneratedFile(
- '
-6
-,google/cloud/notebooks/v1beta1/service.protogoogle.cloud.notebooks.v1beta1google/api/client.protogoogle/api/field_behavior.proto0google/cloud/notebooks/v1beta1/environment.proto-google/cloud/notebooks/v1beta1/instance.proto#google/longrunning/operations.protogoogle/protobuf/timestamp.proto"
-OperationMetadata/
-create_time (2.google.protobuf.Timestamp,
-end_time (2.google.protobuf.Timestamp
-target (
-verb (
-status_message (
-requested_cancellation (
-api_version (
-endpoint ( "R
-ListInstancesRequest
-parent ( BA
- page_size (
-
-page_token ( "
-ListInstancesResponse;
- instances (2(.google.cloud.notebooks.v1beta1.Instance
-next_page_token (
-unreachable ( "\'
-GetInstanceRequest
-name ( BA"
-CreateInstanceRequest
-parent ( BA
-instance_id ( BA?
-instance (2(.google.cloud.notebooks.v1beta1.InstanceBA"H
-RegisterInstanceRequest
-parent ( BA
-instance_id ( BA"
-SetInstanceAcceleratorRequest
-name ( BAK
-type (28.google.cloud.notebooks.v1beta1.Instance.AcceleratorTypeBA
-
-core_count (BA"M
-SetInstanceMachineTypeRequest
-name ( BA
-machine_type ( BA"
-SetInstanceLabelsRequest
-name ( BAT
-labels (2D.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest.LabelsEntry-
-LabelsEntry
-key (
-value ( :8"*
-DeleteInstanceRequest
-name ( BA")
-StartInstanceRequest
-name ( BA"(
-StopInstanceRequest
-name ( BA")
-ResetInstanceRequest
-name ( BA"
-ReportInstanceInfoRequest
-name ( BA
-vm_id ( BAY
-metadata (2G.google.cloud.notebooks.v1beta1.ReportInstanceInfoRequest.MetadataEntry/
-
MetadataEntry
-key (
-value ( :8">
-IsInstanceUpgradeableRequest
-notebook_instance ( BA"z
-IsInstanceUpgradeableResponse
-upgradeable (
-upgrade_version (
-upgrade_info (
-
upgrade_image ( "+
-UpgradeInstanceRequest
-name ( BA"G
-UpgradeInstanceInternalRequest
-name ( BA
-vm_id ( BA"U
-ListEnvironmentsRequest
-parent ( BA
- page_size (
-
-page_token ( "
-ListEnvironmentsResponseA
-environments (2+.google.cloud.notebooks.v1beta1.Environment
-next_page_token (
-unreachable ( "*
-GetEnvironmentRequest
-name ( BA"
-CreateEnvironmentRequest
-parent ( BA
-environment_id ( BAE
-environment (2+.google.cloud.notebooks.v1beta1.EnvironmentBA"-
-DeleteEnvironmentRequest
-name ( BA2
-NotebookService
-
ListInstances4.google.cloud.notebooks.v1beta1.ListInstancesRequest5.google.cloud.notebooks.v1beta1.ListInstancesResponse":42/v1beta1/{parent=projects/*/locations/*}/instances
-GetInstance2.google.cloud.notebooks.v1beta1.GetInstanceRequest(.google.cloud.notebooks.v1beta1.Instance":42/v1beta1/{name=projects/*/locations/*/instances/*}
-CreateInstance5.google.cloud.notebooks.v1beta1.CreateInstanceRequest.google.longrunning.Operation"dA
-InstanceOperationMetadata>"2/v1beta1/{parent=projects/*/locations/*}/instances:instance
-RegisterInstance7.google.cloud.notebooks.v1beta1.RegisterInstanceRequest.google.longrunning.Operation"fA
-InstanceOperationMetadata@";/v1beta1/{parent=projects/*/locations/*}/instances:register:*
-SetInstanceAccelerator=.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest.google.longrunning.Operation"lA
-InstanceOperationMetadataF2A/v1beta1/{name=projects/*/locations/*/instances/*}:setAccelerator:*
-SetInstanceMachineType=.google.cloud.notebooks.v1beta1.SetInstanceMachineTypeRequest.google.longrunning.Operation"lA
-InstanceOperationMetadataF2A/v1beta1/{name=projects/*/locations/*/instances/*}:setMachineType:*
-SetInstanceLabels8.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest.google.longrunning.Operation"gA
-InstanceOperationMetadataA2"9/v1beta1/{name=projects/*/locations/*/instances/*}:report:*
-IsInstanceUpgradeable<.google.cloud.notebooks.v1beta1.IsInstanceUpgradeableRequest=.google.cloud.notebooks.v1beta1.IsInstanceUpgradeableResponse"XOM/v1beta1/{notebook_instance=projects/*/locations/*/instances/*}:isUpgradeable
-UpgradeInstance6.google.cloud.notebooks.v1beta1.UpgradeInstanceRequest.google.longrunning.Operation"hA
-InstanceOperationMetadata?":/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade:*
-UpgradeInstanceInternal>.google.cloud.notebooks.v1beta1.UpgradeInstanceInternalRequest.google.longrunning.Operation"pA
-InstanceOperationMetadataG"B/v1beta1/{name=projects/*/locations/*/instances/*}:upgradeInternal:*
-ListEnvironments7.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest8.google.cloud.notebooks.v1beta1.ListEnvironmentsResponse"=75/v1beta1/{parent=projects/*/locations/*}/environments
-GetEnvironment5.google.cloud.notebooks.v1beta1.GetEnvironmentRequest+.google.cloud.notebooks.v1beta1.Environment"=75/v1beta1/{name=projects/*/locations/*/environments/*}
-CreateEnvironment8.google.cloud.notebooks.v1beta1.CreateEnvironmentRequest.google.longrunning.Operation"mA
-EnvironmentOperationMetadataD"5/v1beta1/{parent=projects/*/locations/*}/environments:environment
-DeleteEnvironment8.google.cloud.notebooks.v1beta1.DeleteEnvironmentRequest.google.longrunning.Operation"jA*
-google.protobuf.EmptyOperationMetadata7*5/v1beta1/{name=projects/*/locations/*/environments/*}LAnotebooks.googleapis.comA.https://www.googleapis.com/auth/cloud-platformB
-"com.google.cloud.notebooks.v1beta1BNotebooksProtoPZ@cloud.google.com/go/notebooks/apiv1beta1/notebookspb;notebookspbGoogle.Cloud.Notebooks.V1Beta1Google\\Cloud\\Notebooks\\V1beta1!Google::Cloud::Notebooks::V1beta1bproto3'
- , true);
-
- static::$is_initialized = true;
- }
-}
-
diff --git a/Notebooks/owlbot.py b/Notebooks/owlbot.py
index 8505efd3a495..527e42784e37 100644
--- a/Notebooks/owlbot.py
+++ b/Notebooks/owlbot.py
@@ -1,4 +1,4 @@
-# Copyright 2021 Google LLC
+# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -32,34 +32,25 @@
php.owlbot_main(src=src, dest=dest)
-# Change the wording for the deprecation warning.
+# remove class_alias code
s.replace(
- 'src/*/*_*.php',
- r'will be removed in the next major release',
- 'will be removed in a future release')
-
-### [START] protoc backwards compatibility fixes
-
-# roll back to private properties.
-s.replace(
- "src/**/V*/**/*.php",
- r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
- r"""Generated from protobuf field \1
- */
- private $""")
-
-# Replace "Unwrapped" with "Value" for method names.
-s.replace(
- "src/**/V*/**/*.php",
- r"public function ([s|g]\w{3,})Unwrapped",
- r"public function \1Value"
-)
-
-### [END] protoc backwards compatibility fixes
-
-# fix relative cloud.google.com links
-s.replace(
- "src/**/V*/**/*.php",
- r"(.{0,})\]\((/.{0,})\)",
- r"\1](https://cloud.google.com\2)"
-)
+ "src/V*/**/*.php",
+ r"^// Adding a class alias for backwards compatibility with the previous class name.$"
+ + "\n"
+ + r"^class_alias\(.*\);$"
+ + "\n",
+ '')
+
+# format generated clients
+subprocess.run([
+ 'npm',
+ 'exec',
+ '--yes',
+ '--package=@prettier/plugin-php@^0.16',
+ '--',
+ 'prettier',
+ '**/Client/*',
+ '--write',
+ '--parser=php',
+ '--single-quote',
+ '--print-width=120'])
diff --git a/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php b/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php
index 0d057decf7c4..f373975d269a 100644
--- a/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php
+++ b/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php
@@ -1,6 +1,6 @@
descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
+ $options = isset($this->descriptors[$methodName]['longRunning'])
+ ? $this->descriptors[$methodName]['longRunning']
+ : [];
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
$operation->reload();
return $operation;
@@ -477,8 +477,10 @@ public function listRuntimes(ListRuntimesRequest $request, array $callOptions =
*
* @throws ApiException Thrown if the API call fails.
*/
- public function refreshRuntimeTokenInternal(RefreshRuntimeTokenInternalRequest $request, array $callOptions = []): RefreshRuntimeTokenInternalResponse
- {
+ public function refreshRuntimeTokenInternal(
+ RefreshRuntimeTokenInternalRequest $request,
+ array $callOptions = []
+ ): RefreshRuntimeTokenInternalResponse {
return $this->startApiCall('RefreshRuntimeTokenInternal', $request, $callOptions)->wait();
}
@@ -811,8 +813,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions =
*
* @throws ApiException Thrown if the API call fails.
*/
- public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse
- {
+ public function testIamPermissions(
+ TestIamPermissionsRequest $request,
+ array $callOptions = []
+ ): TestIamPermissionsResponse {
return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait();
}
}
diff --git a/Notebooks/src/V1/Client/NotebookServiceClient.php b/Notebooks/src/V1/Client/NotebookServiceClient.php
index f72636b4b742..744311d10c83 100644
--- a/Notebooks/src/V1/Client/NotebookServiceClient.php
+++ b/Notebooks/src/V1/Client/NotebookServiceClient.php
@@ -1,6 +1,6 @@
descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
+ $options = isset($this->descriptors[$methodName]['longRunning'])
+ ? $this->descriptors[$methodName]['longRunning']
+ : [];
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
$operation->reload();
return $operation;
@@ -760,8 +760,10 @@ public function getInstance(GetInstanceRequest $request, array $callOptions = []
*
* @throws ApiException Thrown if the API call fails.
*/
- public function getInstanceHealth(GetInstanceHealthRequest $request, array $callOptions = []): GetInstanceHealthResponse
- {
+ public function getInstanceHealth(
+ GetInstanceHealthRequest $request,
+ array $callOptions = []
+ ): GetInstanceHealthResponse {
return $this->startApiCall('GetInstanceHealth', $request, $callOptions)->wait();
}
@@ -813,8 +815,10 @@ public function getSchedule(GetScheduleRequest $request, array $callOptions = []
*
* @throws ApiException Thrown if the API call fails.
*/
- public function isInstanceUpgradeable(IsInstanceUpgradeableRequest $request, array $callOptions = []): IsInstanceUpgradeableResponse
- {
+ public function isInstanceUpgradeable(
+ IsInstanceUpgradeableRequest $request,
+ array $callOptions = []
+ ): IsInstanceUpgradeableResponse {
return $this->startApiCall('IsInstanceUpgradeable', $request, $callOptions)->wait();
}
@@ -1054,8 +1058,10 @@ public function rollbackInstance(RollbackInstanceRequest $request, array $callOp
*
* @throws ApiException Thrown if the API call fails.
*/
- public function setInstanceAccelerator(SetInstanceAcceleratorRequest $request, array $callOptions = []): OperationResponse
- {
+ public function setInstanceAccelerator(
+ SetInstanceAcceleratorRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
return $this->startApiCall('SetInstanceAccelerator', $request, $callOptions)->wait();
}
@@ -1107,8 +1113,10 @@ public function setInstanceLabels(SetInstanceLabelsRequest $request, array $call
*
* @throws ApiException Thrown if the API call fails.
*/
- public function setInstanceMachineType(SetInstanceMachineTypeRequest $request, array $callOptions = []): OperationResponse
- {
+ public function setInstanceMachineType(
+ SetInstanceMachineTypeRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
return $this->startApiCall('SetInstanceMachineType', $request, $callOptions)->wait();
}
@@ -1211,8 +1219,10 @@ public function triggerSchedule(TriggerScheduleRequest $request, array $callOpti
*
* @throws ApiException Thrown if the API call fails.
*/
- public function updateInstanceConfig(UpdateInstanceConfigRequest $request, array $callOptions = []): OperationResponse
- {
+ public function updateInstanceConfig(
+ UpdateInstanceConfigRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
return $this->startApiCall('UpdateInstanceConfig', $request, $callOptions)->wait();
}
@@ -1238,8 +1248,10 @@ public function updateInstanceConfig(UpdateInstanceConfigRequest $request, array
*
* @throws ApiException Thrown if the API call fails.
*/
- public function updateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest $request, array $callOptions = []): UpdateInstanceMetadataItemsResponse
- {
+ public function updateInstanceMetadataItems(
+ UpdateInstanceMetadataItemsRequest $request,
+ array $callOptions = []
+ ): UpdateInstanceMetadataItemsResponse {
return $this->startApiCall('UpdateInstanceMetadataItems', $request, $callOptions)->wait();
}
@@ -1265,8 +1277,10 @@ public function updateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest $
*
* @throws ApiException Thrown if the API call fails.
*/
- public function updateShieldedInstanceConfig(UpdateShieldedInstanceConfigRequest $request, array $callOptions = []): OperationResponse
- {
+ public function updateShieldedInstanceConfig(
+ UpdateShieldedInstanceConfigRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
return $this->startApiCall('UpdateShieldedInstanceConfig', $request, $callOptions)->wait();
}
@@ -1319,8 +1333,10 @@ public function upgradeInstance(UpgradeInstanceRequest $request, array $callOpti
*
* @throws ApiException Thrown if the API call fails.
*/
- public function upgradeInstanceInternal(UpgradeInstanceInternalRequest $request, array $callOptions = []): OperationResponse
- {
+ public function upgradeInstanceInternal(
+ UpgradeInstanceInternalRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
return $this->startApiCall('UpgradeInstanceInternal', $request, $callOptions)->wait();
}
@@ -1460,8 +1476,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions =
*
* @throws ApiException Thrown if the API call fails.
*/
- public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse
- {
+ public function testIamPermissions(
+ TestIamPermissionsRequest $request,
+ array $callOptions = []
+ ): TestIamPermissionsResponse {
return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait();
}
}
diff --git a/Notebooks/src/V1/ContainerImage.php b/Notebooks/src/V1/ContainerImage.php
index a0a191dda14c..e5e167882f71 100644
--- a/Notebooks/src/V1/ContainerImage.php
+++ b/Notebooks/src/V1/ContainerImage.php
@@ -22,14 +22,14 @@ class ContainerImage extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $repository = '';
+ protected $repository = '';
/**
* The tag of the container image. If not specified, this defaults
* to the latest tag.
*
* Generated from protobuf field string tag = 2;
*/
- private $tag = '';
+ protected $tag = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/CreateEnvironmentRequest.php b/Notebooks/src/V1/CreateEnvironmentRequest.php
index 211ea5559fb1..ec9ffc493c20 100644
--- a/Notebooks/src/V1/CreateEnvironmentRequest.php
+++ b/Notebooks/src/V1/CreateEnvironmentRequest.php
@@ -20,7 +20,7 @@ class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. User-defined unique ID of this environment. The `environment_id` must
* be 1 to 63 characters long and contain only lowercase letters,
@@ -29,13 +29,13 @@ class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $environment_id = '';
+ protected $environment_id = '';
/**
* Required. The environment to be created.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $environment = null;
+ protected $environment = null;
/**
* @param string $parent Required. Format: `projects/{project_id}/locations/{location}`
diff --git a/Notebooks/src/V1/CreateExecutionRequest.php b/Notebooks/src/V1/CreateExecutionRequest.php
index 16165b453b06..1a9830086a8e 100644
--- a/Notebooks/src/V1/CreateExecutionRequest.php
+++ b/Notebooks/src/V1/CreateExecutionRequest.php
@@ -21,19 +21,19 @@ class CreateExecutionRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. User-defined unique ID of this execution.
*
* Generated from protobuf field string execution_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $execution_id = '';
+ protected $execution_id = '';
/**
* Required. The execution to be created.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $execution = null;
+ protected $execution = null;
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/CreateInstanceRequest.php b/Notebooks/src/V1/CreateInstanceRequest.php
index 07ef4667cfaa..939cf437387c 100644
--- a/Notebooks/src/V1/CreateInstanceRequest.php
+++ b/Notebooks/src/V1/CreateInstanceRequest.php
@@ -21,19 +21,19 @@ class CreateInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. User-defined unique ID of this instance.
*
* Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $instance_id = '';
+ protected $instance_id = '';
/**
* Required. The instance to be created.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $instance = null;
+ protected $instance = null;
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/CreateRuntimeRequest.php b/Notebooks/src/V1/CreateRuntimeRequest.php
index c06e131f6740..e243650c684a 100644
--- a/Notebooks/src/V1/CreateRuntimeRequest.php
+++ b/Notebooks/src/V1/CreateRuntimeRequest.php
@@ -21,25 +21,25 @@ class CreateRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. User-defined unique ID of this Runtime.
*
* Generated from protobuf field string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $runtime_id = '';
+ protected $runtime_id = '';
/**
* Required. The Runtime to be created.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $runtime = null;
+ protected $runtime = null;
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 4;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/CreateScheduleRequest.php b/Notebooks/src/V1/CreateScheduleRequest.php
index 76f5e8286a68..888985827ce4 100644
--- a/Notebooks/src/V1/CreateScheduleRequest.php
+++ b/Notebooks/src/V1/CreateScheduleRequest.php
@@ -21,19 +21,19 @@ class CreateScheduleRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. User-defined unique ID of this schedule.
*
* Generated from protobuf field string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $schedule_id = '';
+ protected $schedule_id = '';
/**
* Required. The schedule to be created.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $schedule = null;
+ protected $schedule = null;
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/DeleteEnvironmentRequest.php b/Notebooks/src/V1/DeleteEnvironmentRequest.php
index 5662061e52a9..5e6b4395d2c5 100644
--- a/Notebooks/src/V1/DeleteEnvironmentRequest.php
+++ b/Notebooks/src/V1/DeleteEnvironmentRequest.php
@@ -21,7 +21,7 @@ class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/DeleteExecutionRequest.php b/Notebooks/src/V1/DeleteExecutionRequest.php
index 6cb3ee758db0..6435f7ee1ac0 100644
--- a/Notebooks/src/V1/DeleteExecutionRequest.php
+++ b/Notebooks/src/V1/DeleteExecutionRequest.php
@@ -21,7 +21,7 @@ class DeleteExecutionRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/DeleteInstanceRequest.php b/Notebooks/src/V1/DeleteInstanceRequest.php
index 8cbe9bf3aec2..0cfd481b0578 100644
--- a/Notebooks/src/V1/DeleteInstanceRequest.php
+++ b/Notebooks/src/V1/DeleteInstanceRequest.php
@@ -21,7 +21,7 @@ class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/DeleteRuntimeRequest.php b/Notebooks/src/V1/DeleteRuntimeRequest.php
index 9c9ac56f8f51..0235ff0c569f 100644
--- a/Notebooks/src/V1/DeleteRuntimeRequest.php
+++ b/Notebooks/src/V1/DeleteRuntimeRequest.php
@@ -21,13 +21,13 @@ class DeleteRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 2;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/DeleteScheduleRequest.php b/Notebooks/src/V1/DeleteScheduleRequest.php
index 5ca09e55dfba..b39703383d85 100644
--- a/Notebooks/src/V1/DeleteScheduleRequest.php
+++ b/Notebooks/src/V1/DeleteScheduleRequest.php
@@ -21,7 +21,7 @@ class DeleteScheduleRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/DiagnoseInstanceRequest.php b/Notebooks/src/V1/DiagnoseInstanceRequest.php
index 19d4cc985b53..3d75ec3995b2 100644
--- a/Notebooks/src/V1/DiagnoseInstanceRequest.php
+++ b/Notebooks/src/V1/DiagnoseInstanceRequest.php
@@ -21,13 +21,13 @@ class DiagnoseInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Required. Defines flags that are used to run the diagnostic tool
*
* Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $diagnostic_config = null;
+ protected $diagnostic_config = null;
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/DiagnoseRuntimeRequest.php b/Notebooks/src/V1/DiagnoseRuntimeRequest.php
index 69952bf55086..3a76ddd8406b 100644
--- a/Notebooks/src/V1/DiagnoseRuntimeRequest.php
+++ b/Notebooks/src/V1/DiagnoseRuntimeRequest.php
@@ -21,13 +21,13 @@ class DiagnoseRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Required. Defines flags that are used to run the diagnostic tool
*
* Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $diagnostic_config = null;
+ protected $diagnostic_config = null;
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/DiagnosticConfig.php b/Notebooks/src/V1/DiagnosticConfig.php
index bdbbe603512c..9e051f4082f2 100644
--- a/Notebooks/src/V1/DiagnosticConfig.php
+++ b/Notebooks/src/V1/DiagnosticConfig.php
@@ -30,7 +30,7 @@ class DiagnosticConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $gcs_bucket = '';
+ protected $gcs_bucket = '';
/**
* Optional. Defines the relative storage path in the Cloud Storage bucket
* where the diagnostic logs will be written: Default path will be the root
@@ -41,25 +41,25 @@ class DiagnosticConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $relative_path = '';
+ protected $relative_path = '';
/**
* Optional. Enables flag to repair service for instance
*
* Generated from protobuf field bool repair_flag_enabled = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $repair_flag_enabled = false;
+ protected $repair_flag_enabled = false;
/**
* Optional. Enables flag to capture packets from the instance for 30 seconds
*
* Generated from protobuf field bool packet_capture_flag_enabled = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $packet_capture_flag_enabled = false;
+ protected $packet_capture_flag_enabled = false;
/**
* Optional. Enables flag to copy all `/home/jupyter` folder contents
*
* Generated from protobuf field bool copy_home_files_flag_enabled = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $copy_home_files_flag_enabled = false;
+ protected $copy_home_files_flag_enabled = false;
/**
* Constructor.
diff --git a/Notebooks/src/V1/EncryptionConfig.php b/Notebooks/src/V1/EncryptionConfig.php
index dd2e45342146..0c4d23f850e9 100644
--- a/Notebooks/src/V1/EncryptionConfig.php
+++ b/Notebooks/src/V1/EncryptionConfig.php
@@ -24,7 +24,7 @@ class EncryptionConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kms_key = 1;
*/
- private $kms_key = '';
+ protected $kms_key = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/Environment.php b/Notebooks/src/V1/Environment.php
index 93d72bd7cb67..acba5f6f762f 100644
--- a/Notebooks/src/V1/Environment.php
+++ b/Notebooks/src/V1/Environment.php
@@ -23,19 +23,19 @@ class Environment extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Display name of this environment for the UI.
*
* Generated from protobuf field string display_name = 2;
*/
- private $display_name = '';
+ protected $display_name = '';
/**
* A brief description of this environment.
*
* Generated from protobuf field string description = 3;
*/
- private $description = '';
+ protected $description = '';
/**
* Path to a Bash script that automatically runs after a notebook instance
* fully boots up. The path must be a URL or
@@ -43,13 +43,13 @@ class Environment extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string post_startup_script = 8;
*/
- private $post_startup_script = '';
+ protected $post_startup_script = '';
/**
* Output only. The time at which this environment was created.
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $create_time = null;
+ protected $create_time = null;
protected $image_type;
/**
diff --git a/Notebooks/src/V1/Event.php b/Notebooks/src/V1/Event.php
index 0d4d07125885..e283621af63c 100644
--- a/Notebooks/src/V1/Event.php
+++ b/Notebooks/src/V1/Event.php
@@ -20,13 +20,13 @@ class Event extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.protobuf.Timestamp report_time = 1;
*/
- private $report_time = null;
+ protected $report_time = null;
/**
* Event type.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Event.EventType type = 2;
*/
- private $type = 0;
+ protected $type = 0;
/**
* Optional. Event details. This field is used to pass event information.
*
diff --git a/Notebooks/src/V1/Event/EventType.php b/Notebooks/src/V1/Event/EventType.php
index 40fde28d60fd..7483230ee0f7 100644
--- a/Notebooks/src/V1/Event/EventType.php
+++ b/Notebooks/src/V1/Event/EventType.php
@@ -79,6 +79,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(EventType::class, \Google\Cloud\Notebooks\V1\Event_EventType::class);
diff --git a/Notebooks/src/V1/Execution.php b/Notebooks/src/V1/Execution.php
index bde64db5ee91..df7bc7abdea9 100644
--- a/Notebooks/src/V1/Execution.php
+++ b/Notebooks/src/V1/Execution.php
@@ -20,57 +20,57 @@ class Execution extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1;
*/
- private $execution_template = null;
+ protected $execution_template = null;
/**
* Output only. The resource name of the execute. Format:
* `projects/{project_id}/locations/{location}/executions/{execution_id}`
*
* Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Output only. Name used for UI purposes.
* Name can only contain alphanumeric characters and underscores '_'.
*
* Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $display_name = '';
+ protected $display_name = '';
/**
* A brief description of this execution.
*
* Generated from protobuf field string description = 4;
*/
- private $description = '';
+ protected $description = '';
/**
* Output only. Time the Execution was instantiated.
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* Output only. Time the Execution was last updated.
*
* Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $update_time = null;
+ protected $update_time = null;
/**
* Output only. State of the underlying AI Platform job.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = 0;
+ protected $state = 0;
/**
* Output notebook file generated by this execution
*
* Generated from protobuf field string output_notebook_file = 8;
*/
- private $output_notebook_file = '';
+ protected $output_notebook_file = '';
/**
* Output only. The URI of the external job used to execute the notebook.
*
* Generated from protobuf field string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $job_uri = '';
+ protected $job_uri = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/Execution/State.php b/Notebooks/src/V1/Execution/State.php
index 5aee6d68273a..20298fd7cd9c 100644
--- a/Notebooks/src/V1/Execution/State.php
+++ b/Notebooks/src/V1/Execution/State.php
@@ -112,6 +112,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Notebooks\V1\Execution_State::class);
diff --git a/Notebooks/src/V1/ExecutionTemplate.php b/Notebooks/src/V1/ExecutionTemplate.php
index c41231015ea9..ef49f88b9317 100644
--- a/Notebooks/src/V1/ExecutionTemplate.php
+++ b/Notebooks/src/V1/ExecutionTemplate.php
@@ -68,14 +68,14 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string master_type = 2;
*/
- private $master_type = '';
+ protected $master_type = '';
/**
* Configuration (count and accelerator type) for hardware running notebook
* execution.
*
* Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3;
*/
- private $accelerator_config = null;
+ protected $accelerator_config = null;
/**
* Labels for execution.
* If execution is scheduled, a field included will be 'nbs-scheduled'.
@@ -94,7 +94,7 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string input_notebook_file = 5;
*/
- private $input_notebook_file = '';
+ protected $input_notebook_file = '';
/**
* Container Image URI to a DLVM
* Example: 'gcr.io/deeplearning-platform-release/base-cu100'
@@ -103,7 +103,7 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string container_image_uri = 6;
*/
- private $container_image_uri = '';
+ protected $container_image_uri = '';
/**
* Path to the notebook folder to write to.
* Must be in a Google Cloud Storage bucket path.
@@ -112,7 +112,7 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string output_notebook_folder = 7;
*/
- private $output_notebook_folder = '';
+ protected $output_notebook_folder = '';
/**
* Parameters to be overridden in the notebook during execution.
* Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
@@ -122,13 +122,13 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string params_yaml_file = 8;
*/
- private $params_yaml_file = '';
+ protected $params_yaml_file = '';
/**
* Parameters used within the 'input_notebook_file' notebook.
*
* Generated from protobuf field string parameters = 9;
*/
- private $parameters = '';
+ protected $parameters = '';
/**
* The email address of a service account to use when running the execution.
* You must have the `iam.serviceAccounts.actAs` permission for the specified
@@ -136,13 +136,13 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string service_account = 10;
*/
- private $service_account = '';
+ protected $service_account = '';
/**
* The type of Job to be used on this execution.
*
* Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11;
*/
- private $job_type = 0;
+ protected $job_type = 0;
/**
* Name of the kernel spec to use. This must be specified if the
* kernel spec name on the execution target does not match the name in the
@@ -150,7 +150,7 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kernel_spec = 14;
*/
- private $kernel_spec = '';
+ protected $kernel_spec = '';
/**
* The name of a Vertex AI [Tensorboard] resource to which this execution
* will upload Tensorboard logs.
@@ -159,7 +159,7 @@ class ExecutionTemplate extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string tensorboard = 15 [(.google.api.resource_reference) = {
*/
- private $tensorboard = '';
+ protected $tensorboard = '';
protected $job_parameters;
/**
diff --git a/Notebooks/src/V1/ExecutionTemplate/DataprocParameters.php b/Notebooks/src/V1/ExecutionTemplate/DataprocParameters.php
index cd996687fcbd..1893292ab9af 100644
--- a/Notebooks/src/V1/ExecutionTemplate/DataprocParameters.php
+++ b/Notebooks/src/V1/ExecutionTemplate/DataprocParameters.php
@@ -21,7 +21,7 @@ class DataprocParameters extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string cluster = 1;
*/
- private $cluster = '';
+ protected $cluster = '';
/**
* Constructor.
@@ -69,6 +69,4 @@ public function setCluster($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DataprocParameters::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_DataprocParameters::class);
diff --git a/Notebooks/src/V1/ExecutionTemplate/JobType.php b/Notebooks/src/V1/ExecutionTemplate/JobType.php
index 7977f67eb20a..d6885eb20b1b 100644
--- a/Notebooks/src/V1/ExecutionTemplate/JobType.php
+++ b/Notebooks/src/V1/ExecutionTemplate/JobType.php
@@ -61,6 +61,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(JobType::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_JobType::class);
diff --git a/Notebooks/src/V1/ExecutionTemplate/ScaleTier.php b/Notebooks/src/V1/ExecutionTemplate/ScaleTier.php
index be85f68c19bd..ea59e2ce5b6a 100644
--- a/Notebooks/src/V1/ExecutionTemplate/ScaleTier.php
+++ b/Notebooks/src/V1/ExecutionTemplate/ScaleTier.php
@@ -94,6 +94,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ScaleTier::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_ScaleTier::class);
diff --git a/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php b/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php
index 15a0531cc3ec..4fdc477bacaa 100644
--- a/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php
+++ b/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php
@@ -23,13 +23,13 @@ class SchedulerAcceleratorConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1;
*/
- private $type = 0;
+ protected $type = 0;
/**
* Count of cores of this accelerator.
*
* Generated from protobuf field int64 core_count = 2;
*/
- private $core_count = 0;
+ protected $core_count = 0;
/**
* Constructor.
@@ -102,6 +102,4 @@ public function setCoreCount($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(SchedulerAcceleratorConfig::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_SchedulerAcceleratorConfig::class);
diff --git a/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorType.php b/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorType.php
index 63a5af02a0c9..290584532661 100644
--- a/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorType.php
+++ b/Notebooks/src/V1/ExecutionTemplate/SchedulerAcceleratorType.php
@@ -101,6 +101,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(SchedulerAcceleratorType::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_SchedulerAcceleratorType::class);
diff --git a/Notebooks/src/V1/ExecutionTemplate/VertexAIParameters.php b/Notebooks/src/V1/ExecutionTemplate/VertexAIParameters.php
index 824d333a64cd..34f47048d3c8 100644
--- a/Notebooks/src/V1/ExecutionTemplate/VertexAIParameters.php
+++ b/Notebooks/src/V1/ExecutionTemplate/VertexAIParameters.php
@@ -29,7 +29,7 @@ class VertexAIParameters extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string network = 1;
*/
- private $network = '';
+ protected $network = '';
/**
* Environment variables.
* At most 100 environment variables can be specified and unique.
@@ -143,6 +143,4 @@ public function setEnv($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(VertexAIParameters::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_VertexAIParameters::class);
diff --git a/Notebooks/src/V1/GetEnvironmentRequest.php b/Notebooks/src/V1/GetEnvironmentRequest.php
index d7aed02e822a..62e81c7994b0 100644
--- a/Notebooks/src/V1/GetEnvironmentRequest.php
+++ b/Notebooks/src/V1/GetEnvironmentRequest.php
@@ -21,7 +21,7 @@ class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/GetExecutionRequest.php b/Notebooks/src/V1/GetExecutionRequest.php
index 1312983d32f1..b4da531db6e5 100644
--- a/Notebooks/src/V1/GetExecutionRequest.php
+++ b/Notebooks/src/V1/GetExecutionRequest.php
@@ -21,7 +21,7 @@ class GetExecutionRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/GetInstanceHealthRequest.php b/Notebooks/src/V1/GetInstanceHealthRequest.php
index c3162bc937e4..362418036f21 100644
--- a/Notebooks/src/V1/GetInstanceHealthRequest.php
+++ b/Notebooks/src/V1/GetInstanceHealthRequest.php
@@ -21,7 +21,7 @@ class GetInstanceHealthRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/GetInstanceHealthResponse.php b/Notebooks/src/V1/GetInstanceHealthResponse.php
index b293d515adbd..70d662501f62 100644
--- a/Notebooks/src/V1/GetInstanceHealthResponse.php
+++ b/Notebooks/src/V1/GetInstanceHealthResponse.php
@@ -20,7 +20,7 @@ class GetInstanceHealthResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $health_state = 0;
+ protected $health_state = 0;
/**
* Output only. Additional information about instance health.
* Example:
diff --git a/Notebooks/src/V1/GetInstanceHealthResponse/HealthState.php b/Notebooks/src/V1/GetInstanceHealthResponse/HealthState.php
index 5ecda3012ea2..aa89d90dd0a2 100644
--- a/Notebooks/src/V1/GetInstanceHealthResponse/HealthState.php
+++ b/Notebooks/src/V1/GetInstanceHealthResponse/HealthState.php
@@ -79,6 +79,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(HealthState::class, \Google\Cloud\Notebooks\V1\GetInstanceHealthResponse_HealthState::class);
diff --git a/Notebooks/src/V1/GetInstanceRequest.php b/Notebooks/src/V1/GetInstanceRequest.php
index e4cb6a7fed79..4f5d9539fda5 100644
--- a/Notebooks/src/V1/GetInstanceRequest.php
+++ b/Notebooks/src/V1/GetInstanceRequest.php
@@ -21,7 +21,7 @@ class GetInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/GetRuntimeRequest.php b/Notebooks/src/V1/GetRuntimeRequest.php
index 9840fa71b1de..3bf80c4ed391 100644
--- a/Notebooks/src/V1/GetRuntimeRequest.php
+++ b/Notebooks/src/V1/GetRuntimeRequest.php
@@ -21,7 +21,7 @@ class GetRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/GetScheduleRequest.php b/Notebooks/src/V1/GetScheduleRequest.php
index 4ea7f48a3a30..46cef98735dd 100644
--- a/Notebooks/src/V1/GetScheduleRequest.php
+++ b/Notebooks/src/V1/GetScheduleRequest.php
@@ -21,7 +21,7 @@ class GetScheduleRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/Instance.php b/Notebooks/src/V1/Instance.php
index 2a1342ffa0e0..accb7b274f41 100644
--- a/Notebooks/src/V1/Instance.php
+++ b/Notebooks/src/V1/Instance.php
@@ -21,7 +21,7 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Path to a Bash script that automatically runs after a notebook instance
* fully boots up. The path must be a URL or
@@ -29,13 +29,13 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string post_startup_script = 4;
*/
- private $post_startup_script = '';
+ protected $post_startup_script = '';
/**
* Output only. The proxy endpoint that is used to access the Jupyter notebook.
*
* Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $proxy_uri = '';
+ protected $proxy_uri = '';
/**
* 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
@@ -56,7 +56,7 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string service_account = 7;
*/
- private $service_account = '';
+ protected $service_account = '';
/**
* Optional. The URIs of service account scopes to be included in
* Compute Engine instances.
@@ -78,7 +78,7 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];
*/
- private $machine_type = '';
+ protected $machine_type = '';
/**
* The hardware accelerator used on this instance. If you use
* accelerators, make sure that your configuration has
@@ -87,13 +87,13 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;
*/
- private $accelerator_config = null;
+ protected $accelerator_config = null;
/**
* Output only. The state of this instance.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = 0;
+ protected $state = 0;
/**
* Whether the end user authorizes Google Cloud to install GPU driver
* on this instance.
@@ -102,21 +102,21 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool install_gpu_driver = 11;
*/
- private $install_gpu_driver = false;
+ protected $install_gpu_driver = false;
/**
* Specify a custom Cloud Storage path where the GPU driver is stored.
* If not specified, we'll automatically choose from official GPU drivers.
*
* Generated from protobuf field string custom_gpu_driver_path = 12;
*/
- private $custom_gpu_driver_path = '';
+ protected $custom_gpu_driver_path = '';
/**
* Input only. The type of the boot disk attached to this instance, defaults to
* standard persistent disk (`PD_STANDARD`).
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $boot_disk_type = 0;
+ protected $boot_disk_type = 0;
/**
* 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
@@ -124,14 +124,14 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $boot_disk_size_gb = 0;
+ protected $boot_disk_size_gb = 0;
/**
* Input only. The type of the data disk attached to this instance, defaults to
* standard persistent disk (`PD_STANDARD`).
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $data_disk_type = 0;
+ protected $data_disk_type = 0;
/**
* 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
@@ -139,29 +139,29 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $data_disk_size_gb = 0;
+ protected $data_disk_size_gb = 0;
/**
* Input only. If true, the data disk will not be auto deleted when deleting the instance.
*
* Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $no_remove_data_disk = false;
+ protected $no_remove_data_disk = false;
/**
* Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $disk_encryption = 0;
+ protected $disk_encryption = 0;
/**
* 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](https://cloud.google.com/kms/docs/quickstart).
+ * Learn more about [using your own encryption keys](/kms/docs/quickstart).
*
* Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $kms_key = '';
+ protected $kms_key = '';
/**
* Output only. Attached disks to notebook instance.
*
@@ -175,19 +175,19 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $shielded_instance_config = null;
+ protected $shielded_instance_config = null;
/**
* If true, no public IP will be assigned to this instance.
*
* Generated from protobuf field bool no_public_ip = 17;
*/
- private $no_public_ip = false;
+ protected $no_public_ip = false;
/**
* If true, the notebook instance will not register with the proxy.
*
* Generated from protobuf field bool no_proxy_access = 18;
*/
- private $no_proxy_access = false;
+ protected $no_proxy_access = false;
/**
* The name of the VPC that this instance is in.
* Format:
@@ -195,7 +195,7 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string network = 19;
*/
- private $network = '';
+ protected $network = '';
/**
* The name of the subnet that this instance is in.
* Format:
@@ -203,7 +203,7 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string subnet = 20;
*/
- private $subnet = '';
+ protected $subnet = '';
/**
* Labels to apply to this instance.
* These can be later modified by the setLabels method.
@@ -236,7 +236,7 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $nic_type = 0;
+ protected $nic_type = 0;
/**
* Optional. The optional reservation affinity. Setting this field will apply
* the specified [Zonal Compute
@@ -245,32 +245,32 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $reservation_affinity = null;
+ protected $reservation_affinity = null;
/**
* Output only. Email address of entity that sent original CreateInstance request.
*
* Generated from protobuf field string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $creator = '';
+ protected $creator = '';
/**
* Optional. Flag to enable ip forwarding or not, default false/off.
* https://cloud.google.com/vpc/docs/using-routes#canipforward
*
* Generated from protobuf field bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $can_ip_forward = false;
+ protected $can_ip_forward = false;
/**
* Output only. Instance creation time.
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* Output only. Instance update time.
*
* Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $update_time = null;
+ protected $update_time = null;
protected $environment;
/**
@@ -357,7 +357,7 @@ class Instance extends \Google\Protobuf\Internal\Message
* is CMEK.
* Format:
* `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
- * Learn more about [using your own encryption keys](https://cloud.google.com/kms/docs/quickstart).
+ * Learn more about [using your own encryption keys](/kms/docs/quickstart).
* @type array<\Google\Cloud\Notebooks\V1\Instance\Disk>|\Google\Protobuf\Internal\RepeatedField $disks
* Output only. Attached disks to notebook instance.
* @type \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $shielded_instance_config
@@ -999,7 +999,7 @@ public function setDiskEncryption($var)
* is CMEK.
* Format:
* `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
- * Learn more about [using your own encryption keys](https://cloud.google.com/kms/docs/quickstart).
+ * Learn more about [using your own encryption keys](/kms/docs/quickstart).
*
* Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];
* @return string
@@ -1014,7 +1014,7 @@ public function getKmsKey()
* is CMEK.
* Format:
* `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
- * Learn more about [using your own encryption keys](https://cloud.google.com/kms/docs/quickstart).
+ * Learn more about [using your own encryption keys](/kms/docs/quickstart).
*
* Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];
* @param string $var
diff --git a/Notebooks/src/V1/Instance/AcceleratorConfig.php b/Notebooks/src/V1/Instance/AcceleratorConfig.php
index 7e5f6b5fe05f..370d4b0b8ad5 100644
--- a/Notebooks/src/V1/Instance/AcceleratorConfig.php
+++ b/Notebooks/src/V1/Instance/AcceleratorConfig.php
@@ -23,13 +23,13 @@ class AcceleratorConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;
*/
- private $type = 0;
+ protected $type = 0;
/**
* Count of cores of this accelerator.
*
* Generated from protobuf field int64 core_count = 2;
*/
- private $core_count = 0;
+ protected $core_count = 0;
/**
* Constructor.
@@ -102,6 +102,4 @@ public function setCoreCount($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AcceleratorConfig::class, \Google\Cloud\Notebooks\V1\Instance_AcceleratorConfig::class);
diff --git a/Notebooks/src/V1/Instance/AcceleratorType.php b/Notebooks/src/V1/Instance/AcceleratorType.php
index 9831175c0a2b..75f282233135 100644
--- a/Notebooks/src/V1/Instance/AcceleratorType.php
+++ b/Notebooks/src/V1/Instance/AcceleratorType.php
@@ -123,6 +123,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V1\Instance_AcceleratorType::class);
diff --git a/Notebooks/src/V1/Instance/Disk.php b/Notebooks/src/V1/Instance/Disk.php
index e89c213cba70..a6ec7d6cec59 100644
--- a/Notebooks/src/V1/Instance/Disk.php
+++ b/Notebooks/src/V1/Instance/Disk.php
@@ -21,14 +21,14 @@ class Disk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool auto_delete = 1;
*/
- private $auto_delete = false;
+ protected $auto_delete = false;
/**
* Indicates that this is a boot disk. The virtual machine will use the
* first partition of the disk for its root filesystem.
*
* Generated from protobuf field bool boot = 2;
*/
- private $boot = false;
+ protected $boot = false;
/**
* 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
@@ -40,13 +40,13 @@ class Disk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string device_name = 3;
*/
- private $device_name = '';
+ protected $device_name = '';
/**
* Indicates the size of the disk in base-2 GB.
*
* Generated from protobuf field int64 disk_size_gb = 4;
*/
- private $disk_size_gb = 0;
+ protected $disk_size_gb = 0;
/**
* Indicates a list of features to enable on the guest operating system.
* Applicable only for bootable images. Read Enabling guest operating
@@ -62,7 +62,7 @@ class Disk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 index = 6;
*/
- private $index = 0;
+ protected $index = 0;
/**
* Indicates the disk interface to use for attaching this disk, which is
* either SCSI or NVME. The default is SCSI. Persistent disks must always
@@ -76,14 +76,14 @@ class Disk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string interface = 7;
*/
- private $interface = '';
+ protected $interface = '';
/**
* Type of the resource. Always compute#attachedDisk for attached
* disks.
*
* Generated from protobuf field string kind = 8;
*/
- private $kind = '';
+ protected $kind = '';
/**
* A list of publicly visible licenses. Reserved for Google's use.
* A License represents billing and aggregate usage data for public
@@ -101,14 +101,14 @@ class Disk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string mode = 10;
*/
- private $mode = '';
+ protected $mode = '';
/**
* Indicates a valid partial or full URL to an existing Persistent Disk
* resource.
*
* Generated from protobuf field string source = 11;
*/
- private $source = '';
+ protected $source = '';
/**
* Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
* Valid values:
@@ -117,7 +117,7 @@ class Disk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string type = 12;
*/
- private $type = '';
+ protected $type = '';
/**
* Constructor.
@@ -563,6 +563,4 @@ public function setType($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Disk::class, \Google\Cloud\Notebooks\V1\Instance_Disk::class);
diff --git a/Notebooks/src/V1/Instance/Disk/GuestOsFeature.php b/Notebooks/src/V1/Instance/Disk/GuestOsFeature.php
index b49d243a9a65..88b0be061cd8 100644
--- a/Notebooks/src/V1/Instance/Disk/GuestOsFeature.php
+++ b/Notebooks/src/V1/Instance/Disk/GuestOsFeature.php
@@ -28,7 +28,7 @@ class GuestOsFeature extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string type = 1;
*/
- private $type = '';
+ protected $type = '';
/**
* Constructor.
@@ -97,6 +97,4 @@ public function setType($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(GuestOsFeature::class, \Google\Cloud\Notebooks\V1\Instance_Disk_GuestOsFeature::class);
diff --git a/Notebooks/src/V1/Instance/DiskEncryption.php b/Notebooks/src/V1/Instance/DiskEncryption.php
index ed653659e11e..edff3dd3edfe 100644
--- a/Notebooks/src/V1/Instance/DiskEncryption.php
+++ b/Notebooks/src/V1/Instance/DiskEncryption.php
@@ -59,6 +59,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DiskEncryption::class, \Google\Cloud\Notebooks\V1\Instance_DiskEncryption::class);
diff --git a/Notebooks/src/V1/Instance/DiskType.php b/Notebooks/src/V1/Instance/DiskType.php
index 268219224d84..8e7615c0d8da 100644
--- a/Notebooks/src/V1/Instance/DiskType.php
+++ b/Notebooks/src/V1/Instance/DiskType.php
@@ -73,6 +73,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DiskType::class, \Google\Cloud\Notebooks\V1\Instance_DiskType::class);
diff --git a/Notebooks/src/V1/Instance/NicType.php b/Notebooks/src/V1/Instance/NicType.php
index c2da464bc534..42ec41cc89d2 100644
--- a/Notebooks/src/V1/Instance/NicType.php
+++ b/Notebooks/src/V1/Instance/NicType.php
@@ -60,6 +60,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(NicType::class, \Google\Cloud\Notebooks\V1\Instance_NicType::class);
diff --git a/Notebooks/src/V1/Instance/ShieldedInstanceConfig.php b/Notebooks/src/V1/Instance/ShieldedInstanceConfig.php
index 486facfce179..d841b4b9cbb7 100644
--- a/Notebooks/src/V1/Instance/ShieldedInstanceConfig.php
+++ b/Notebooks/src/V1/Instance/ShieldedInstanceConfig.php
@@ -26,13 +26,13 @@ class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_secure_boot = 1;
*/
- private $enable_secure_boot = false;
+ protected $enable_secure_boot = false;
/**
* Defines whether the instance has the vTPM enabled. Enabled by default.
*
* Generated from protobuf field bool enable_vtpm = 2;
*/
- private $enable_vtpm = false;
+ protected $enable_vtpm = false;
/**
* Defines whether the instance has integrity monitoring enabled.
* Enables monitoring and attestation of the boot integrity of the instance.
@@ -42,7 +42,7 @@ class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_integrity_monitoring = 3;
*/
- private $enable_integrity_monitoring = false;
+ protected $enable_integrity_monitoring = false;
/**
* Constructor.
@@ -164,6 +164,4 @@ public function setEnableIntegrityMonitoring($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ShieldedInstanceConfig::class, \Google\Cloud\Notebooks\V1\Instance_ShieldedInstanceConfig::class);
diff --git a/Notebooks/src/V1/Instance/State.php b/Notebooks/src/V1/Instance/State.php
index 7787b107121a..e3e0ad509f51 100644
--- a/Notebooks/src/V1/Instance/State.php
+++ b/Notebooks/src/V1/Instance/State.php
@@ -123,6 +123,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Notebooks\V1\Instance_State::class);
diff --git a/Notebooks/src/V1/Instance/UpgradeHistoryEntry.php b/Notebooks/src/V1/Instance/UpgradeHistoryEntry.php
index 6c44f999857f..d4622036c2d2 100644
--- a/Notebooks/src/V1/Instance/UpgradeHistoryEntry.php
+++ b/Notebooks/src/V1/Instance/UpgradeHistoryEntry.php
@@ -20,43 +20,43 @@ class UpgradeHistoryEntry extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string snapshot = 1;
*/
- private $snapshot = '';
+ protected $snapshot = '';
/**
* The VM image before this instance upgrade.
*
* Generated from protobuf field string vm_image = 2;
*/
- private $vm_image = '';
+ protected $vm_image = '';
/**
* The container image before this instance upgrade.
*
* Generated from protobuf field string container_image = 3;
*/
- private $container_image = '';
+ protected $container_image = '';
/**
* The framework of this notebook instance.
*
* Generated from protobuf field string framework = 4;
*/
- private $framework = '';
+ protected $framework = '';
/**
* The version of the notebook instance before this upgrade.
*
* Generated from protobuf field string version = 5;
*/
- private $version = '';
+ protected $version = '';
/**
* The state of this instance upgrade history entry.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;
*/
- private $state = 0;
+ protected $state = 0;
/**
* The time that this instance upgrade history entry is created.
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 7;
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
*
@@ -69,13 +69,13 @@ class UpgradeHistoryEntry extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;
*/
- private $action = 0;
+ protected $action = 0;
/**
* Target VM Version, like m63.
*
* Generated from protobuf field string target_version = 10;
*/
- private $target_version = '';
+ protected $target_version = '';
/**
* Constructor.
@@ -386,6 +386,4 @@ public function setTargetVersion($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(UpgradeHistoryEntry::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry::class);
diff --git a/Notebooks/src/V1/Instance/UpgradeHistoryEntry/Action.php b/Notebooks/src/V1/Instance/UpgradeHistoryEntry/Action.php
index 6dc76ab38872..f6a6bfea8f73 100644
--- a/Notebooks/src/V1/Instance/UpgradeHistoryEntry/Action.php
+++ b/Notebooks/src/V1/Instance/UpgradeHistoryEntry/Action.php
@@ -59,6 +59,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Action::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry_Action::class);
diff --git a/Notebooks/src/V1/Instance/UpgradeHistoryEntry/State.php b/Notebooks/src/V1/Instance/UpgradeHistoryEntry/State.php
index 911247394eb3..f1d105de24a5 100644
--- a/Notebooks/src/V1/Instance/UpgradeHistoryEntry/State.php
+++ b/Notebooks/src/V1/Instance/UpgradeHistoryEntry/State.php
@@ -66,6 +66,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry_State::class);
diff --git a/Notebooks/src/V1/InstanceConfig.php b/Notebooks/src/V1/InstanceConfig.php
index c54cd43d6a27..cda436e61847 100644
--- a/Notebooks/src/V1/InstanceConfig.php
+++ b/Notebooks/src/V1/InstanceConfig.php
@@ -21,13 +21,13 @@ class InstanceConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string notebook_upgrade_schedule = 1;
*/
- private $notebook_upgrade_schedule = '';
+ protected $notebook_upgrade_schedule = '';
/**
* Verifies core internal services are running.
*
* Generated from protobuf field bool enable_health_monitoring = 2;
*/
- private $enable_health_monitoring = false;
+ protected $enable_health_monitoring = false;
/**
* Constructor.
diff --git a/Notebooks/src/V1/IsInstanceUpgradeableRequest.php b/Notebooks/src/V1/IsInstanceUpgradeableRequest.php
index d1ae5e94ea5e..8bf9e2313d97 100644
--- a/Notebooks/src/V1/IsInstanceUpgradeableRequest.php
+++ b/Notebooks/src/V1/IsInstanceUpgradeableRequest.php
@@ -21,14 +21,14 @@ class IsInstanceUpgradeableRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $notebook_instance = '';
+ protected $notebook_instance = '';
/**
* Optional. The optional UpgradeType. Setting this field will search for additional
* compute images to upgrade this instance.
*
* Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $type = 0;
+ protected $type = 0;
/**
* Constructor.
diff --git a/Notebooks/src/V1/IsInstanceUpgradeableResponse.php b/Notebooks/src/V1/IsInstanceUpgradeableResponse.php
index b571b20e22ce..397995bcd0c7 100644
--- a/Notebooks/src/V1/IsInstanceUpgradeableResponse.php
+++ b/Notebooks/src/V1/IsInstanceUpgradeableResponse.php
@@ -20,20 +20,20 @@ class IsInstanceUpgradeableResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool upgradeable = 1;
*/
- private $upgradeable = false;
+ protected $upgradeable = false;
/**
* The version this instance will be upgraded to if calling the upgrade
* endpoint. This field will only be populated if field upgradeable is true.
*
* Generated from protobuf field string upgrade_version = 2;
*/
- private $upgrade_version = '';
+ protected $upgrade_version = '';
/**
* Additional information about upgrade.
*
* Generated from protobuf field string upgrade_info = 3;
*/
- private $upgrade_info = '';
+ protected $upgrade_info = '';
/**
* 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
@@ -41,7 +41,7 @@ class IsInstanceUpgradeableResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string upgrade_image = 4;
*/
- private $upgrade_image = '';
+ protected $upgrade_image = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/ListEnvironmentsRequest.php b/Notebooks/src/V1/ListEnvironmentsRequest.php
index a17b61a08a89..9ccab752a6a3 100644
--- a/Notebooks/src/V1/ListEnvironmentsRequest.php
+++ b/Notebooks/src/V1/ListEnvironmentsRequest.php
@@ -20,20 +20,20 @@ class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $parent = '';
+ protected $parent = '';
/**
* Maximum return size of the list call.
*
* Generated from protobuf field int32 page_size = 2;
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* A previous returned page token that can be used to continue listing from
* the last result.
*
* Generated from protobuf field string page_token = 3;
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* @param string $parent Required. Format: `projects/{project_id}/locations/{location}`
diff --git a/Notebooks/src/V1/ListEnvironmentsResponse.php b/Notebooks/src/V1/ListEnvironmentsResponse.php
index 885fb5ce74bf..9b06c1ea14f6 100644
--- a/Notebooks/src/V1/ListEnvironmentsResponse.php
+++ b/Notebooks/src/V1/ListEnvironmentsResponse.php
@@ -27,7 +27,7 @@ class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string next_page_token = 2;
*/
- private $next_page_token = '';
+ protected $next_page_token = '';
/**
* Locations that could not be reached.
*
diff --git a/Notebooks/src/V1/ListExecutionsRequest.php b/Notebooks/src/V1/ListExecutionsRequest.php
index a268dd82117d..d77a6a1ed25b 100644
--- a/Notebooks/src/V1/ListExecutionsRequest.php
+++ b/Notebooks/src/V1/ListExecutionsRequest.php
@@ -21,20 +21,20 @@ class ListExecutionsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Maximum return size of the list call.
*
* Generated from protobuf field int32 page_size = 2;
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* A previous returned page token that can be used to continue listing
* from the last result.
*
* Generated from protobuf field string page_token = 3;
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* Filter applied to resulting executions. Currently only supports filtering
* executions by a specified `schedule_id`.
@@ -42,13 +42,13 @@ class ListExecutionsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string filter = 4;
*/
- private $filter = '';
+ protected $filter = '';
/**
* Sort by field.
*
* Generated from protobuf field string order_by = 5;
*/
- private $order_by = '';
+ protected $order_by = '';
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/ListExecutionsResponse.php b/Notebooks/src/V1/ListExecutionsResponse.php
index 28a4ae2528f1..368324e19d2f 100644
--- a/Notebooks/src/V1/ListExecutionsResponse.php
+++ b/Notebooks/src/V1/ListExecutionsResponse.php
@@ -27,7 +27,7 @@ class ListExecutionsResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string next_page_token = 2;
*/
- private $next_page_token = '';
+ protected $next_page_token = '';
/**
* Executions IDs that could not be reached. For example:
* ['projects/{project_id}/location/{location}/executions/imagenet_test1',
diff --git a/Notebooks/src/V1/ListInstancesRequest.php b/Notebooks/src/V1/ListInstancesRequest.php
index ee6cefac68da..22cb60a12a02 100644
--- a/Notebooks/src/V1/ListInstancesRequest.php
+++ b/Notebooks/src/V1/ListInstancesRequest.php
@@ -21,20 +21,20 @@ class ListInstancesRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $parent = '';
+ protected $parent = '';
/**
* Maximum return size of the list call.
*
* Generated from protobuf field int32 page_size = 2;
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* A previous returned page token that can be used to continue listing
* from the last result.
*
* Generated from protobuf field string page_token = 3;
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/ListInstancesResponse.php b/Notebooks/src/V1/ListInstancesResponse.php
index e89ff5182640..f621f82fdf0f 100644
--- a/Notebooks/src/V1/ListInstancesResponse.php
+++ b/Notebooks/src/V1/ListInstancesResponse.php
@@ -27,7 +27,7 @@ class ListInstancesResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string next_page_token = 2;
*/
- private $next_page_token = '';
+ protected $next_page_token = '';
/**
* Locations that could not be reached. For example,
* `['us-west1-a', 'us-central1-b']`.
diff --git a/Notebooks/src/V1/ListRuntimesRequest.php b/Notebooks/src/V1/ListRuntimesRequest.php
index 68efd02971bb..8e6cda6cbd5b 100644
--- a/Notebooks/src/V1/ListRuntimesRequest.php
+++ b/Notebooks/src/V1/ListRuntimesRequest.php
@@ -21,20 +21,20 @@ class ListRuntimesRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Maximum return size of the list call.
*
* Generated from protobuf field int32 page_size = 2;
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* A previous returned page token that can be used to continue listing
* from the last result.
*
* Generated from protobuf field string page_token = 3;
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/ListRuntimesResponse.php b/Notebooks/src/V1/ListRuntimesResponse.php
index cf9c526ecddd..c2339d4e4dfb 100644
--- a/Notebooks/src/V1/ListRuntimesResponse.php
+++ b/Notebooks/src/V1/ListRuntimesResponse.php
@@ -27,7 +27,7 @@ class ListRuntimesResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string next_page_token = 2;
*/
- private $next_page_token = '';
+ protected $next_page_token = '';
/**
* Locations that could not be reached. For example,
* `['us-west1', 'us-central1']`.
diff --git a/Notebooks/src/V1/ListSchedulesRequest.php b/Notebooks/src/V1/ListSchedulesRequest.php
index 2972b25884f7..7fb6ed52536e 100644
--- a/Notebooks/src/V1/ListSchedulesRequest.php
+++ b/Notebooks/src/V1/ListSchedulesRequest.php
@@ -21,32 +21,32 @@ class ListSchedulesRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Maximum return size of the list call.
*
* Generated from protobuf field int32 page_size = 2;
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* A previous returned page token that can be used to continue listing
* from the last result.
*
* Generated from protobuf field string page_token = 3;
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* Filter applied to resulting schedules.
*
* Generated from protobuf field string filter = 4;
*/
- private $filter = '';
+ protected $filter = '';
/**
* Field to order results by.
*
* Generated from protobuf field string order_by = 5;
*/
- private $order_by = '';
+ protected $order_by = '';
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V1/ListSchedulesResponse.php b/Notebooks/src/V1/ListSchedulesResponse.php
index d77b4cf42b2c..21f314072c1d 100644
--- a/Notebooks/src/V1/ListSchedulesResponse.php
+++ b/Notebooks/src/V1/ListSchedulesResponse.php
@@ -27,7 +27,7 @@ class ListSchedulesResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string next_page_token = 2;
*/
- private $next_page_token = '';
+ protected $next_page_token = '';
/**
* Schedules that could not be reached. For example:
* ['projects/{project_id}/location/{location}/schedules/monthly_digest',
diff --git a/Notebooks/src/V1/LocalDisk.php b/Notebooks/src/V1/LocalDisk.php
index c410063011c4..97bb2321a01a 100644
--- a/Notebooks/src/V1/LocalDisk.php
+++ b/Notebooks/src/V1/LocalDisk.php
@@ -21,14 +21,14 @@ class LocalDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $auto_delete = false;
+ protected $auto_delete = false;
/**
* 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.
*
* Generated from protobuf field bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $boot = false;
+ protected $boot = false;
/**
* Optional. Output only. Specifies a unique device name
* of your choice that is reflected into the
@@ -41,7 +41,7 @@ class LocalDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $device_name = '';
+ protected $device_name = '';
/**
* Output only. Indicates a list of features to enable on the guest operating system.
* Applicable only for bootable images. Read Enabling guest operating
@@ -57,7 +57,7 @@ class LocalDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $index = 0;
+ protected $index = 0;
/**
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
@@ -67,7 +67,7 @@ class LocalDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $initialize_params = null;
+ protected $initialize_params = null;
/**
* 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
@@ -80,13 +80,13 @@ class LocalDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string interface = 7;
*/
- private $interface = '';
+ protected $interface = '';
/**
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
* Generated from protobuf field string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $kind = '';
+ protected $kind = '';
/**
* Output only. Any valid publicly visible licenses.
*
@@ -102,14 +102,14 @@ class LocalDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string mode = 10;
*/
- private $mode = '';
+ protected $mode = '';
/**
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
* Generated from protobuf field string source = 11;
*/
- private $source = '';
+ protected $source = '';
/**
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
@@ -119,7 +119,7 @@ class LocalDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string type = 12;
*/
- private $type = '';
+ protected $type = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/LocalDisk/RuntimeGuestOsFeature.php b/Notebooks/src/V1/LocalDisk/RuntimeGuestOsFeature.php
index 846afa1e8b0d..320e37d9e11a 100644
--- a/Notebooks/src/V1/LocalDisk/RuntimeGuestOsFeature.php
+++ b/Notebooks/src/V1/LocalDisk/RuntimeGuestOsFeature.php
@@ -34,7 +34,7 @@ class RuntimeGuestOsFeature extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string type = 1;
*/
- private $type = '';
+ protected $type = '';
/**
* Constructor.
@@ -106,6 +106,4 @@ public function setType($var)
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(RuntimeGuestOsFeature::class, \Google\Cloud\Notebooks\V1\LocalDisk_RuntimeGuestOsFeature::class);
diff --git a/Notebooks/src/V1/LocalDiskInitializeParams.php b/Notebooks/src/V1/LocalDiskInitializeParams.php
index 41b2dc3a3a0b..f731a6094b6b 100644
--- a/Notebooks/src/V1/LocalDiskInitializeParams.php
+++ b/Notebooks/src/V1/LocalDiskInitializeParams.php
@@ -24,7 +24,7 @@ class LocalDiskInitializeParams extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string description = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $description = '';
+ protected $description = '';
/**
* 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
@@ -32,7 +32,7 @@ class LocalDiskInitializeParams extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_name = '';
+ protected $disk_name = '';
/**
* 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
@@ -40,14 +40,14 @@ class LocalDiskInitializeParams extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_size_gb = 0;
+ protected $disk_size_gb = 0;
/**
* Input only. The type of the boot disk attached to this instance, defaults to
* standard persistent disk (`PD_STANDARD`).
*
* Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY];
*/
- private $disk_type = 0;
+ protected $disk_type = 0;
/**
* 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.
diff --git a/Notebooks/src/V1/LocalDiskInitializeParams/DiskType.php b/Notebooks/src/V1/LocalDiskInitializeParams/DiskType.php
index 8c1eaa5a9195..997ce8129326 100644
--- a/Notebooks/src/V1/LocalDiskInitializeParams/DiskType.php
+++ b/Notebooks/src/V1/LocalDiskInitializeParams/DiskType.php
@@ -73,6 +73,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DiskType::class, \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams_DiskType::class);
diff --git a/Notebooks/src/V1/ManagedNotebookServiceGrpcClient.php b/Notebooks/src/V1/ManagedNotebookServiceGrpcClient.php
deleted file mode 100644
index fcc6636baebf..000000000000
--- a/Notebooks/src/V1/ManagedNotebookServiceGrpcClient.php
+++ /dev/null
@@ -1,240 +0,0 @@
-_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/ListRuntimes',
- $argument,
- ['\Google\Cloud\Notebooks\V1\ListRuntimesResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets details of a single Runtime. The location must be a regional endpoint
- * rather than zonal.
- * @param \Google\Cloud\Notebooks\V1\GetRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetRuntime(\Google\Cloud\Notebooks\V1\GetRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/GetRuntime',
- $argument,
- ['\Google\Cloud\Notebooks\V1\Runtime', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a new Runtime in a given project and location.
- * @param \Google\Cloud\Notebooks\V1\CreateRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CreateRuntime(\Google\Cloud\Notebooks\V1\CreateRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/CreateRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Update Notebook Runtime configuration.
- * @param \Google\Cloud\Notebooks\V1\UpdateRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpdateRuntime(\Google\Cloud\Notebooks\V1\UpdateRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/UpdateRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Deletes a single Runtime.
- * @param \Google\Cloud\Notebooks\V1\DeleteRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DeleteRuntime(\Google\Cloud\Notebooks\V1\DeleteRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/DeleteRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * 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
- * @param \Google\Cloud\Notebooks\V1\StartRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function StartRuntime(\Google\Cloud\Notebooks\V1\StartRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/StartRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * 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
- * @param \Google\Cloud\Notebooks\V1\StopRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function StopRuntime(\Google\Cloud\Notebooks\V1\StopRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/StopRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Switch a Managed Notebook Runtime.
- * @param \Google\Cloud\Notebooks\V1\SwitchRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function SwitchRuntime(\Google\Cloud\Notebooks\V1\SwitchRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/SwitchRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Resets a Managed Notebook Runtime.
- * @param \Google\Cloud\Notebooks\V1\ResetRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ResetRuntime(\Google\Cloud\Notebooks\V1\ResetRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/ResetRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Upgrades a Managed Notebook Runtime to the latest version.
- * @param \Google\Cloud\Notebooks\V1\UpgradeRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpgradeRuntime(\Google\Cloud\Notebooks\V1\UpgradeRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/UpgradeRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Report and process a runtime event.
- * @param \Google\Cloud\Notebooks\V1\ReportRuntimeEventRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ReportRuntimeEvent(\Google\Cloud\Notebooks\V1\ReportRuntimeEventRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/ReportRuntimeEvent',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets an access token for the consumer service account that the customer
- * attached to the runtime. Only accessible from the tenant instance.
- * @param \Google\Cloud\Notebooks\V1\RefreshRuntimeTokenInternalRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RefreshRuntimeTokenInternal(\Google\Cloud\Notebooks\V1\RefreshRuntimeTokenInternalRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/RefreshRuntimeTokenInternal',
- $argument,
- ['\Google\Cloud\Notebooks\V1\RefreshRuntimeTokenInternalResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.
- * @param \Google\Cloud\Notebooks\V1\DiagnoseRuntimeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DiagnoseRuntime(\Google\Cloud\Notebooks\V1\DiagnoseRuntimeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.ManagedNotebookService/DiagnoseRuntime',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
-}
diff --git a/Notebooks/src/V1/NotebookServiceGrpcClient.php b/Notebooks/src/V1/NotebookServiceGrpcClient.php
deleted file mode 100644
index c2a4b5106f64..000000000000
--- a/Notebooks/src/V1/NotebookServiceGrpcClient.php
+++ /dev/null
@@ -1,552 +0,0 @@
-_simpleRequest('/google.cloud.notebooks.v1.NotebookService/ListInstances',
- $argument,
- ['\Google\Cloud\Notebooks\V1\ListInstancesResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets details of a single Instance.
- * @param \Google\Cloud\Notebooks\V1\GetInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetInstance(\Google\Cloud\Notebooks\V1\GetInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/GetInstance',
- $argument,
- ['\Google\Cloud\Notebooks\V1\Instance', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a new Instance in a given project and location.
- * @param \Google\Cloud\Notebooks\V1\CreateInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CreateInstance(\Google\Cloud\Notebooks\V1\CreateInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/CreateInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * 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.
- * @param \Google\Cloud\Notebooks\V1\RegisterInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RegisterInstance(\Google\Cloud\Notebooks\V1\RegisterInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/RegisterInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Updates the guest accelerators of a single Instance.
- * @param \Google\Cloud\Notebooks\V1\SetInstanceAcceleratorRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function SetInstanceAccelerator(\Google\Cloud\Notebooks\V1\SetInstanceAcceleratorRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/SetInstanceAccelerator',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Updates the machine type of a single Instance.
- * @param \Google\Cloud\Notebooks\V1\SetInstanceMachineTypeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function SetInstanceMachineType(\Google\Cloud\Notebooks\V1\SetInstanceMachineTypeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/SetInstanceMachineType',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Update Notebook Instance configurations.
- * @param \Google\Cloud\Notebooks\V1\UpdateInstanceConfigRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpdateInstanceConfig(\Google\Cloud\Notebooks\V1\UpdateInstanceConfigRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/UpdateInstanceConfig',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Updates the Shielded instance configuration of a single Instance.
- * @param \Google\Cloud\Notebooks\V1\UpdateShieldedInstanceConfigRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpdateShieldedInstanceConfig(\Google\Cloud\Notebooks\V1\UpdateShieldedInstanceConfigRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/UpdateShieldedInstanceConfig',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Replaces all the labels of an Instance.
- * @param \Google\Cloud\Notebooks\V1\SetInstanceLabelsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function SetInstanceLabels(\Google\Cloud\Notebooks\V1\SetInstanceLabelsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/SetInstanceLabels',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Add/update metadata items for an instance.
- * @param \Google\Cloud\Notebooks\V1\UpdateInstanceMetadataItemsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpdateInstanceMetadataItems(\Google\Cloud\Notebooks\V1\UpdateInstanceMetadataItemsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/UpdateInstanceMetadataItems',
- $argument,
- ['\Google\Cloud\Notebooks\V1\UpdateInstanceMetadataItemsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Deletes a single Instance.
- * @param \Google\Cloud\Notebooks\V1\DeleteInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DeleteInstance(\Google\Cloud\Notebooks\V1\DeleteInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/DeleteInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Starts a notebook instance.
- * @param \Google\Cloud\Notebooks\V1\StartInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function StartInstance(\Google\Cloud\Notebooks\V1\StartInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/StartInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Stops a notebook instance.
- * @param \Google\Cloud\Notebooks\V1\StopInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function StopInstance(\Google\Cloud\Notebooks\V1\StopInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/StopInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Resets a notebook instance.
- * @param \Google\Cloud\Notebooks\V1\ResetInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ResetInstance(\Google\Cloud\Notebooks\V1\ResetInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/ResetInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * 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.
- * @param \Google\Cloud\Notebooks\V1\ReportInstanceInfoRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ReportInstanceInfo(\Google\Cloud\Notebooks\V1\ReportInstanceInfoRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/ReportInstanceInfo',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Check if a notebook instance is upgradable.
- * @param \Google\Cloud\Notebooks\V1\IsInstanceUpgradeableRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function IsInstanceUpgradeable(\Google\Cloud\Notebooks\V1\IsInstanceUpgradeableRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/IsInstanceUpgradeable',
- $argument,
- ['\Google\Cloud\Notebooks\V1\IsInstanceUpgradeableResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Check if a notebook instance is healthy.
- * @param \Google\Cloud\Notebooks\V1\GetInstanceHealthRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetInstanceHealth(\Google\Cloud\Notebooks\V1\GetInstanceHealthRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/GetInstanceHealth',
- $argument,
- ['\Google\Cloud\Notebooks\V1\GetInstanceHealthResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Upgrades a notebook instance to the latest version.
- * @param \Google\Cloud\Notebooks\V1\UpgradeInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpgradeInstance(\Google\Cloud\Notebooks\V1\UpgradeInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/UpgradeInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Rollbacks a notebook instance to the previous version.
- * @param \Google\Cloud\Notebooks\V1\RollbackInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RollbackInstance(\Google\Cloud\Notebooks\V1\RollbackInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/RollbackInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
- * @param \Google\Cloud\Notebooks\V1\DiagnoseInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DiagnoseInstance(\Google\Cloud\Notebooks\V1\DiagnoseInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/DiagnoseInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Allows notebook instances to
- * call this endpoint to upgrade themselves. Do not use this method directly.
- * @param \Google\Cloud\Notebooks\V1\UpgradeInstanceInternalRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpgradeInstanceInternal(\Google\Cloud\Notebooks\V1\UpgradeInstanceInternalRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/UpgradeInstanceInternal',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Lists environments in a project.
- * @param \Google\Cloud\Notebooks\V1\ListEnvironmentsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ListEnvironments(\Google\Cloud\Notebooks\V1\ListEnvironmentsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/ListEnvironments',
- $argument,
- ['\Google\Cloud\Notebooks\V1\ListEnvironmentsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets details of a single Environment.
- * @param \Google\Cloud\Notebooks\V1\GetEnvironmentRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetEnvironment(\Google\Cloud\Notebooks\V1\GetEnvironmentRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/GetEnvironment',
- $argument,
- ['\Google\Cloud\Notebooks\V1\Environment', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a new Environment.
- * @param \Google\Cloud\Notebooks\V1\CreateEnvironmentRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CreateEnvironment(\Google\Cloud\Notebooks\V1\CreateEnvironmentRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/CreateEnvironment',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Deletes a single Environment.
- * @param \Google\Cloud\Notebooks\V1\DeleteEnvironmentRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DeleteEnvironment(\Google\Cloud\Notebooks\V1\DeleteEnvironmentRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/DeleteEnvironment',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Lists schedules in a given project and location.
- * @param \Google\Cloud\Notebooks\V1\ListSchedulesRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ListSchedules(\Google\Cloud\Notebooks\V1\ListSchedulesRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/ListSchedules',
- $argument,
- ['\Google\Cloud\Notebooks\V1\ListSchedulesResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets details of schedule
- * @param \Google\Cloud\Notebooks\V1\GetScheduleRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetSchedule(\Google\Cloud\Notebooks\V1\GetScheduleRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/GetSchedule',
- $argument,
- ['\Google\Cloud\Notebooks\V1\Schedule', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Deletes schedule and all underlying jobs
- * @param \Google\Cloud\Notebooks\V1\DeleteScheduleRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DeleteSchedule(\Google\Cloud\Notebooks\V1\DeleteScheduleRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/DeleteSchedule',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a new Scheduled Notebook in a given project and location.
- * @param \Google\Cloud\Notebooks\V1\CreateScheduleRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CreateSchedule(\Google\Cloud\Notebooks\V1\CreateScheduleRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/CreateSchedule',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Triggers execution of an existing schedule.
- * @param \Google\Cloud\Notebooks\V1\TriggerScheduleRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function TriggerSchedule(\Google\Cloud\Notebooks\V1\TriggerScheduleRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/TriggerSchedule',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Lists executions in a given project and location
- * @param \Google\Cloud\Notebooks\V1\ListExecutionsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ListExecutions(\Google\Cloud\Notebooks\V1\ListExecutionsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/ListExecutions',
- $argument,
- ['\Google\Cloud\Notebooks\V1\ListExecutionsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets details of executions
- * @param \Google\Cloud\Notebooks\V1\GetExecutionRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetExecution(\Google\Cloud\Notebooks\V1\GetExecutionRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/GetExecution',
- $argument,
- ['\Google\Cloud\Notebooks\V1\Execution', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Deletes execution
- * @param \Google\Cloud\Notebooks\V1\DeleteExecutionRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DeleteExecution(\Google\Cloud\Notebooks\V1\DeleteExecutionRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/DeleteExecution',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a new Execution in a given project and location.
- * @param \Google\Cloud\Notebooks\V1\CreateExecutionRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CreateExecution(\Google\Cloud\Notebooks\V1\CreateExecutionRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1.NotebookService/CreateExecution',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
-}
diff --git a/Notebooks/src/V1/OperationMetadata.php b/Notebooks/src/V1/OperationMetadata.php
index ab1b0031f6f4..49db986749ec 100644
--- a/Notebooks/src/V1/OperationMetadata.php
+++ b/Notebooks/src/V1/OperationMetadata.php
@@ -20,31 +20,31 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* The time the operation finished running.
*
* Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
*/
- private $end_time = null;
+ protected $end_time = null;
/**
* Server-defined resource path for the target of the operation.
*
* Generated from protobuf field string target = 3;
*/
- private $target = '';
+ protected $target = '';
/**
* Name of the verb executed by the operation.
*
* Generated from protobuf field string verb = 4;
*/
- private $verb = '';
+ protected $verb = '';
/**
* Human-readable status of the operation, if any.
*
* Generated from protobuf field string status_message = 5;
*/
- private $status_message = '';
+ protected $status_message = '';
/**
* Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
@@ -53,19 +53,19 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool requested_cancellation = 6;
*/
- private $requested_cancellation = false;
+ protected $requested_cancellation = false;
/**
* API version used to start the operation.
*
* Generated from protobuf field string api_version = 7;
*/
- private $api_version = '';
+ protected $api_version = '';
/**
* API endpoint name of this operation.
*
* Generated from protobuf field string endpoint = 8;
*/
- private $endpoint = '';
+ protected $endpoint = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/RefreshRuntimeTokenInternalRequest.php b/Notebooks/src/V1/RefreshRuntimeTokenInternalRequest.php
index 389e1323aabc..6662c576c620 100644
--- a/Notebooks/src/V1/RefreshRuntimeTokenInternalRequest.php
+++ b/Notebooks/src/V1/RefreshRuntimeTokenInternalRequest.php
@@ -21,14 +21,14 @@ class RefreshRuntimeTokenInternalRequest extends \Google\Protobuf\Internal\Messa
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The VM hardware token for authenticating the VM.
* https://cloud.google.com/compute/docs/instances/verifying-instance-identity
*
* Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $vm_id = '';
+ protected $vm_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/RefreshRuntimeTokenInternalResponse.php b/Notebooks/src/V1/RefreshRuntimeTokenInternalResponse.php
index d8ec0250b4dc..a9e31bde51a9 100644
--- a/Notebooks/src/V1/RefreshRuntimeTokenInternalResponse.php
+++ b/Notebooks/src/V1/RefreshRuntimeTokenInternalResponse.php
@@ -20,13 +20,13 @@ class RefreshRuntimeTokenInternalResponse extends \Google\Protobuf\Internal\Mess
*
* Generated from protobuf field string access_token = 1;
*/
- private $access_token = '';
+ protected $access_token = '';
/**
* Output only. Token expiration time.
*
* Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $expire_time = null;
+ protected $expire_time = null;
/**
* Constructor.
diff --git a/Notebooks/src/V1/RegisterInstanceRequest.php b/Notebooks/src/V1/RegisterInstanceRequest.php
index 7b399d4f8309..96eb12f68d0b 100644
--- a/Notebooks/src/V1/RegisterInstanceRequest.php
+++ b/Notebooks/src/V1/RegisterInstanceRequest.php
@@ -21,7 +21,7 @@ class RegisterInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. User defined unique ID of this instance. The `instance_id` must
* be 1 to 63 characters long and contain only lowercase letters,
@@ -30,7 +30,7 @@ class RegisterInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $instance_id = '';
+ protected $instance_id = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/ReportInstanceInfoRequest.php b/Notebooks/src/V1/ReportInstanceInfoRequest.php
index 37ade7bb0812..8fbf0ac26d2d 100644
--- a/Notebooks/src/V1/ReportInstanceInfoRequest.php
+++ b/Notebooks/src/V1/ReportInstanceInfoRequest.php
@@ -21,14 +21,14 @@ class ReportInstanceInfoRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The VM hardware token for authenticating the VM.
* https://cloud.google.com/compute/docs/instances/verifying-instance-identity
*
* Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $vm_id = '';
+ protected $vm_id = '';
/**
* The metadata reported to Notebooks API. This will be merged to the instance
* metadata store
diff --git a/Notebooks/src/V1/ReportRuntimeEventRequest.php b/Notebooks/src/V1/ReportRuntimeEventRequest.php
index 054dee8a7901..8d785cdc3c76 100644
--- a/Notebooks/src/V1/ReportRuntimeEventRequest.php
+++ b/Notebooks/src/V1/ReportRuntimeEventRequest.php
@@ -21,20 +21,20 @@ class ReportRuntimeEventRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The VM hardware token for authenticating the VM.
* https://cloud.google.com/compute/docs/instances/verifying-instance-identity
*
* Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $vm_id = '';
+ protected $vm_id = '';
/**
* Required. The Event to be reported.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $event = null;
+ protected $event = null;
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/ReservationAffinity.php b/Notebooks/src/V1/ReservationAffinity.php
index 5e452fae5b49..b22aec5c428f 100644
--- a/Notebooks/src/V1/ReservationAffinity.php
+++ b/Notebooks/src/V1/ReservationAffinity.php
@@ -20,13 +20,13 @@ class ReservationAffinity extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $consume_reservation_type = 0;
+ protected $consume_reservation_type = 0;
/**
* Optional. Corresponds to the label key of reservation resource.
*
* Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $key = '';
+ protected $key = '';
/**
* Optional. Corresponds to the label values of reservation resource.
*
diff --git a/Notebooks/src/V1/ReservationAffinity/Type.php b/Notebooks/src/V1/ReservationAffinity/Type.php
index af2ee3dd3de4..b3cac5e2c1dd 100644
--- a/Notebooks/src/V1/ReservationAffinity/Type.php
+++ b/Notebooks/src/V1/ReservationAffinity/Type.php
@@ -67,6 +67,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Type::class, \Google\Cloud\Notebooks\V1\ReservationAffinity_Type::class);
diff --git a/Notebooks/src/V1/ResetInstanceRequest.php b/Notebooks/src/V1/ResetInstanceRequest.php
index db7a8168f574..e9c2bf7e8038 100644
--- a/Notebooks/src/V1/ResetInstanceRequest.php
+++ b/Notebooks/src/V1/ResetInstanceRequest.php
@@ -21,7 +21,7 @@ class ResetInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/ResetRuntimeRequest.php b/Notebooks/src/V1/ResetRuntimeRequest.php
index 031044897778..61cbd7275467 100644
--- a/Notebooks/src/V1/ResetRuntimeRequest.php
+++ b/Notebooks/src/V1/ResetRuntimeRequest.php
@@ -21,13 +21,13 @@ class ResetRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 2;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/RollbackInstanceRequest.php b/Notebooks/src/V1/RollbackInstanceRequest.php
index 0d4021cfa946..f9491707036b 100644
--- a/Notebooks/src/V1/RollbackInstanceRequest.php
+++ b/Notebooks/src/V1/RollbackInstanceRequest.php
@@ -21,14 +21,14 @@ class RollbackInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The snapshot for rollback.
* Example: `projects/test-project/global/snapshots/krwlzipynril`.
*
* Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $target_snapshot = '';
+ protected $target_snapshot = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/Runtime.php b/Notebooks/src/V1/Runtime.php
index db2de8e215a7..1911c7430ba6 100644
--- a/Notebooks/src/V1/Runtime.php
+++ b/Notebooks/src/V1/Runtime.php
@@ -22,50 +22,50 @@ class Runtime extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Output only. Runtime state.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = 0;
+ protected $state = 0;
/**
* Output only. Runtime health_state.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $health_state = 0;
+ protected $health_state = 0;
/**
* The config settings for accessing runtime.
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5;
*/
- private $access_config = null;
+ protected $access_config = null;
/**
* The config settings for software inside the runtime.
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6;
*/
- private $software_config = null;
+ protected $software_config = null;
/**
* Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
* stats.
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $metrics = null;
+ protected $metrics = null;
/**
* Output only. Runtime creation time.
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* Output only. Runtime update time.
*
* Generated from protobuf field .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $update_time = null;
+ protected $update_time = null;
protected $runtime_type;
/**
diff --git a/Notebooks/src/V1/Runtime/HealthState.php b/Notebooks/src/V1/Runtime/HealthState.php
index 9a0f048b360a..ea3ee074e077 100644
--- a/Notebooks/src/V1/Runtime/HealthState.php
+++ b/Notebooks/src/V1/Runtime/HealthState.php
@@ -79,6 +79,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(HealthState::class, \Google\Cloud\Notebooks\V1\Runtime_HealthState::class);
diff --git a/Notebooks/src/V1/Runtime/State.php b/Notebooks/src/V1/Runtime/State.php
index a3e9c1f5c8f0..07f03ed2eac1 100644
--- a/Notebooks/src/V1/Runtime/State.php
+++ b/Notebooks/src/V1/Runtime/State.php
@@ -102,6 +102,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Notebooks\V1\Runtime_State::class);
diff --git a/Notebooks/src/V1/RuntimeAcceleratorConfig.php b/Notebooks/src/V1/RuntimeAcceleratorConfig.php
index 8593eccf03f7..10aff3fbdc09 100644
--- a/Notebooks/src/V1/RuntimeAcceleratorConfig.php
+++ b/Notebooks/src/V1/RuntimeAcceleratorConfig.php
@@ -30,13 +30,13 @@ class RuntimeAcceleratorConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1;
*/
- private $type = 0;
+ protected $type = 0;
/**
* Count of cores of this accelerator.
*
* Generated from protobuf field int64 core_count = 2;
*/
- private $core_count = 0;
+ protected $core_count = 0;
/**
* Constructor.
diff --git a/Notebooks/src/V1/RuntimeAcceleratorConfig/AcceleratorType.php b/Notebooks/src/V1/RuntimeAcceleratorConfig/AcceleratorType.php
index 2804e7e85158..f3b0bbdcaedb 100644
--- a/Notebooks/src/V1/RuntimeAcceleratorConfig/AcceleratorType.php
+++ b/Notebooks/src/V1/RuntimeAcceleratorConfig/AcceleratorType.php
@@ -122,6 +122,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig_AcceleratorType::class);
diff --git a/Notebooks/src/V1/RuntimeAccessConfig.php b/Notebooks/src/V1/RuntimeAccessConfig.php
index 822f85e8aab4..48279d238329 100644
--- a/Notebooks/src/V1/RuntimeAccessConfig.php
+++ b/Notebooks/src/V1/RuntimeAccessConfig.php
@@ -20,20 +20,20 @@ class RuntimeAccessConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1;
*/
- private $access_type = 0;
+ protected $access_type = 0;
/**
* The owner of this runtime after creation. Format: `alias@example.com`
* Currently supports one owner only.
*
* Generated from protobuf field string runtime_owner = 2;
*/
- private $runtime_owner = '';
+ protected $runtime_owner = '';
/**
* Output only. The proxy endpoint that is used to access the runtime.
*
* Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $proxy_uri = '';
+ protected $proxy_uri = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/RuntimeAccessConfig/RuntimeAccessType.php b/Notebooks/src/V1/RuntimeAccessConfig/RuntimeAccessType.php
index 4893e511e971..d831cabb5da8 100644
--- a/Notebooks/src/V1/RuntimeAccessConfig/RuntimeAccessType.php
+++ b/Notebooks/src/V1/RuntimeAccessConfig/RuntimeAccessType.php
@@ -63,6 +63,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(RuntimeAccessType::class, \Google\Cloud\Notebooks\V1\RuntimeAccessConfig_RuntimeAccessType::class);
diff --git a/Notebooks/src/V1/RuntimeShieldedInstanceConfig.php b/Notebooks/src/V1/RuntimeShieldedInstanceConfig.php
index 7046f1edf9a8..278de0fa9476 100644
--- a/Notebooks/src/V1/RuntimeShieldedInstanceConfig.php
+++ b/Notebooks/src/V1/RuntimeShieldedInstanceConfig.php
@@ -26,13 +26,13 @@ class RuntimeShieldedInstanceConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_secure_boot = 1;
*/
- private $enable_secure_boot = false;
+ protected $enable_secure_boot = false;
/**
* Defines whether the instance has the vTPM enabled. Enabled by default.
*
* Generated from protobuf field bool enable_vtpm = 2;
*/
- private $enable_vtpm = false;
+ protected $enable_vtpm = false;
/**
* Defines whether the instance has integrity monitoring enabled.
* Enables monitoring and attestation of the boot integrity of the instance.
@@ -42,7 +42,7 @@ class RuntimeShieldedInstanceConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_integrity_monitoring = 3;
*/
- private $enable_integrity_monitoring = false;
+ protected $enable_integrity_monitoring = false;
/**
* Constructor.
diff --git a/Notebooks/src/V1/RuntimeSoftwareConfig.php b/Notebooks/src/V1/RuntimeSoftwareConfig.php
index 1ef9c683f4ca..6aff9234d908 100644
--- a/Notebooks/src/V1/RuntimeSoftwareConfig.php
+++ b/Notebooks/src/V1/RuntimeSoftwareConfig.php
@@ -26,41 +26,41 @@ class RuntimeSoftwareConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string notebook_upgrade_schedule = 1;
*/
- private $notebook_upgrade_schedule = '';
+ protected $notebook_upgrade_schedule = '';
/**
* Verifies core internal services are running.
* Default: True
*
* Generated from protobuf field optional bool enable_health_monitoring = 2;
*/
- private $enable_health_monitoring = null;
+ protected $enable_health_monitoring = null;
/**
* Runtime will automatically shutdown after idle_shutdown_time.
* Default: True
*
* Generated from protobuf field optional bool idle_shutdown = 3;
*/
- private $idle_shutdown = null;
+ protected $idle_shutdown = null;
/**
* Time in minutes to wait before shutting down runtime. Default: 180 minutes
*
* Generated from protobuf field int32 idle_shutdown_timeout = 4;
*/
- private $idle_shutdown_timeout = 0;
+ protected $idle_shutdown_timeout = 0;
/**
* Install Nvidia Driver automatically.
* Default: True
*
* Generated from protobuf field bool install_gpu_driver = 5;
*/
- private $install_gpu_driver = false;
+ protected $install_gpu_driver = false;
/**
* Specify a custom Cloud Storage path where the GPU driver is stored.
* If not specified, we'll automatically choose from official GPU drivers.
*
* Generated from protobuf field string custom_gpu_driver_path = 6;
*/
- private $custom_gpu_driver_path = '';
+ protected $custom_gpu_driver_path = '';
/**
* Path to a Bash script that automatically runs after a notebook instance
* fully boots up. The path must be a URL or
@@ -68,7 +68,7 @@ class RuntimeSoftwareConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string post_startup_script = 7;
*/
- private $post_startup_script = '';
+ protected $post_startup_script = '';
/**
* Optional. Use a list of container images to use as Kernels in the notebook instance.
*
@@ -80,26 +80,26 @@ class RuntimeSoftwareConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field optional bool upgradeable = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $upgradeable = null;
+ protected $upgradeable = null;
/**
* Behavior for the post startup script.
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10;
*/
- private $post_startup_script_behavior = 0;
+ protected $post_startup_script_behavior = 0;
/**
* Bool indicating whether JupyterLab terminal will be available or not.
* Default: False
*
* Generated from protobuf field optional bool disable_terminal = 11;
*/
- private $disable_terminal = null;
+ protected $disable_terminal = null;
/**
* Output only. version of boot image such as M100, from release label of the image.
*
* Generated from protobuf field optional string version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $version = null;
+ protected $version = null;
/**
* Constructor.
diff --git a/Notebooks/src/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php b/Notebooks/src/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php
index 2f94ae4c207c..8abe10a6f0cf 100644
--- a/Notebooks/src/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php
+++ b/Notebooks/src/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php
@@ -59,6 +59,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(PostStartupScriptBehavior::class, \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig_PostStartupScriptBehavior::class);
diff --git a/Notebooks/src/V1/Schedule.php b/Notebooks/src/V1/Schedule.php
index 9b316f311080..b71b84c1a035 100644
--- a/Notebooks/src/V1/Schedule.php
+++ b/Notebooks/src/V1/Schedule.php
@@ -21,7 +21,7 @@ class Schedule extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Output only. Display name used for UI purposes.
* Name can only contain alphanumeric characters, hyphens `-`,
@@ -29,17 +29,17 @@ class Schedule extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $display_name = '';
+ protected $display_name = '';
/**
* A brief description of this environment.
*
* Generated from protobuf field string description = 3;
*/
- private $description = '';
+ protected $description = '';
/**
* Generated from protobuf field .google.cloud.notebooks.v1.Schedule.State state = 4;
*/
- private $state = 0;
+ protected $state = 0;
/**
* Cron-tab formatted schedule by which the job will execute.
* Format: minute, hour, day of month, month, day of week,
@@ -48,7 +48,7 @@ class Schedule extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string cron_schedule = 5;
*/
- private $cron_schedule = '';
+ protected $cron_schedule = '';
/**
* Timezone on which the cron_schedule.
* The value of this field must be a time zone name from the tz database.
@@ -60,25 +60,25 @@ class Schedule extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string time_zone = 6;
*/
- private $time_zone = '';
+ protected $time_zone = '';
/**
* Output only. Time the schedule was created.
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* Output only. Time the schedule was last updated.
*
* Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $update_time = null;
+ protected $update_time = null;
/**
* Notebook Execution Template corresponding to this schedule.
*
* Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9;
*/
- private $execution_template = null;
+ protected $execution_template = null;
/**
* Output only. The most recent execution names triggered from this schedule and their
* corresponding states.
diff --git a/Notebooks/src/V1/Schedule/State.php b/Notebooks/src/V1/Schedule/State.php
index c75aef0bb897..0a013c1822f7 100644
--- a/Notebooks/src/V1/Schedule/State.php
+++ b/Notebooks/src/V1/Schedule/State.php
@@ -92,6 +92,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Notebooks\V1\Schedule_State::class);
diff --git a/Notebooks/src/V1/SetInstanceAcceleratorRequest.php b/Notebooks/src/V1/SetInstanceAcceleratorRequest.php
index 3efe85479245..a8991d313283 100644
--- a/Notebooks/src/V1/SetInstanceAcceleratorRequest.php
+++ b/Notebooks/src/V1/SetInstanceAcceleratorRequest.php
@@ -21,13 +21,13 @@ class SetInstanceAcceleratorRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. Type of this accelerator.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $type = 0;
+ protected $type = 0;
/**
* Required. Count of cores of this accelerator. Note that not all combinations
* of `type` and `core_count` are valid. Check [GPUs on
@@ -36,7 +36,7 @@ class SetInstanceAcceleratorRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $core_count = 0;
+ protected $core_count = 0;
/**
* Constructor.
diff --git a/Notebooks/src/V1/SetInstanceLabelsRequest.php b/Notebooks/src/V1/SetInstanceLabelsRequest.php
index 30dc7565e8c2..1b05aa04ab3c 100644
--- a/Notebooks/src/V1/SetInstanceLabelsRequest.php
+++ b/Notebooks/src/V1/SetInstanceLabelsRequest.php
@@ -21,7 +21,7 @@ class SetInstanceLabelsRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Labels to apply to this instance.
* These can be later modified by the setLabels method
diff --git a/Notebooks/src/V1/SetInstanceMachineTypeRequest.php b/Notebooks/src/V1/SetInstanceMachineTypeRequest.php
index ee0ca6c34cb7..0046af14c896 100644
--- a/Notebooks/src/V1/SetInstanceMachineTypeRequest.php
+++ b/Notebooks/src/V1/SetInstanceMachineTypeRequest.php
@@ -21,14 +21,14 @@ class SetInstanceMachineTypeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The [Compute Engine machine
* type](https://cloud.google.com/compute/docs/machine-types).
*
* Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $machine_type = '';
+ protected $machine_type = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/StartInstanceRequest.php b/Notebooks/src/V1/StartInstanceRequest.php
index 84cec4c3ca92..fd0251b536cd 100644
--- a/Notebooks/src/V1/StartInstanceRequest.php
+++ b/Notebooks/src/V1/StartInstanceRequest.php
@@ -21,7 +21,7 @@ class StartInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/StartRuntimeRequest.php b/Notebooks/src/V1/StartRuntimeRequest.php
index 3bd61abdf737..da0fff0d9c0f 100644
--- a/Notebooks/src/V1/StartRuntimeRequest.php
+++ b/Notebooks/src/V1/StartRuntimeRequest.php
@@ -21,13 +21,13 @@ class StartRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 2;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/StopInstanceRequest.php b/Notebooks/src/V1/StopInstanceRequest.php
index 13e61963c0a4..8ece20d7764e 100644
--- a/Notebooks/src/V1/StopInstanceRequest.php
+++ b/Notebooks/src/V1/StopInstanceRequest.php
@@ -21,7 +21,7 @@ class StopInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/StopRuntimeRequest.php b/Notebooks/src/V1/StopRuntimeRequest.php
index dd830af0a7da..9214951474e6 100644
--- a/Notebooks/src/V1/StopRuntimeRequest.php
+++ b/Notebooks/src/V1/StopRuntimeRequest.php
@@ -21,13 +21,13 @@ class StopRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 2;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/SwitchRuntimeRequest.php b/Notebooks/src/V1/SwitchRuntimeRequest.php
index 6e8f514f030c..7b9edc1008cc 100644
--- a/Notebooks/src/V1/SwitchRuntimeRequest.php
+++ b/Notebooks/src/V1/SwitchRuntimeRequest.php
@@ -21,25 +21,25 @@ class SwitchRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* machine type.
*
* Generated from protobuf field string machine_type = 2;
*/
- private $machine_type = '';
+ protected $machine_type = '';
/**
* accelerator config.
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3;
*/
- private $accelerator_config = null;
+ protected $accelerator_config = null;
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 4;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/TriggerScheduleRequest.php b/Notebooks/src/V1/TriggerScheduleRequest.php
index 055810ef270b..c3e6b514d541 100644
--- a/Notebooks/src/V1/TriggerScheduleRequest.php
+++ b/Notebooks/src/V1/TriggerScheduleRequest.php
@@ -21,7 +21,7 @@ class TriggerScheduleRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V1/UpdateInstanceConfigRequest.php b/Notebooks/src/V1/UpdateInstanceConfigRequest.php
index 11848cc46efc..2078a1ee9c1a 100644
--- a/Notebooks/src/V1/UpdateInstanceConfigRequest.php
+++ b/Notebooks/src/V1/UpdateInstanceConfigRequest.php
@@ -21,13 +21,13 @@ class UpdateInstanceConfigRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* The instance configurations to be updated.
*
* Generated from protobuf field .google.cloud.notebooks.v1.InstanceConfig config = 2;
*/
- private $config = null;
+ protected $config = null;
/**
* Constructor.
diff --git a/Notebooks/src/V1/UpdateInstanceMetadataItemsRequest.php b/Notebooks/src/V1/UpdateInstanceMetadataItemsRequest.php
index cf0dad7fb944..397f1889d94f 100644
--- a/Notebooks/src/V1/UpdateInstanceMetadataItemsRequest.php
+++ b/Notebooks/src/V1/UpdateInstanceMetadataItemsRequest.php
@@ -21,7 +21,7 @@ class UpdateInstanceMetadataItemsRequest extends \Google\Protobuf\Internal\Messa
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Metadata items to add/update for the instance.
*
diff --git a/Notebooks/src/V1/UpdateRuntimeRequest.php b/Notebooks/src/V1/UpdateRuntimeRequest.php
index 0f3d5647fdb2..a91ad274204a 100644
--- a/Notebooks/src/V1/UpdateRuntimeRequest.php
+++ b/Notebooks/src/V1/UpdateRuntimeRequest.php
@@ -20,7 +20,7 @@ class UpdateRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $runtime = null;
+ protected $runtime = null;
/**
* Required. Specifies the path, relative to `Runtime`, of
* the field to update. For example, to change the software configuration
@@ -45,13 +45,13 @@ class UpdateRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $update_mask = null;
+ protected $update_mask = null;
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 3;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param \Google\Cloud\Notebooks\V1\Runtime $runtime Required. The Runtime to be updated.
diff --git a/Notebooks/src/V1/UpdateShieldedInstanceConfigRequest.php b/Notebooks/src/V1/UpdateShieldedInstanceConfigRequest.php
index 2b3485cee78e..7c09308bcf3c 100644
--- a/Notebooks/src/V1/UpdateShieldedInstanceConfigRequest.php
+++ b/Notebooks/src/V1/UpdateShieldedInstanceConfigRequest.php
@@ -22,13 +22,13 @@ class UpdateShieldedInstanceConfigRequest extends \Google\Protobuf\Internal\Mess
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* ShieldedInstance configuration to be updated.
*
* Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2;
*/
- private $shielded_instance_config = null;
+ protected $shielded_instance_config = null;
/**
* Constructor.
diff --git a/Notebooks/src/V1/UpgradeInstanceInternalRequest.php b/Notebooks/src/V1/UpgradeInstanceInternalRequest.php
index f3392951752c..583a3256c765 100644
--- a/Notebooks/src/V1/UpgradeInstanceInternalRequest.php
+++ b/Notebooks/src/V1/UpgradeInstanceInternalRequest.php
@@ -21,21 +21,21 @@ class UpgradeInstanceInternalRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The VM hardware token for authenticating the VM.
* https://cloud.google.com/compute/docs/instances/verifying-instance-identity
*
* Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $vm_id = '';
+ protected $vm_id = '';
/**
* Optional. The optional UpgradeType. Setting this field will search for additional
* compute images to upgrade this instance.
*
* Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $type = 0;
+ protected $type = 0;
/**
* Constructor.
diff --git a/Notebooks/src/V1/UpgradeInstanceRequest.php b/Notebooks/src/V1/UpgradeInstanceRequest.php
index 0af614121f1a..16e89def7081 100644
--- a/Notebooks/src/V1/UpgradeInstanceRequest.php
+++ b/Notebooks/src/V1/UpgradeInstanceRequest.php
@@ -21,14 +21,14 @@ class UpgradeInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Optional. The optional UpgradeType. Setting this field will search for additional
* compute images to upgrade this instance.
*
* Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $type = 0;
+ protected $type = 0;
/**
* Constructor.
diff --git a/Notebooks/src/V1/UpgradeRuntimeRequest.php b/Notebooks/src/V1/UpgradeRuntimeRequest.php
index d244e0433035..019158ec9b8d 100644
--- a/Notebooks/src/V1/UpgradeRuntimeRequest.php
+++ b/Notebooks/src/V1/UpgradeRuntimeRequest.php
@@ -23,13 +23,13 @@ class UpgradeRuntimeRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Idempotent request UUID.
*
* Generated from protobuf field string request_id = 2;
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V1/VirtualMachine.php b/Notebooks/src/V1/VirtualMachine.php
index fd34c8ee940e..7f76639f36dc 100644
--- a/Notebooks/src/V1/VirtualMachine.php
+++ b/Notebooks/src/V1/VirtualMachine.php
@@ -20,19 +20,19 @@ class VirtualMachine extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $instance_name = '';
+ protected $instance_name = '';
/**
* Output only. The unique identifier of the Managed Compute Engine instance.
*
* Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $instance_id = '';
+ protected $instance_id = '';
/**
* Virtual Machine configuration settings.
*
* Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3;
*/
- private $virtual_machine_config = null;
+ protected $virtual_machine_config = null;
/**
* Constructor.
diff --git a/Notebooks/src/V1/VirtualMachineConfig.php b/Notebooks/src/V1/VirtualMachineConfig.php
index 1109ca8ba36c..b4298431489c 100644
--- a/Notebooks/src/V1/VirtualMachineConfig.php
+++ b/Notebooks/src/V1/VirtualMachineConfig.php
@@ -24,7 +24,7 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $zone = '';
+ protected $zone = '';
/**
* Required. The Compute Engine machine type used for runtimes.
* Short name is valid. Examples:
@@ -33,7 +33,7 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $machine_type = '';
+ protected $machine_type = '';
/**
* Optional. Use a list of container images to use as Kernels in the notebook instance.
*
@@ -45,25 +45,25 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED];
*/
- private $data_disk = null;
+ protected $data_disk = null;
/**
* Optional. Encryption settings for virtual machine data disk.
*
* Generated from protobuf field .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $encryption_config = null;
+ protected $encryption_config = null;
/**
* Optional. Shielded VM Instance configuration settings.
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $shielded_instance_config = null;
+ protected $shielded_instance_config = null;
/**
* Optional. The Compute Engine accelerator configuration for this runtime.
*
* Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $accelerator_config = null;
+ protected $accelerator_config = null;
/**
* Optional. The Compute Engine network to be used for machine
* communications. Cannot be specified with subnetwork. If neither
@@ -82,7 +82,7 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $network = '';
+ protected $network = '';
/**
* Optional. The Compute Engine subnetwork to be used for machine
* communications. Cannot be specified with network.
@@ -92,7 +92,7 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string subnet = 9 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $subnet = '';
+ protected $subnet = '';
/**
* Optional. If true, runtime will only have internal IP
* addresses. By default, runtimes are not restricted to internal IP
@@ -103,7 +103,7 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $internal_ip_only = false;
+ protected $internal_ip_only = false;
/**
* Optional. The Compute Engine tags to add to runtime (see [Tagging
* instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
@@ -146,7 +146,7 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $nic_type = 0;
+ protected $nic_type = 0;
/**
* Optional. Reserved IP Range name is used for VPC Peering.
* The subnetwork allocation will use the range *name* if it's assigned.
@@ -163,13 +163,13 @@ class VirtualMachineConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string reserved_ip_range = 18 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $reserved_ip_range = '';
+ protected $reserved_ip_range = '';
/**
* Optional. Boot image metadata used for runtime upgradeability.
*
* Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $boot_image = null;
+ protected $boot_image = null;
/**
* Constructor.
diff --git a/Notebooks/src/V1/VirtualMachineConfig/BootImage.php b/Notebooks/src/V1/VirtualMachineConfig/BootImage.php
index 62c028e84006..463ba69f5b52 100644
--- a/Notebooks/src/V1/VirtualMachineConfig/BootImage.php
+++ b/Notebooks/src/V1/VirtualMachineConfig/BootImage.php
@@ -32,6 +32,4 @@ public function __construct($data = NULL) {
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(BootImage::class, \Google\Cloud\Notebooks\V1\VirtualMachineConfig_BootImage::class);
diff --git a/Notebooks/src/V1/VirtualMachineConfig/NicType.php b/Notebooks/src/V1/VirtualMachineConfig/NicType.php
index 2432a9b28a55..6d532c37c334 100644
--- a/Notebooks/src/V1/VirtualMachineConfig/NicType.php
+++ b/Notebooks/src/V1/VirtualMachineConfig/NicType.php
@@ -60,6 +60,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(NicType::class, \Google\Cloud\Notebooks\V1\VirtualMachineConfig_NicType::class);
diff --git a/Notebooks/src/V1/VmImage.php b/Notebooks/src/V1/VmImage.php
index 8ab5f1a78bef..e4c537d0a018 100644
--- a/Notebooks/src/V1/VmImage.php
+++ b/Notebooks/src/V1/VmImage.php
@@ -22,7 +22,7 @@ class VmImage extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $project = '';
+ protected $project = '';
protected $image;
/**
diff --git a/Notebooks/src/V1beta1/ContainerImage.php b/Notebooks/src/V1beta1/ContainerImage.php
deleted file mode 100644
index d61cc974ecde..000000000000
--- a/Notebooks/src/V1beta1/ContainerImage.php
+++ /dev/null
@@ -1,110 +0,0 @@
-google.cloud.notebooks.v1beta1.ContainerImage
- */
-class ContainerImage extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The path to the container image repository. For example:
- * `gcr.io/{project_id}/{image_name}`
- *
- * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $repository = '';
- /**
- * The tag of the container image. If not specified, this defaults
- * to the latest tag.
- *
- * Generated from protobuf field string tag = 2;
- */
- private $tag = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $repository
- * Required. The path to the container image repository. For example:
- * `gcr.io/{project_id}/{image_name}`
- * @type string $tag
- * The tag of the container image. If not specified, this defaults
- * to the latest tag.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Environment::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The path to the container image repository. For example:
- * `gcr.io/{project_id}/{image_name}`
- *
- * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getRepository()
- {
- return $this->repository;
- }
-
- /**
- * Required. The path to the container image repository. For example:
- * `gcr.io/{project_id}/{image_name}`
- *
- * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setRepository($var)
- {
- GPBUtil::checkString($var, True);
- $this->repository = $var;
-
- return $this;
- }
-
- /**
- * The tag of the container image. If not specified, this defaults
- * to the latest tag.
- *
- * Generated from protobuf field string tag = 2;
- * @return string
- */
- public function getTag()
- {
- return $this->tag;
- }
-
- /**
- * The tag of the container image. If not specified, this defaults
- * to the latest tag.
- *
- * Generated from protobuf field string tag = 2;
- * @param string $var
- * @return $this
- */
- public function setTag($var)
- {
- GPBUtil::checkString($var, True);
- $this->tag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/CreateEnvironmentRequest.php b/Notebooks/src/V1beta1/CreateEnvironmentRequest.php
deleted file mode 100644
index 34875db33e53..000000000000
--- a/Notebooks/src/V1beta1/CreateEnvironmentRequest.php
+++ /dev/null
@@ -1,157 +0,0 @@
-google.cloud.notebooks.v1beta1.CreateEnvironmentRequest
- */
-class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format: `projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $parent = '';
- /**
- * 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.
- *
- * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $environment_id = '';
- /**
- * Required. The environment to be created.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- private $environment = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. Format: `projects/{project_id}/locations/{location}`
- * @type string $environment_id
- * 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.
- * @type \Google\Cloud\Notebooks\V1beta1\Environment $environment
- * Required. The environment to be created.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format: `projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. Format: `projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- 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.
- *
- * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getEnvironmentId()
- {
- return $this->environment_id;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setEnvironmentId($var)
- {
- GPBUtil::checkString($var, True);
- $this->environment_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The environment to be created.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Notebooks\V1beta1\Environment|null
- */
- public function getEnvironment()
- {
- return $this->environment;
- }
-
- public function hasEnvironment()
- {
- return isset($this->environment);
- }
-
- public function clearEnvironment()
- {
- unset($this->environment);
- }
-
- /**
- * Required. The environment to be created.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Notebooks\V1beta1\Environment $var
- * @return $this
- */
- public function setEnvironment($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\Environment::class);
- $this->environment = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/CreateInstanceRequest.php b/Notebooks/src/V1beta1/CreateInstanceRequest.php
deleted file mode 100644
index dfbf290e2d53..000000000000
--- a/Notebooks/src/V1beta1/CreateInstanceRequest.php
+++ /dev/null
@@ -1,149 +0,0 @@
-google.cloud.notebooks.v1beta1.CreateInstanceRequest
- */
-class CreateInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $parent = '';
- /**
- * Required. User-defined unique ID of this instance.
- *
- * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $instance_id = '';
- /**
- * Required. The instance to be created.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- private $instance = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- * @type string $instance_id
- * Required. User-defined unique ID of this instance.
- * @type \Google\Cloud\Notebooks\V1beta1\Instance $instance
- * Required. The instance to be created.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. User-defined unique ID of this instance.
- *
- * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getInstanceId()
- {
- return $this->instance_id;
- }
-
- /**
- * Required. User-defined unique ID of this instance.
- *
- * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setInstanceId($var)
- {
- GPBUtil::checkString($var, True);
- $this->instance_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The instance to be created.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Notebooks\V1beta1\Instance|null
- */
- public function getInstance()
- {
- return $this->instance;
- }
-
- public function hasInstance()
- {
- return isset($this->instance);
- }
-
- public function clearInstance()
- {
- unset($this->instance);
- }
-
- /**
- * Required. The instance to be created.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Notebooks\V1beta1\Instance $var
- * @return $this
- */
- public function setInstance($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\Instance::class);
- $this->instance = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/DeleteEnvironmentRequest.php b/Notebooks/src/V1beta1/DeleteEnvironmentRequest.php
deleted file mode 100644
index 8f4089e19654..000000000000
--- a/Notebooks/src/V1beta1/DeleteEnvironmentRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.DeleteEnvironmentRequest
- */
-class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/DeleteInstanceRequest.php b/Notebooks/src/V1beta1/DeleteInstanceRequest.php
deleted file mode 100644
index b751b50a4cb4..000000000000
--- a/Notebooks/src/V1beta1/DeleteInstanceRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.DeleteInstanceRequest
- */
-class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/Environment.php b/Notebooks/src/V1beta1/Environment.php
deleted file mode 100644
index cd20997095ae..000000000000
--- a/Notebooks/src/V1beta1/Environment.php
+++ /dev/null
@@ -1,305 +0,0 @@
-google.cloud.notebooks.v1beta1.Environment
- */
-class Environment extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. Name of this environment.
- * Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $name = '';
- /**
- * Display name of this environment for the UI.
- *
- * Generated from protobuf field string display_name = 2;
- */
- private $display_name = '';
- /**
- * A brief description of this environment.
- *
- * Generated from protobuf field string description = 3;
- */
- private $description = '';
- /**
- * 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"`
- *
- * Generated from protobuf field string post_startup_script = 8;
- */
- private $post_startup_script = '';
- /**
- * Output only. The time at which this environment was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $create_time = null;
- protected $image_type;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Output only. Name of this environment.
- * Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- * @type string $display_name
- * Display name of this environment for the UI.
- * @type string $description
- * A brief description of this environment.
- * @type \Google\Cloud\Notebooks\V1beta1\VmImage $vm_image
- * Use a Compute Engine VM image to start the notebook instance.
- * @type \Google\Cloud\Notebooks\V1beta1\ContainerImage $container_image
- * Use a container image to start the notebook instance.
- * @type string $post_startup_script
- * 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"`
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time at which this environment was created.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Environment::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. Name of this environment.
- * Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Output only. Name of this environment.
- * Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Display name of this environment for the UI.
- *
- * Generated from protobuf field string display_name = 2;
- * @return string
- */
- public function getDisplayName()
- {
- return $this->display_name;
- }
-
- /**
- * Display name of this environment for the UI.
- *
- * Generated from protobuf field string display_name = 2;
- * @param string $var
- * @return $this
- */
- public function setDisplayName($var)
- {
- GPBUtil::checkString($var, True);
- $this->display_name = $var;
-
- return $this;
- }
-
- /**
- * A brief description of this environment.
- *
- * Generated from protobuf field string description = 3;
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * A brief description of this environment.
- *
- * Generated from protobuf field string description = 3;
- * @param string $var
- * @return $this
- */
- public function setDescription($var)
- {
- GPBUtil::checkString($var, True);
- $this->description = $var;
-
- return $this;
- }
-
- /**
- * Use a Compute Engine VM image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.VmImage vm_image = 6;
- * @return \Google\Cloud\Notebooks\V1beta1\VmImage|null
- */
- public function getVmImage()
- {
- return $this->readOneof(6);
- }
-
- public function hasVmImage()
- {
- return $this->hasOneof(6);
- }
-
- /**
- * Use a Compute Engine VM image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.VmImage vm_image = 6;
- * @param \Google\Cloud\Notebooks\V1beta1\VmImage $var
- * @return $this
- */
- public function setVmImage($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\VmImage::class);
- $this->writeOneof(6, $var);
-
- return $this;
- }
-
- /**
- * Use a container image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ContainerImage container_image = 7;
- * @return \Google\Cloud\Notebooks\V1beta1\ContainerImage|null
- */
- public function getContainerImage()
- {
- return $this->readOneof(7);
- }
-
- public function hasContainerImage()
- {
- return $this->hasOneof(7);
- }
-
- /**
- * Use a container image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ContainerImage container_image = 7;
- * @param \Google\Cloud\Notebooks\V1beta1\ContainerImage $var
- * @return $this
- */
- public function setContainerImage($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\ContainerImage::class);
- $this->writeOneof(7, $var);
-
- 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"`
- *
- * Generated from protobuf field string post_startup_script = 8;
- * @return string
- */
- public function getPostStartupScript()
- {
- return $this->post_startup_script;
- }
-
- /**
- * 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"`
- *
- * Generated from protobuf field string post_startup_script = 8;
- * @param string $var
- * @return $this
- */
- public function setPostStartupScript($var)
- {
- GPBUtil::checkString($var, True);
- $this->post_startup_script = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time at which this environment was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time at which this environment was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getImageType()
- {
- return $this->whichOneof("image_type");
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/Gapic/NotebookServiceGapicClient.php b/Notebooks/src/V1beta1/Gapic/NotebookServiceGapicClient.php
deleted file mode 100644
index beaea9086cc7..000000000000
--- a/Notebooks/src/V1beta1/Gapic/NotebookServiceGapicClient.php
+++ /dev/null
@@ -1,1955 +0,0 @@
-createEnvironment($parent, $environmentId, $environment);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->createEnvironment($parent, $environmentId, $environment);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'createEnvironment');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * 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 parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class NotebookServiceGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.notebooks.v1beta1.NotebookService';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'notebooks.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'notebooks.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $environmentNameTemplate;
-
- private static $instanceNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/notebook_service_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/notebook_service_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/notebook_service_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/notebook_service_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getEnvironmentNameTemplate()
- {
- if (self::$environmentNameTemplate == null) {
- self::$environmentNameTemplate = new PathTemplate('projects/{project}/environments/{environment}');
- }
-
- return self::$environmentNameTemplate;
- }
-
- private static function getInstanceNameTemplate()
- {
- if (self::$instanceNameTemplate == null) {
- self::$instanceNameTemplate = new PathTemplate('projects/{project}/instances/{instance}');
- }
-
- return self::$instanceNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'environment' => self::getEnvironmentNameTemplate(),
- 'instance' => self::getInstanceNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a environment
- * resource.
- *
- * @param string $project
- * @param string $environment
- *
- * @return string The formatted environment resource.
- *
- * @experimental
- */
- public static function environmentName($project, $environment)
- {
- return self::getEnvironmentNameTemplate()->render([
- 'project' => $project,
- 'environment' => $environment,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a instance
- * resource.
- *
- * @param string $project
- * @param string $instance
- *
- * @return string The formatted instance resource.
- *
- * @experimental
- */
- public static function instanceName($project, $instance)
- {
- return self::getInstanceNameTemplate()->render([
- 'project' => $project,
- 'instance' => $instance,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - environment: projects/{project}/environments/{environment}
- * - instance: projects/{project}/instances/{instance}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'notebooks.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Creates a new Environment.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $parent = 'parent';
- * $environmentId = 'environment_id';
- * $environment = new Environment();
- * $operationResponse = $notebookServiceClient->createEnvironment($parent, $environmentId, $environment);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->createEnvironment($parent, $environmentId, $environment);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'createEnvironment');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. Format: `projects/{project_id}/locations/{location}`
- * @param string $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.
- * @param Environment $environment Required. The environment to be created.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createEnvironment($parent, $environmentId, $environment, array $optionalArgs = [])
- {
- $request = new CreateEnvironmentRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setEnvironmentId($environmentId);
- $request->setEnvironment($environment);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a new Instance in a given project and location.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $parent = 'parent';
- * $instanceId = 'instance_id';
- * $instance = new Instance();
- * $operationResponse = $notebookServiceClient->createInstance($parent, $instanceId, $instance);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->createInstance($parent, $instanceId, $instance);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'createInstance');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- * @param string $instanceId Required. User-defined unique ID of this instance.
- * @param Instance $instance Required. The instance to be created.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createInstance($parent, $instanceId, $instance, array $optionalArgs = [])
- {
- $request = new CreateInstanceRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setInstanceId($instanceId);
- $request->setInstance($instance);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateInstance', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single Environment.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $operationResponse = $notebookServiceClient->deleteEnvironment($name);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->deleteEnvironment($name);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'deleteEnvironment');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteEnvironment($name, array $optionalArgs = [])
- {
- $request = new DeleteEnvironmentRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single Instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $operationResponse = $notebookServiceClient->deleteInstance($name);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->deleteInstance($name);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'deleteInstance');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteInstance($name, array $optionalArgs = [])
- {
- $request = new DeleteInstanceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteInstance', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets details of a single Environment.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $response = $notebookServiceClient->getEnvironment($name);
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Notebooks\V1beta1\Environment
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getEnvironment($name, array $optionalArgs = [])
- {
- $request = new GetEnvironmentRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetEnvironment', Environment::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets details of a single Instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $response = $notebookServiceClient->getInstance($name);
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Notebooks\V1beta1\Instance
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getInstance($name, array $optionalArgs = [])
- {
- $request = new GetInstanceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetInstance', Instance::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Check if a notebook instance is upgradable.
- * Deprecated. Please consider using v1.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $notebookInstance = 'notebook_instance';
- * $response = $notebookServiceClient->isInstanceUpgradeable($notebookInstance);
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $notebookInstance Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Notebooks\V1beta1\IsInstanceUpgradeableResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- *
- * @deprecated This method will be removed in the next major version update.
- */
- public function isInstanceUpgradeable($notebookInstance, array $optionalArgs = [])
- {
- $request = new IsInstanceUpgradeableRequest();
- $requestParamHeaders = [];
- $request->setNotebookInstance($notebookInstance);
- $requestParamHeaders['notebook_instance'] = $notebookInstance;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('IsInstanceUpgradeable', IsInstanceUpgradeableResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists environments in a project.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $parent = 'parent';
- * // Iterate over pages of elements
- * $pagedResponse = $notebookServiceClient->listEnvironments($parent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $notebookServiceClient->listEnvironments($parent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. Format: `projects/{project_id}/locations/{location}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listEnvironments($parent, array $optionalArgs = [])
- {
- $request = new ListEnvironmentsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListEnvironments', $optionalArgs, ListEnvironmentsResponse::class, $request);
- }
-
- /**
- * Lists instances in a given project and location.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $parent = 'parent';
- * // Iterate over pages of elements
- * $pagedResponse = $notebookServiceClient->listInstances($parent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $notebookServiceClient->listInstances($parent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listInstances($parent, array $optionalArgs = [])
- {
- $request = new ListInstancesRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListInstances', $optionalArgs, ListInstancesResponse::class, $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.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $parent = 'parent';
- * $instanceId = 'instance_id';
- * $operationResponse = $notebookServiceClient->registerInstance($parent, $instanceId);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->registerInstance($parent, $instanceId);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'registerInstance');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- * @param string $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.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function registerInstance($parent, $instanceId, array $optionalArgs = [])
- {
- $request = new RegisterInstanceRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setInstanceId($instanceId);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('RegisterInstance', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * 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:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $vmId = 'vm_id';
- * $operationResponse = $notebookServiceClient->reportInstanceInfo($name, $vmId);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->reportInstanceInfo($name, $vmId);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'reportInstanceInfo');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param string $vmId Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- * @param array $optionalArgs {
- * Optional.
- *
- * @type array $metadata
- * The metadata reported to Notebooks API. This will be merged to the instance
- * metadata store
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function reportInstanceInfo($name, $vmId, array $optionalArgs = [])
- {
- $request = new ReportInstanceInfoRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setVmId($vmId);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['metadata'])) {
- $request->setMetadata($optionalArgs['metadata']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('ReportInstanceInfo', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Resets a notebook instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $operationResponse = $notebookServiceClient->resetInstance($name);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->resetInstance($name);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'resetInstance');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function resetInstance($name, array $optionalArgs = [])
- {
- $request = new ResetInstanceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('ResetInstance', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the guest accelerators of a single Instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED;
- * $coreCount = 0;
- * $operationResponse = $notebookServiceClient->setInstanceAccelerator($name, $type, $coreCount);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->setInstanceAccelerator($name, $type, $coreCount);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'setInstanceAccelerator');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param int $type Required. Type of this accelerator.
- * For allowed values, use constants defined on {@see \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorType}
- * @param int $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.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setInstanceAccelerator($name, $type, $coreCount, array $optionalArgs = [])
- {
- $request = new SetInstanceAcceleratorRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setType($type);
- $request->setCoreCount($coreCount);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('SetInstanceAccelerator', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the labels of an Instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $operationResponse = $notebookServiceClient->setInstanceLabels($name);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->setInstanceLabels($name);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'setInstanceLabels');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type array $labels
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setInstanceLabels($name, array $optionalArgs = [])
- {
- $request = new SetInstanceLabelsRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['labels'])) {
- $request->setLabels($optionalArgs['labels']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('SetInstanceLabels', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the machine type of a single Instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $machineType = 'machine_type';
- * $operationResponse = $notebookServiceClient->setInstanceMachineType($name, $machineType);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->setInstanceMachineType($name, $machineType);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'setInstanceMachineType');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param string $machineType Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types).
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setInstanceMachineType($name, $machineType, array $optionalArgs = [])
- {
- $request = new SetInstanceMachineTypeRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setMachineType($machineType);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('SetInstanceMachineType', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Starts a notebook instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $operationResponse = $notebookServiceClient->startInstance($name);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->startInstance($name);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'startInstance');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function startInstance($name, array $optionalArgs = [])
- {
- $request = new StartInstanceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('StartInstance', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Stops a notebook instance.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $operationResponse = $notebookServiceClient->stopInstance($name);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->stopInstance($name);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'stopInstance');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function stopInstance($name, array $optionalArgs = [])
- {
- $request = new StopInstanceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('StopInstance', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Upgrades a notebook instance to the latest version.
- * Deprecated. Please consider using v1.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $operationResponse = $notebookServiceClient->upgradeInstance($name);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->upgradeInstance($name);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'upgradeInstance');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- *
- * @deprecated This method will be removed in the next major version update.
- */
- public function upgradeInstance($name, array $optionalArgs = [])
- {
- $request = new UpgradeInstanceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpgradeInstance', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Allows notebook instances to
- * call this endpoint to upgrade themselves. Do not use this method directly.
- * Deprecated. Please consider using v1.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $name = 'name';
- * $vmId = 'vm_id';
- * $operationResponse = $notebookServiceClient->upgradeInstanceInternal($name, $vmId);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $notebookServiceClient->upgradeInstanceInternal($name, $vmId);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'upgradeInstanceInternal');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @param string $vmId Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- *
- * @deprecated This method will be removed in the next major version update.
- */
- public function upgradeInstanceInternal($name, $vmId, array $optionalArgs = [])
- {
- $request = new UpgradeInstanceInternalRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setVmId($vmId);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpgradeInstanceInternal', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets information about a location.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $response = $notebookServiceClient->getLocation();
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * Resource name for the location.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Location\Location
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getLocation(array $optionalArgs = [])
- {
- $request = new GetLocationRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait();
- }
-
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * // Iterate over pages of elements
- * $pagedResponse = $notebookServiceClient->listLocations();
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $notebookServiceClient->listLocations();
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * The resource that owns the locations collection, if applicable.
- * @type string $filter
- * The standard list filter.
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listLocations(array $optionalArgs = [])
- {
- $request = new ListLocationsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations');
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $resource = 'resource';
- * $response = $notebookServiceClient->getIamPolicy($resource);
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $notebookServiceClient->setIamPolicy($resource, $policy);
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $notebookServiceClient = new NotebookServiceClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $notebookServiceClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $notebookServiceClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/Notebooks/src/V1beta1/GetEnvironmentRequest.php b/Notebooks/src/V1beta1/GetEnvironmentRequest.php
deleted file mode 100644
index 9ef6dcb4c521..000000000000
--- a/Notebooks/src/V1beta1/GetEnvironmentRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.GetEnvironmentRequest
- */
-class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/environments/{environment_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/GetInstanceRequest.php b/Notebooks/src/V1beta1/GetInstanceRequest.php
deleted file mode 100644
index 8a3ea2a489cb..000000000000
--- a/Notebooks/src/V1beta1/GetInstanceRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.GetInstanceRequest
- */
-class GetInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/Instance.php b/Notebooks/src/V1beta1/Instance.php
deleted file mode 100644
index 9ac03c2d5999..000000000000
--- a/Notebooks/src/V1beta1/Instance.php
+++ /dev/null
@@ -1,1268 +0,0 @@
-google.cloud.notebooks.v1beta1.Instance
- */
-class Instance extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The name of this notebook instance. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $name = '';
- /**
- * 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`).
- *
- * Generated from protobuf field string post_startup_script = 4;
- */
- private $post_startup_script = '';
- /**
- * Output only. The proxy endpoint that is used to access the Jupyter notebook.
- *
- * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $proxy_uri = '';
- /**
- * 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.
- *
- * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $instance_owners;
- /**
- * 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.
- *
- * Generated from protobuf field string service_account = 7;
- */
- private $service_account = '';
- /**
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types) of this
- * instance.
- *
- * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];
- */
- private $machine_type = '';
- /**
- * 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](https://cloud.google.com/compute/docs/gpus/#gpus-list).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9;
- */
- private $accelerator_config = null;
- /**
- * Output only. The state of this instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $state = 0;
- /**
- * 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.
- *
- * Generated from protobuf field bool install_gpu_driver = 11;
- */
- private $install_gpu_driver = false;
- /**
- * Specify a custom Cloud Storage path where the GPU driver is stored.
- * If not specified, we'll automatically choose from official GPU drivers.
- *
- * Generated from protobuf field string custom_gpu_driver_path = 12;
- */
- private $custom_gpu_driver_path = '';
- /**
- * Input only. The type of the boot disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $boot_disk_type = 0;
- /**
- * 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.
- *
- * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $boot_disk_size_gb = 0;
- /**
- * Input only. The type of the data disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $data_disk_type = 0;
- /**
- * 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.
- *
- * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $data_disk_size_gb = 0;
- /**
- * Input only. If true, the data disk will not be auto deleted when deleting the instance.
- *
- * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $no_remove_data_disk = false;
- /**
- * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $disk_encryption = 0;
- /**
- * 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](https://cloud.google.com/kms/docs/quickstart).
- *
- * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];
- */
- private $kms_key = '';
- /**
- * If true, no public IP will be assigned to this instance.
- *
- * Generated from protobuf field bool no_public_ip = 17;
- */
- private $no_public_ip = false;
- /**
- * If true, the notebook instance will not register with the proxy.
- *
- * Generated from protobuf field bool no_proxy_access = 18;
- */
- private $no_proxy_access = false;
- /**
- * The name of the VPC that this instance is in.
- * Format:
- * `projects/{project_id}/global/networks/{network_id}`
- *
- * Generated from protobuf field string network = 19;
- */
- private $network = '';
- /**
- * The name of the subnet that this instance is in.
- * Format:
- * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
- *
- * Generated from protobuf field string subnet = 20;
- */
- private $subnet = '';
- /**
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method.
- *
- * Generated from protobuf field map labels = 21;
- */
- private $labels;
- /**
- * Custom metadata to apply to this instance.
- *
- * Generated from protobuf field map metadata = 22;
- */
- private $metadata;
- /**
- * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
- * VirtioNet.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $nic_type = 0;
- /**
- * 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.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $reservation_affinity = null;
- /**
- * Optional. Flag to enable ip forwarding or not, default false/off.
- * https://cloud.google.com/vpc/docs/using-routes#canipforward
- *
- * Generated from protobuf field bool can_ip_forward = 31 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $can_ip_forward = false;
- /**
- * Output only. Instance creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $create_time = null;
- /**
- * Output only. Instance update time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $update_time = null;
- protected $environment;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Output only. The name of this notebook instance. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @type \Google\Cloud\Notebooks\V1beta1\VmImage $vm_image
- * Use a Compute Engine VM image to start the notebook instance.
- * @type \Google\Cloud\Notebooks\V1beta1\ContainerImage $container_image
- * Use a container image to start the notebook instance.
- * @type string $post_startup_script
- * 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`).
- * @type string $proxy_uri
- * Output only. The proxy endpoint that is used to access the Jupyter notebook.
- * @type array|\Google\Protobuf\Internal\RepeatedField $instance_owners
- * 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.
- * @type string $service_account
- * 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.
- * @type string $machine_type
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types) of this
- * instance.
- * @type \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorConfig $accelerator_config
- * 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](https://cloud.google.com/compute/docs/gpus/#gpus-list).
- * @type int $state
- * Output only. The state of this instance.
- * @type bool $install_gpu_driver
- * 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.
- * @type string $custom_gpu_driver_path
- * Specify a custom Cloud Storage path where the GPU driver is stored.
- * If not specified, we'll automatically choose from official GPU drivers.
- * @type int $boot_disk_type
- * Input only. The type of the boot disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- * @type int|string $boot_disk_size_gb
- * 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.
- * @type int $data_disk_type
- * Input only. The type of the data disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- * @type int|string $data_disk_size_gb
- * 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.
- * @type bool $no_remove_data_disk
- * Input only. If true, the data disk will not be auto deleted when deleting the instance.
- * @type int $disk_encryption
- * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
- * @type string $kms_key
- * 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](https://cloud.google.com/kms/docs/quickstart).
- * @type bool $no_public_ip
- * If true, no public IP will be assigned to this instance.
- * @type bool $no_proxy_access
- * If true, the notebook instance will not register with the proxy.
- * @type string $network
- * The name of the VPC that this instance is in.
- * Format:
- * `projects/{project_id}/global/networks/{network_id}`
- * @type string $subnet
- * The name of the subnet that this instance is in.
- * Format:
- * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method.
- * @type array|\Google\Protobuf\Internal\MapField $metadata
- * Custom metadata to apply to this instance.
- * @type int $nic_type
- * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
- * VirtioNet.
- * @type \Google\Cloud\Notebooks\V1beta1\ReservationAffinity $reservation_affinity
- * 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.
- * @type bool $can_ip_forward
- * Optional. Flag to enable ip forwarding or not, default false/off.
- * https://cloud.google.com/vpc/docs/using-routes#canipforward
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. Instance creation time.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. Instance update time.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Instance::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. The name of this notebook instance. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Output only. The name of this notebook instance. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Use a Compute Engine VM image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.VmImage vm_image = 2;
- * @return \Google\Cloud\Notebooks\V1beta1\VmImage|null
- */
- public function getVmImage()
- {
- return $this->readOneof(2);
- }
-
- public function hasVmImage()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * Use a Compute Engine VM image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.VmImage vm_image = 2;
- * @param \Google\Cloud\Notebooks\V1beta1\VmImage $var
- * @return $this
- */
- public function setVmImage($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\VmImage::class);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * Use a container image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;
- * @return \Google\Cloud\Notebooks\V1beta1\ContainerImage|null
- */
- public function getContainerImage()
- {
- return $this->readOneof(3);
- }
-
- public function hasContainerImage()
- {
- return $this->hasOneof(3);
- }
-
- /**
- * Use a container image to start the notebook instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;
- * @param \Google\Cloud\Notebooks\V1beta1\ContainerImage $var
- * @return $this
- */
- public function setContainerImage($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\ContainerImage::class);
- $this->writeOneof(3, $var);
-
- 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`).
- *
- * Generated from protobuf field string post_startup_script = 4;
- * @return string
- */
- public function getPostStartupScript()
- {
- return $this->post_startup_script;
- }
-
- /**
- * 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`).
- *
- * Generated from protobuf field string post_startup_script = 4;
- * @param string $var
- * @return $this
- */
- public function setPostStartupScript($var)
- {
- GPBUtil::checkString($var, True);
- $this->post_startup_script = $var;
-
- return $this;
- }
-
- /**
- * Output only. The proxy endpoint that is used to access the Jupyter notebook.
- *
- * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getProxyUri()
- {
- return $this->proxy_uri;
- }
-
- /**
- * Output only. The proxy endpoint that is used to access the Jupyter notebook.
- *
- * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setProxyUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->proxy_uri = $var;
-
- 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.
- *
- * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getInstanceOwners()
- {
- return $this->instance_owners;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setInstanceOwners($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->instance_owners = $arr;
-
- 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.
- *
- * Generated from protobuf field string service_account = 7;
- * @return string
- */
- public function getServiceAccount()
- {
- return $this->service_account;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field string service_account = 7;
- * @param string $var
- * @return $this
- */
- public function setServiceAccount($var)
- {
- GPBUtil::checkString($var, True);
- $this->service_account = $var;
-
- return $this;
- }
-
- /**
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types) of this
- * instance.
- *
- * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getMachineType()
- {
- return $this->machine_type;
- }
-
- /**
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types) of this
- * instance.
- *
- * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setMachineType($var)
- {
- GPBUtil::checkString($var, True);
- $this->machine_type = $var;
-
- 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](https://cloud.google.com/compute/docs/gpus/#gpus-list).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9;
- * @return \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorConfig|null
- */
- public function getAcceleratorConfig()
- {
- return $this->accelerator_config;
- }
-
- public function hasAcceleratorConfig()
- {
- return isset($this->accelerator_config);
- }
-
- public function clearAcceleratorConfig()
- {
- unset($this->accelerator_config);
- }
-
- /**
- * 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](https://cloud.google.com/compute/docs/gpus/#gpus-list).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9;
- * @param \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorConfig $var
- * @return $this
- */
- public function setAcceleratorConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorConfig::class);
- $this->accelerator_config = $var;
-
- return $this;
- }
-
- /**
- * Output only. The state of this instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The state of this instance.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\State::class);
- $this->state = $var;
-
- 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.
- *
- * Generated from protobuf field bool install_gpu_driver = 11;
- * @return bool
- */
- public function getInstallGpuDriver()
- {
- return $this->install_gpu_driver;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field bool install_gpu_driver = 11;
- * @param bool $var
- * @return $this
- */
- public function setInstallGpuDriver($var)
- {
- GPBUtil::checkBool($var);
- $this->install_gpu_driver = $var;
-
- 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.
- *
- * Generated from protobuf field string custom_gpu_driver_path = 12;
- * @return string
- */
- public function getCustomGpuDriverPath()
- {
- return $this->custom_gpu_driver_path;
- }
-
- /**
- * Specify a custom Cloud Storage path where the GPU driver is stored.
- * If not specified, we'll automatically choose from official GPU drivers.
- *
- * Generated from protobuf field string custom_gpu_driver_path = 12;
- * @param string $var
- * @return $this
- */
- public function setCustomGpuDriverPath($var)
- {
- GPBUtil::checkString($var, True);
- $this->custom_gpu_driver_path = $var;
-
- return $this;
- }
-
- /**
- * Input only. The type of the boot disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return int
- */
- public function getBootDiskType()
- {
- return $this->boot_disk_type;
- }
-
- /**
- * Input only. The type of the boot disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setBootDiskType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\DiskType::class);
- $this->boot_disk_type = $var;
-
- return $this;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return int|string
- */
- public function getBootDiskSizeGb()
- {
- return $this->boot_disk_size_gb;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param int|string $var
- * @return $this
- */
- public function setBootDiskSizeGb($var)
- {
- GPBUtil::checkInt64($var);
- $this->boot_disk_size_gb = $var;
-
- return $this;
- }
-
- /**
- * Input only. The type of the data disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return int
- */
- public function getDataDiskType()
- {
- return $this->data_disk_type;
- }
-
- /**
- * Input only. The type of the data disk attached to this instance, defaults to
- * standard persistent disk (`PD_STANDARD`).
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setDataDiskType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\DiskType::class);
- $this->data_disk_type = $var;
-
- return $this;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return int|string
- */
- public function getDataDiskSizeGb()
- {
- return $this->data_disk_size_gb;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param int|string $var
- * @return $this
- */
- public function setDataDiskSizeGb($var)
- {
- GPBUtil::checkInt64($var);
- $this->data_disk_size_gb = $var;
-
- return $this;
- }
-
- /**
- * Input only. If true, the data disk will not be auto deleted when deleting the instance.
- *
- * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return bool
- */
- public function getNoRemoveDataDisk()
- {
- return $this->no_remove_data_disk;
- }
-
- /**
- * Input only. If true, the data disk will not be auto deleted when deleting the instance.
- *
- * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param bool $var
- * @return $this
- */
- public function setNoRemoveDataDisk($var)
- {
- GPBUtil::checkBool($var);
- $this->no_remove_data_disk = $var;
-
- return $this;
- }
-
- /**
- * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return int
- */
- public function getDiskEncryption()
- {
- return $this->disk_encryption;
- }
-
- /**
- * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setDiskEncryption($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\DiskEncryption::class);
- $this->disk_encryption = $var;
-
- 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](https://cloud.google.com/kms/docs/quickstart).
- *
- * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];
- * @return string
- */
- public function getKmsKey()
- {
- return $this->kms_key;
- }
-
- /**
- * 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](https://cloud.google.com/kms/docs/quickstart).
- *
- * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setKmsKey($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key = $var;
-
- return $this;
- }
-
- /**
- * If true, no public IP will be assigned to this instance.
- *
- * Generated from protobuf field bool no_public_ip = 17;
- * @return bool
- */
- public function getNoPublicIp()
- {
- return $this->no_public_ip;
- }
-
- /**
- * If true, no public IP will be assigned to this instance.
- *
- * Generated from protobuf field bool no_public_ip = 17;
- * @param bool $var
- * @return $this
- */
- public function setNoPublicIp($var)
- {
- GPBUtil::checkBool($var);
- $this->no_public_ip = $var;
-
- return $this;
- }
-
- /**
- * If true, the notebook instance will not register with the proxy.
- *
- * Generated from protobuf field bool no_proxy_access = 18;
- * @return bool
- */
- public function getNoProxyAccess()
- {
- return $this->no_proxy_access;
- }
-
- /**
- * If true, the notebook instance will not register with the proxy.
- *
- * Generated from protobuf field bool no_proxy_access = 18;
- * @param bool $var
- * @return $this
- */
- public function setNoProxyAccess($var)
- {
- GPBUtil::checkBool($var);
- $this->no_proxy_access = $var;
-
- return $this;
- }
-
- /**
- * The name of the VPC that this instance is in.
- * Format:
- * `projects/{project_id}/global/networks/{network_id}`
- *
- * Generated from protobuf field string network = 19;
- * @return string
- */
- public function getNetwork()
- {
- return $this->network;
- }
-
- /**
- * The name of the VPC that this instance is in.
- * Format:
- * `projects/{project_id}/global/networks/{network_id}`
- *
- * Generated from protobuf field string network = 19;
- * @param string $var
- * @return $this
- */
- public function setNetwork($var)
- {
- GPBUtil::checkString($var, True);
- $this->network = $var;
-
- return $this;
- }
-
- /**
- * The name of the subnet that this instance is in.
- * Format:
- * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
- *
- * Generated from protobuf field string subnet = 20;
- * @return string
- */
- public function getSubnet()
- {
- return $this->subnet;
- }
-
- /**
- * The name of the subnet that this instance is in.
- * Format:
- * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
- *
- * Generated from protobuf field string subnet = 20;
- * @param string $var
- * @return $this
- */
- public function setSubnet($var)
- {
- GPBUtil::checkString($var, True);
- $this->subnet = $var;
-
- return $this;
- }
-
- /**
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method.
- *
- * Generated from protobuf field map labels = 21;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method.
- *
- * Generated from protobuf field map labels = 21;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLabels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->labels = $arr;
-
- return $this;
- }
-
- /**
- * Custom metadata to apply to this instance.
- *
- * Generated from protobuf field map metadata = 22;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- /**
- * Custom metadata to apply to this instance.
- *
- * Generated from protobuf field map metadata = 22;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setMetadata($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->metadata = $arr;
-
- return $this;
- }
-
- /**
- * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
- * VirtioNet.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getNicType()
- {
- return $this->nic_type;
- }
-
- /**
- * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
- * VirtioNet.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setNicType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\NicType::class);
- $this->nic_type = $var;
-
- 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.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Cloud\Notebooks\V1beta1\ReservationAffinity|null
- */
- public function getReservationAffinity()
- {
- return $this->reservation_affinity;
- }
-
- public function hasReservationAffinity()
- {
- return isset($this->reservation_affinity);
- }
-
- public function clearReservationAffinity()
- {
- unset($this->reservation_affinity);
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL];
- * @param \Google\Cloud\Notebooks\V1beta1\ReservationAffinity $var
- * @return $this
- */
- public function setReservationAffinity($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1beta1\ReservationAffinity::class);
- $this->reservation_affinity = $var;
-
- return $this;
- }
-
- /**
- * Optional. Flag to enable ip forwarding or not, default false/off.
- * https://cloud.google.com/vpc/docs/using-routes#canipforward
- *
- * Generated from protobuf field bool can_ip_forward = 31 [(.google.api.field_behavior) = OPTIONAL];
- * @return bool
- */
- public function getCanIpForward()
- {
- return $this->can_ip_forward;
- }
-
- /**
- * Optional. Flag to enable ip forwarding or not, default false/off.
- * https://cloud.google.com/vpc/docs/using-routes#canipforward
- *
- * Generated from protobuf field bool can_ip_forward = 31 [(.google.api.field_behavior) = OPTIONAL];
- * @param bool $var
- * @return $this
- */
- public function setCanIpForward($var)
- {
- GPBUtil::checkBool($var);
- $this->can_ip_forward = $var;
-
- return $this;
- }
-
- /**
- * Output only. Instance creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. Instance creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. Instance update time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. Instance update time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getEnvironment()
- {
- return $this->whichOneof("environment");
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/Instance/AcceleratorConfig.php b/Notebooks/src/V1beta1/Instance/AcceleratorConfig.php
deleted file mode 100644
index eed28d9c42ec..000000000000
--- a/Notebooks/src/V1beta1/Instance/AcceleratorConfig.php
+++ /dev/null
@@ -1,107 +0,0 @@
-google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig
- */
-class AcceleratorConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Type of this accelerator.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;
- */
- private $type = 0;
- /**
- * Count of cores of this accelerator.
- *
- * Generated from protobuf field int64 core_count = 2;
- */
- private $core_count = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $type
- * Type of this accelerator.
- * @type int|string $core_count
- * Count of cores of this accelerator.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Instance::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Type of this accelerator.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Type of this accelerator.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorType::class);
- $this->type = $var;
-
- return $this;
- }
-
- /**
- * Count of cores of this accelerator.
- *
- * Generated from protobuf field int64 core_count = 2;
- * @return int|string
- */
- public function getCoreCount()
- {
- return $this->core_count;
- }
-
- /**
- * Count of cores of this accelerator.
- *
- * Generated from protobuf field int64 core_count = 2;
- * @param int|string $var
- * @return $this
- */
- public function setCoreCount($var)
- {
- GPBUtil::checkInt64($var);
- $this->core_count = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AcceleratorConfig::class, \Google\Cloud\Notebooks\V1beta1\Instance_AcceleratorConfig::class);
-
diff --git a/Notebooks/src/V1beta1/Instance/AcceleratorType.php b/Notebooks/src/V1beta1/Instance/AcceleratorType.php
deleted file mode 100644
index e55d73bbe60e..000000000000
--- a/Notebooks/src/V1beta1/Instance/AcceleratorType.php
+++ /dev/null
@@ -1,121 +0,0 @@
-google.cloud.notebooks.v1beta1.Instance.AcceleratorType
- */
-class AcceleratorType
-{
- /**
- * Accelerator type is not specified.
- *
- * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0;
- */
- const ACCELERATOR_TYPE_UNSPECIFIED = 0;
- /**
- * Accelerator type is Nvidia Tesla K80.
- *
- * Generated from protobuf enum NVIDIA_TESLA_K80 = 1;
- */
- const NVIDIA_TESLA_K80 = 1;
- /**
- * Accelerator type is Nvidia Tesla P100.
- *
- * Generated from protobuf enum NVIDIA_TESLA_P100 = 2;
- */
- const NVIDIA_TESLA_P100 = 2;
- /**
- * Accelerator type is Nvidia Tesla V100.
- *
- * Generated from protobuf enum NVIDIA_TESLA_V100 = 3;
- */
- const NVIDIA_TESLA_V100 = 3;
- /**
- * Accelerator type is Nvidia Tesla P4.
- *
- * Generated from protobuf enum NVIDIA_TESLA_P4 = 4;
- */
- const NVIDIA_TESLA_P4 = 4;
- /**
- * Accelerator type is Nvidia Tesla T4.
- *
- * Generated from protobuf enum NVIDIA_TESLA_T4 = 5;
- */
- const NVIDIA_TESLA_T4 = 5;
- /**
- * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
- *
- * Generated from protobuf enum NVIDIA_TESLA_T4_VWS = 8;
- */
- const NVIDIA_TESLA_T4_VWS = 8;
- /**
- * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
- *
- * Generated from protobuf enum NVIDIA_TESLA_P100_VWS = 9;
- */
- const NVIDIA_TESLA_P100_VWS = 9;
- /**
- * Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
- *
- * Generated from protobuf enum NVIDIA_TESLA_P4_VWS = 10;
- */
- const NVIDIA_TESLA_P4_VWS = 10;
- /**
- * (Coming soon) Accelerator type is TPU V2.
- *
- * Generated from protobuf enum TPU_V2 = 6;
- */
- const TPU_V2 = 6;
- /**
- * (Coming soon) Accelerator type is TPU V3.
- *
- * Generated from protobuf enum TPU_V3 = 7;
- */
- const TPU_V3 = 7;
-
- private static $valueToName = [
- self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED',
- self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80',
- self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100',
- self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100',
- self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4',
- self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4',
- self::NVIDIA_TESLA_T4_VWS => 'NVIDIA_TESLA_T4_VWS',
- self::NVIDIA_TESLA_P100_VWS => 'NVIDIA_TESLA_P100_VWS',
- self::NVIDIA_TESLA_P4_VWS => 'NVIDIA_TESLA_P4_VWS',
- self::TPU_V2 => 'TPU_V2',
- self::TPU_V3 => 'TPU_V3',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V1beta1\Instance_AcceleratorType::class);
-
diff --git a/Notebooks/src/V1beta1/Instance/DiskEncryption.php b/Notebooks/src/V1beta1/Instance/DiskEncryption.php
deleted file mode 100644
index 19b4ee286796..000000000000
--- a/Notebooks/src/V1beta1/Instance/DiskEncryption.php
+++ /dev/null
@@ -1,64 +0,0 @@
-google.cloud.notebooks.v1beta1.Instance.DiskEncryption
- */
-class DiskEncryption
-{
- /**
- * Disk encryption is not specified.
- *
- * Generated from protobuf enum DISK_ENCRYPTION_UNSPECIFIED = 0;
- */
- const DISK_ENCRYPTION_UNSPECIFIED = 0;
- /**
- * Use Google managed encryption keys to encrypt the boot disk.
- *
- * Generated from protobuf enum GMEK = 1;
- */
- const GMEK = 1;
- /**
- * Use customer managed encryption keys to encrypt the boot disk.
- *
- * Generated from protobuf enum CMEK = 2;
- */
- const CMEK = 2;
-
- private static $valueToName = [
- self::DISK_ENCRYPTION_UNSPECIFIED => 'DISK_ENCRYPTION_UNSPECIFIED',
- self::GMEK => 'GMEK',
- self::CMEK => 'CMEK',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DiskEncryption::class, \Google\Cloud\Notebooks\V1beta1\Instance_DiskEncryption::class);
-
diff --git a/Notebooks/src/V1beta1/Instance/DiskType.php b/Notebooks/src/V1beta1/Instance/DiskType.php
deleted file mode 100644
index 6aaa4f75e048..000000000000
--- a/Notebooks/src/V1beta1/Instance/DiskType.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.Instance.DiskType
- */
-class DiskType
-{
- /**
- * Disk type not set.
- *
- * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0;
- */
- const DISK_TYPE_UNSPECIFIED = 0;
- /**
- * Standard persistent disk type.
- *
- * Generated from protobuf enum PD_STANDARD = 1;
- */
- const PD_STANDARD = 1;
- /**
- * SSD persistent disk type.
- *
- * Generated from protobuf enum PD_SSD = 2;
- */
- const PD_SSD = 2;
- /**
- * Balanced persistent disk type.
- *
- * Generated from protobuf enum PD_BALANCED = 3;
- */
- const PD_BALANCED = 3;
-
- private static $valueToName = [
- self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED',
- self::PD_STANDARD => 'PD_STANDARD',
- self::PD_SSD => 'PD_SSD',
- self::PD_BALANCED => 'PD_BALANCED',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(DiskType::class, \Google\Cloud\Notebooks\V1beta1\Instance_DiskType::class);
-
diff --git a/Notebooks/src/V1beta1/Instance/NicType.php b/Notebooks/src/V1beta1/Instance/NicType.php
deleted file mode 100644
index 76b0718710d7..000000000000
--- a/Notebooks/src/V1beta1/Instance/NicType.php
+++ /dev/null
@@ -1,65 +0,0 @@
-google.cloud.notebooks.v1beta1.Instance.NicType
- */
-class NicType
-{
- /**
- * No type specified. Default should be UNSPECIFIED_NIC_TYPE.
- *
- * Generated from protobuf enum UNSPECIFIED_NIC_TYPE = 0;
- */
- const UNSPECIFIED_NIC_TYPE = 0;
- /**
- * VIRTIO. Default in Notebooks DLVM.
- *
- * Generated from protobuf enum VIRTIO_NET = 1;
- */
- const VIRTIO_NET = 1;
- /**
- * GVNIC. Alternative to VIRTIO.
- * https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux
- *
- * Generated from protobuf enum GVNIC = 2;
- */
- const GVNIC = 2;
-
- private static $valueToName = [
- self::UNSPECIFIED_NIC_TYPE => 'UNSPECIFIED_NIC_TYPE',
- self::VIRTIO_NET => 'VIRTIO_NET',
- self::GVNIC => 'GVNIC',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(NicType::class, \Google\Cloud\Notebooks\V1beta1\Instance_NicType::class);
-
diff --git a/Notebooks/src/V1beta1/Instance/State.php b/Notebooks/src/V1beta1/Instance/State.php
deleted file mode 100644
index 96588a90fa9b..000000000000
--- a/Notebooks/src/V1beta1/Instance/State.php
+++ /dev/null
@@ -1,128 +0,0 @@
-google.cloud.notebooks.v1beta1.Instance.State
- */
-class State
-{
- /**
- * State is not specified.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The control logic is starting the instance.
- *
- * Generated from protobuf enum STARTING = 1;
- */
- const STARTING = 1;
- /**
- * The control logic is installing required frameworks and registering the
- * instance with notebook proxy
- *
- * Generated from protobuf enum PROVISIONING = 2;
- */
- const PROVISIONING = 2;
- /**
- * The instance is running.
- *
- * Generated from protobuf enum ACTIVE = 3;
- */
- const ACTIVE = 3;
- /**
- * The control logic is stopping the instance.
- *
- * Generated from protobuf enum STOPPING = 4;
- */
- const STOPPING = 4;
- /**
- * The instance is stopped.
- *
- * Generated from protobuf enum STOPPED = 5;
- */
- const STOPPED = 5;
- /**
- * The instance is deleted.
- *
- * Generated from protobuf enum DELETED = 6;
- */
- const DELETED = 6;
- /**
- * The instance is upgrading.
- *
- * Generated from protobuf enum UPGRADING = 7;
- */
- const UPGRADING = 7;
- /**
- * The instance is being created.
- *
- * Generated from protobuf enum INITIALIZING = 8;
- */
- const INITIALIZING = 8;
- /**
- * The instance is getting registered.
- *
- * Generated from protobuf enum REGISTERING = 9;
- */
- const REGISTERING = 9;
- /**
- * The instance is suspending.
- *
- * Generated from protobuf enum SUSPENDING = 10;
- */
- const SUSPENDING = 10;
- /**
- * The instance is suspended.
- *
- * Generated from protobuf enum SUSPENDED = 11;
- */
- const SUSPENDED = 11;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::STARTING => 'STARTING',
- self::PROVISIONING => 'PROVISIONING',
- self::ACTIVE => 'ACTIVE',
- self::STOPPING => 'STOPPING',
- self::STOPPED => 'STOPPED',
- self::DELETED => 'DELETED',
- self::UPGRADING => 'UPGRADING',
- self::INITIALIZING => 'INITIALIZING',
- self::REGISTERING => 'REGISTERING',
- self::SUSPENDING => 'SUSPENDING',
- self::SUSPENDED => 'SUSPENDED',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Notebooks\V1beta1\Instance_State::class);
-
diff --git a/Notebooks/src/V1beta1/Instance_AcceleratorConfig.php b/Notebooks/src/V1beta1/Instance_AcceleratorConfig.php
deleted file mode 100644
index de47453685b7..000000000000
--- a/Notebooks/src/V1beta1/Instance_AcceleratorConfig.php
+++ /dev/null
@@ -1,16 +0,0 @@
-google.cloud.notebooks.v1beta1.IsInstanceUpgradeableRequest
- */
-class IsInstanceUpgradeableRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $notebook_instance = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $notebook_instance
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getNotebookInstance()
- {
- return $this->notebook_instance;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setNotebookInstance($var)
- {
- GPBUtil::checkString($var, True);
- $this->notebook_instance = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/IsInstanceUpgradeableResponse.php b/Notebooks/src/V1beta1/IsInstanceUpgradeableResponse.php
deleted file mode 100644
index 10584e67e62d..000000000000
--- a/Notebooks/src/V1beta1/IsInstanceUpgradeableResponse.php
+++ /dev/null
@@ -1,181 +0,0 @@
-google.cloud.notebooks.v1beta1.IsInstanceUpgradeableResponse
- */
-class IsInstanceUpgradeableResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * If an instance is upgradeable.
- *
- * Generated from protobuf field bool upgradeable = 1;
- */
- private $upgradeable = false;
- /**
- * The version this instance will be upgraded to if calling the upgrade
- * endpoint. This field will only be populated if field upgradeable is true.
- *
- * Generated from protobuf field string upgrade_version = 2;
- */
- private $upgrade_version = '';
- /**
- * Additional information about upgrade.
- *
- * Generated from protobuf field string upgrade_info = 3;
- */
- private $upgrade_info = '';
- /**
- * 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.
- *
- * Generated from protobuf field string upgrade_image = 4;
- */
- private $upgrade_image = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $upgradeable
- * If an instance is upgradeable.
- * @type string $upgrade_version
- * The version this instance will be upgraded to if calling the upgrade
- * endpoint. This field will only be populated if field upgradeable is true.
- * @type string $upgrade_info
- * Additional information about upgrade.
- * @type string $upgrade_image
- * 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.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If an instance is upgradeable.
- *
- * Generated from protobuf field bool upgradeable = 1;
- * @return bool
- */
- public function getUpgradeable()
- {
- return $this->upgradeable;
- }
-
- /**
- * If an instance is upgradeable.
- *
- * Generated from protobuf field bool upgradeable = 1;
- * @param bool $var
- * @return $this
- */
- public function setUpgradeable($var)
- {
- GPBUtil::checkBool($var);
- $this->upgradeable = $var;
-
- 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.
- *
- * Generated from protobuf field string upgrade_version = 2;
- * @return string
- */
- public function getUpgradeVersion()
- {
- return $this->upgrade_version;
- }
-
- /**
- * The version this instance will be upgraded to if calling the upgrade
- * endpoint. This field will only be populated if field upgradeable is true.
- *
- * Generated from protobuf field string upgrade_version = 2;
- * @param string $var
- * @return $this
- */
- public function setUpgradeVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->upgrade_version = $var;
-
- return $this;
- }
-
- /**
- * Additional information about upgrade.
- *
- * Generated from protobuf field string upgrade_info = 3;
- * @return string
- */
- public function getUpgradeInfo()
- {
- return $this->upgrade_info;
- }
-
- /**
- * Additional information about upgrade.
- *
- * Generated from protobuf field string upgrade_info = 3;
- * @param string $var
- * @return $this
- */
- public function setUpgradeInfo($var)
- {
- GPBUtil::checkString($var, True);
- $this->upgrade_info = $var;
-
- 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.
- *
- * Generated from protobuf field string upgrade_image = 4;
- * @return string
- */
- public function getUpgradeImage()
- {
- return $this->upgrade_image;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field string upgrade_image = 4;
- * @param string $var
- * @return $this
- */
- public function setUpgradeImage($var)
- {
- GPBUtil::checkString($var, True);
- $this->upgrade_image = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/ListEnvironmentsRequest.php b/Notebooks/src/V1beta1/ListEnvironmentsRequest.php
deleted file mode 100644
index b8fe91db9ba8..000000000000
--- a/Notebooks/src/V1beta1/ListEnvironmentsRequest.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.notebooks.v1beta1.ListEnvironmentsRequest
- */
-class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format: `projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $parent = '';
- /**
- * Maximum return size of the list call.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- private $page_size = 0;
- /**
- * A previous returned page token that can be used to continue listing from
- * the last result.
- *
- * Generated from protobuf field string page_token = 3;
- */
- private $page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. Format: `projects/{project_id}/locations/{location}`
- * @type int $page_size
- * Maximum return size of the list call.
- * @type string $page_token
- * A previous returned page token that can be used to continue listing from
- * the last result.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format: `projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. Format: `projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Maximum return size of the list call.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum return size of the list call.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A previous returned page token that can be used to continue listing from
- * the last result.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A previous returned page token that can be used to continue listing from
- * the last result.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/ListEnvironmentsResponse.php b/Notebooks/src/V1beta1/ListEnvironmentsResponse.php
deleted file mode 100644
index ee87b7be12f8..000000000000
--- a/Notebooks/src/V1beta1/ListEnvironmentsResponse.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.notebooks.v1beta1.ListEnvironmentsResponse
- */
-class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of returned environments.
- *
- * Generated from protobuf field repeated .google.cloud.notebooks.v1beta1.Environment environments = 1;
- */
- private $environments;
- /**
- * A page token that can be used to continue listing from the last result
- * in the next list call.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- private $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Notebooks\V1beta1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments
- * A list of returned environments.
- * @type string $next_page_token
- * A page token that can be used to continue listing from the last result
- * in the next list call.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of returned environments.
- *
- * Generated from protobuf field repeated .google.cloud.notebooks.v1beta1.Environment environments = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getEnvironments()
- {
- return $this->environments;
- }
-
- /**
- * A list of returned environments.
- *
- * Generated from protobuf field repeated .google.cloud.notebooks.v1beta1.Environment environments = 1;
- * @param array<\Google\Cloud\Notebooks\V1beta1\Environment>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setEnvironments($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1beta1\Environment::class);
- $this->environments = $arr;
-
- return $this;
- }
-
- /**
- * A page token that can be used to continue listing from the last result
- * in the next list call.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A page token that can be used to continue listing from the last result
- * in the next list call.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/ListInstancesRequest.php b/Notebooks/src/V1beta1/ListInstancesRequest.php
deleted file mode 100644
index 310348badfcd..000000000000
--- a/Notebooks/src/V1beta1/ListInstancesRequest.php
+++ /dev/null
@@ -1,143 +0,0 @@
-google.cloud.notebooks.v1beta1.ListInstancesRequest
- */
-class ListInstancesRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $parent = '';
- /**
- * Maximum return size of the list call.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- private $page_size = 0;
- /**
- * A previous returned page token that can be used to continue listing
- * from the last result.
- *
- * Generated from protobuf field string page_token = 3;
- */
- private $page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- * @type int $page_size
- * Maximum return size of the list call.
- * @type string $page_token
- * A previous returned page token that can be used to continue listing
- * from the last result.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Maximum return size of the list call.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum return size of the list call.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A previous returned page token that can be used to continue listing
- * from the last result.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A previous returned page token that can be used to continue listing
- * from the last result.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/ListInstancesResponse.php b/Notebooks/src/V1beta1/ListInstancesResponse.php
deleted file mode 100644
index 6b00c1039da9..000000000000
--- a/Notebooks/src/V1beta1/ListInstancesResponse.php
+++ /dev/null
@@ -1,147 +0,0 @@
-google.cloud.notebooks.v1beta1.ListInstancesResponse
- */
-class ListInstancesResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of returned instances.
- *
- * Generated from protobuf field repeated .google.cloud.notebooks.v1beta1.Instance instances = 1;
- */
- private $instances;
- /**
- * Page token that can be used to continue listing from the last result in the
- * next list call.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- private $next_page_token = '';
- /**
- * Locations that could not be reached. For example,
- * `['us-west1-a', 'us-central1-b']`.
- * A ListInstancesResponse will only contain either instances or unreachables,
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Notebooks\V1beta1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances
- * A list of returned instances.
- * @type string $next_page_token
- * Page token that can be used to continue listing from the last result in the
- * next list call.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached. For example,
- * `['us-west1-a', 'us-central1-b']`.
- * A ListInstancesResponse will only contain either instances or unreachables,
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of returned instances.
- *
- * Generated from protobuf field repeated .google.cloud.notebooks.v1beta1.Instance instances = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getInstances()
- {
- return $this->instances;
- }
-
- /**
- * A list of returned instances.
- *
- * Generated from protobuf field repeated .google.cloud.notebooks.v1beta1.Instance instances = 1;
- * @param array<\Google\Cloud\Notebooks\V1beta1\Instance>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setInstances($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1beta1\Instance::class);
- $this->instances = $arr;
-
- return $this;
- }
-
- /**
- * Page token that can be used to continue listing from the last result in the
- * next list call.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * Page token that can be used to continue listing from the last result in the
- * next list call.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- 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,
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached. For example,
- * `['us-west1-a', 'us-central1-b']`.
- * A ListInstancesResponse will only contain either instances or unreachables,
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/NotebookServiceClient.php b/Notebooks/src/V1beta1/NotebookServiceClient.php
deleted file mode 100644
index 61cef1ccfde7..000000000000
--- a/Notebooks/src/V1beta1/NotebookServiceClient.php
+++ /dev/null
@@ -1,36 +0,0 @@
-_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/ListInstances',
- $argument,
- ['\Google\Cloud\Notebooks\V1beta1\ListInstancesResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets details of a single Instance.
- * @param \Google\Cloud\Notebooks\V1beta1\GetInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetInstance(\Google\Cloud\Notebooks\V1beta1\GetInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/GetInstance',
- $argument,
- ['\Google\Cloud\Notebooks\V1beta1\Instance', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a new Instance in a given project and location.
- * @param \Google\Cloud\Notebooks\V1beta1\CreateInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CreateInstance(\Google\Cloud\Notebooks\V1beta1\CreateInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/CreateInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * 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.
- * @param \Google\Cloud\Notebooks\V1beta1\RegisterInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function RegisterInstance(\Google\Cloud\Notebooks\V1beta1\RegisterInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/RegisterInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Updates the guest accelerators of a single Instance.
- * @param \Google\Cloud\Notebooks\V1beta1\SetInstanceAcceleratorRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function SetInstanceAccelerator(\Google\Cloud\Notebooks\V1beta1\SetInstanceAcceleratorRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/SetInstanceAccelerator',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Updates the machine type of a single Instance.
- * @param \Google\Cloud\Notebooks\V1beta1\SetInstanceMachineTypeRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function SetInstanceMachineType(\Google\Cloud\Notebooks\V1beta1\SetInstanceMachineTypeRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/SetInstanceMachineType',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Updates the labels of an Instance.
- * @param \Google\Cloud\Notebooks\V1beta1\SetInstanceLabelsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function SetInstanceLabels(\Google\Cloud\Notebooks\V1beta1\SetInstanceLabelsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/SetInstanceLabels',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Deletes a single Instance.
- * @param \Google\Cloud\Notebooks\V1beta1\DeleteInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DeleteInstance(\Google\Cloud\Notebooks\V1beta1\DeleteInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/DeleteInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Starts a notebook instance.
- * @param \Google\Cloud\Notebooks\V1beta1\StartInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function StartInstance(\Google\Cloud\Notebooks\V1beta1\StartInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/StartInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Stops a notebook instance.
- * @param \Google\Cloud\Notebooks\V1beta1\StopInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function StopInstance(\Google\Cloud\Notebooks\V1beta1\StopInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/StopInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Resets a notebook instance.
- * @param \Google\Cloud\Notebooks\V1beta1\ResetInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ResetInstance(\Google\Cloud\Notebooks\V1beta1\ResetInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/ResetInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * 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.
- * @param \Google\Cloud\Notebooks\V1beta1\ReportInstanceInfoRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ReportInstanceInfo(\Google\Cloud\Notebooks\V1beta1\ReportInstanceInfoRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/ReportInstanceInfo',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Check if a notebook instance is upgradable.
- * Deprecated. Please consider using v1.
- * @param \Google\Cloud\Notebooks\V1beta1\IsInstanceUpgradeableRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function IsInstanceUpgradeable(\Google\Cloud\Notebooks\V1beta1\IsInstanceUpgradeableRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/IsInstanceUpgradeable',
- $argument,
- ['\Google\Cloud\Notebooks\V1beta1\IsInstanceUpgradeableResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Upgrades a notebook instance to the latest version.
- * Deprecated. Please consider using v1.
- * @param \Google\Cloud\Notebooks\V1beta1\UpgradeInstanceRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpgradeInstance(\Google\Cloud\Notebooks\V1beta1\UpgradeInstanceRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/UpgradeInstance',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Allows notebook instances to
- * call this endpoint to upgrade themselves. Do not use this method directly.
- * Deprecated. Please consider using v1.
- * @param \Google\Cloud\Notebooks\V1beta1\UpgradeInstanceInternalRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function UpgradeInstanceInternal(\Google\Cloud\Notebooks\V1beta1\UpgradeInstanceInternalRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/UpgradeInstanceInternal',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Lists environments in a project.
- * @param \Google\Cloud\Notebooks\V1beta1\ListEnvironmentsRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function ListEnvironments(\Google\Cloud\Notebooks\V1beta1\ListEnvironmentsRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/ListEnvironments',
- $argument,
- ['\Google\Cloud\Notebooks\V1beta1\ListEnvironmentsResponse', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Gets details of a single Environment.
- * @param \Google\Cloud\Notebooks\V1beta1\GetEnvironmentRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function GetEnvironment(\Google\Cloud\Notebooks\V1beta1\GetEnvironmentRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/GetEnvironment',
- $argument,
- ['\Google\Cloud\Notebooks\V1beta1\Environment', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Creates a new Environment.
- * @param \Google\Cloud\Notebooks\V1beta1\CreateEnvironmentRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function CreateEnvironment(\Google\Cloud\Notebooks\V1beta1\CreateEnvironmentRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/CreateEnvironment',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
- /**
- * Deletes a single Environment.
- * @param \Google\Cloud\Notebooks\V1beta1\DeleteEnvironmentRequest $argument input argument
- * @param array $metadata metadata
- * @param array $options call options
- * @return \Grpc\UnaryCall
- */
- public function DeleteEnvironment(\Google\Cloud\Notebooks\V1beta1\DeleteEnvironmentRequest $argument,
- $metadata = [], $options = []) {
- return $this->_simpleRequest('/google.cloud.notebooks.v1beta1.NotebookService/DeleteEnvironment',
- $argument,
- ['\Google\LongRunning\Operation', 'decode'],
- $metadata, $options);
- }
-
-}
diff --git a/Notebooks/src/V1beta1/OperationMetadata.php b/Notebooks/src/V1beta1/OperationMetadata.php
deleted file mode 100644
index 78056ee2b13a..000000000000
--- a/Notebooks/src/V1beta1/OperationMetadata.php
+++ /dev/null
@@ -1,337 +0,0 @@
-google.cloud.notebooks.v1beta1.OperationMetadata
- */
-class OperationMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
- */
- private $create_time = null;
- /**
- * The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
- */
- private $end_time = null;
- /**
- * Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3;
- */
- private $target = '';
- /**
- * Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4;
- */
- private $verb = '';
- /**
- * Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5;
- */
- private $status_message = '';
- /**
- * 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`.
- *
- * Generated from protobuf field bool requested_cancellation = 6;
- */
- private $requested_cancellation = false;
- /**
- * API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7;
- */
- private $api_version = '';
- /**
- * API endpoint name of this operation.
- *
- * Generated from protobuf field string endpoint = 8;
- */
- private $endpoint = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Timestamp $create_time
- * The time the operation was created.
- * @type \Google\Protobuf\Timestamp $end_time
- * The time the operation finished running.
- * @type string $target
- * Server-defined resource path for the target of the operation.
- * @type string $verb
- * Name of the verb executed by the operation.
- * @type string $status_message
- * Human-readable status of the operation, if any.
- * @type bool $requested_cancellation
- * 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`.
- * @type string $api_version
- * API version used to start the operation.
- * @type string $endpoint
- * API endpoint name of this operation.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3;
- * @return string
- */
- public function getTarget()
- {
- return $this->target;
- }
-
- /**
- * Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3;
- * @param string $var
- * @return $this
- */
- public function setTarget($var)
- {
- GPBUtil::checkString($var, True);
- $this->target = $var;
-
- return $this;
- }
-
- /**
- * Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4;
- * @return string
- */
- public function getVerb()
- {
- return $this->verb;
- }
-
- /**
- * Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4;
- * @param string $var
- * @return $this
- */
- public function setVerb($var)
- {
- GPBUtil::checkString($var, True);
- $this->verb = $var;
-
- return $this;
- }
-
- /**
- * Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5;
- * @return string
- */
- public function getStatusMessage()
- {
- return $this->status_message;
- }
-
- /**
- * Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5;
- * @param string $var
- * @return $this
- */
- public function setStatusMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->status_message = $var;
-
- 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`.
- *
- * Generated from protobuf field bool requested_cancellation = 6;
- * @return bool
- */
- public function getRequestedCancellation()
- {
- return $this->requested_cancellation;
- }
-
- /**
- * 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`.
- *
- * Generated from protobuf field bool requested_cancellation = 6;
- * @param bool $var
- * @return $this
- */
- public function setRequestedCancellation($var)
- {
- GPBUtil::checkBool($var);
- $this->requested_cancellation = $var;
-
- return $this;
- }
-
- /**
- * API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7;
- * @return string
- */
- public function getApiVersion()
- {
- return $this->api_version;
- }
-
- /**
- * API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7;
- * @param string $var
- * @return $this
- */
- public function setApiVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->api_version = $var;
-
- return $this;
- }
-
- /**
- * API endpoint name of this operation.
- *
- * Generated from protobuf field string endpoint = 8;
- * @return string
- */
- public function getEndpoint()
- {
- return $this->endpoint;
- }
-
- /**
- * API endpoint name of this operation.
- *
- * Generated from protobuf field string endpoint = 8;
- * @param string $var
- * @return $this
- */
- public function setEndpoint($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/RegisterInstanceRequest.php b/Notebooks/src/V1beta1/RegisterInstanceRequest.php
deleted file mode 100644
index c45b439d5fdf..000000000000
--- a/Notebooks/src/V1beta1/RegisterInstanceRequest.php
+++ /dev/null
@@ -1,117 +0,0 @@
-google.cloud.notebooks.v1beta1.RegisterInstanceRequest
- */
-class RegisterInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $parent = '';
- /**
- * 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.
- *
- * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $instance_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- * @type string $instance_id
- * 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.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. Format:
- * `parent=projects/{project_id}/locations/{location}`
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- 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.
- *
- * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getInstanceId()
- {
- return $this->instance_id;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setInstanceId($var)
- {
- GPBUtil::checkString($var, True);
- $this->instance_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/ReportInstanceInfoRequest.php b/Notebooks/src/V1beta1/ReportInstanceInfoRequest.php
deleted file mode 100644
index 818400cc9846..000000000000
--- a/Notebooks/src/V1beta1/ReportInstanceInfoRequest.php
+++ /dev/null
@@ -1,147 +0,0 @@
-google.cloud.notebooks.v1beta1.ReportInstanceInfoRequest
- */
-class ReportInstanceInfoRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
- /**
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- *
- * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $vm_id = '';
- /**
- * The metadata reported to Notebooks API. This will be merged to the instance
- * metadata store
- *
- * Generated from protobuf field map metadata = 3;
- */
- private $metadata;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @type string $vm_id
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- * @type array|\Google\Protobuf\Internal\MapField $metadata
- * The metadata reported to Notebooks API. This will be merged to the instance
- * metadata store
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- *
- * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getVmId()
- {
- return $this->vm_id;
- }
-
- /**
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- *
- * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setVmId($var)
- {
- GPBUtil::checkString($var, True);
- $this->vm_id = $var;
-
- return $this;
- }
-
- /**
- * The metadata reported to Notebooks API. This will be merged to the instance
- * metadata store
- *
- * Generated from protobuf field map metadata = 3;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- /**
- * The metadata reported to Notebooks API. This will be merged to the instance
- * metadata store
- *
- * Generated from protobuf field map metadata = 3;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setMetadata($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->metadata = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/ReservationAffinity.php b/Notebooks/src/V1beta1/ReservationAffinity.php
deleted file mode 100644
index eae6b2c387ba..000000000000
--- a/Notebooks/src/V1beta1/ReservationAffinity.php
+++ /dev/null
@@ -1,135 +0,0 @@
-google.cloud.notebooks.v1beta1.ReservationAffinity
- */
-class ReservationAffinity extends \Google\Protobuf\Internal\Message
-{
- /**
- * Optional. Type of reservation to consume
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $consume_reservation_type = 0;
- /**
- * Optional. Corresponds to the label key of reservation resource.
- *
- * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $key = '';
- /**
- * Optional. Corresponds to the label values of reservation resource.
- *
- * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $values;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $consume_reservation_type
- * Optional. Type of reservation to consume
- * @type string $key
- * Optional. Corresponds to the label key of reservation resource.
- * @type array|\Google\Protobuf\Internal\RepeatedField $values
- * Optional. Corresponds to the label values of reservation resource.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Instance::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Optional. Type of reservation to consume
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getConsumeReservationType()
- {
- return $this->consume_reservation_type;
- }
-
- /**
- * Optional. Type of reservation to consume
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setConsumeReservationType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\ReservationAffinity\Type::class);
- $this->consume_reservation_type = $var;
-
- return $this;
- }
-
- /**
- * Optional. Corresponds to the label key of reservation resource.
- *
- * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getKey()
- {
- return $this->key;
- }
-
- /**
- * Optional. Corresponds to the label key of reservation resource.
- *
- * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setKey($var)
- {
- GPBUtil::checkString($var, True);
- $this->key = $var;
-
- return $this;
- }
-
- /**
- * Optional. Corresponds to the label values of reservation resource.
- *
- * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getValues()
- {
- return $this->values;
- }
-
- /**
- * Optional. Corresponds to the label values of reservation resource.
- *
- * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setValues($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->values = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/ReservationAffinity/Type.php b/Notebooks/src/V1beta1/ReservationAffinity/Type.php
deleted file mode 100644
index 6a87d49f0679..000000000000
--- a/Notebooks/src/V1beta1/ReservationAffinity/Type.php
+++ /dev/null
@@ -1,72 +0,0 @@
-google.cloud.notebooks.v1beta1.ReservationAffinity.Type
- */
-class Type
-{
- /**
- * Default type.
- *
- * Generated from protobuf enum TYPE_UNSPECIFIED = 0;
- */
- const TYPE_UNSPECIFIED = 0;
- /**
- * Do not consume from any allocated capacity.
- *
- * Generated from protobuf enum NO_RESERVATION = 1;
- */
- const NO_RESERVATION = 1;
- /**
- * Consume any reservation available.
- *
- * Generated from protobuf enum ANY_RESERVATION = 2;
- */
- const ANY_RESERVATION = 2;
- /**
- * Must consume from a specific reservation. Must specify key value fields
- * for specifying the reservations.
- *
- * Generated from protobuf enum SPECIFIC_RESERVATION = 3;
- */
- const SPECIFIC_RESERVATION = 3;
-
- private static $valueToName = [
- self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
- self::NO_RESERVATION => 'NO_RESERVATION',
- self::ANY_RESERVATION => 'ANY_RESERVATION',
- self::SPECIFIC_RESERVATION => 'SPECIFIC_RESERVATION',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Type::class, \Google\Cloud\Notebooks\V1beta1\ReservationAffinity_Type::class);
-
diff --git a/Notebooks/src/V1beta1/ReservationAffinity_Type.php b/Notebooks/src/V1beta1/ReservationAffinity_Type.php
deleted file mode 100644
index 2b2e258aa3fc..000000000000
--- a/Notebooks/src/V1beta1/ReservationAffinity_Type.php
+++ /dev/null
@@ -1,16 +0,0 @@
-google.cloud.notebooks.v1beta1.ResetInstanceRequest
- */
-class ResetInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/SetInstanceAcceleratorRequest.php b/Notebooks/src/V1beta1/SetInstanceAcceleratorRequest.php
deleted file mode 100644
index 5ae74fadedec..000000000000
--- a/Notebooks/src/V1beta1/SetInstanceAcceleratorRequest.php
+++ /dev/null
@@ -1,151 +0,0 @@
-google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest
- */
-class SetInstanceAcceleratorRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
- /**
- * Required. Type of this accelerator.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $type = 0;
- /**
- * 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.
- *
- * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- private $core_count = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @type int $type
- * Required. Type of this accelerator.
- * @type int|string $core_count
- * 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.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Required. Type of this accelerator.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Required. Type of this accelerator.
- *
- * Generated from protobuf field .google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1beta1\Instance\AcceleratorType::class);
- $this->type = $var;
-
- 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.
- *
- * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return int|string
- */
- public function getCoreCount()
- {
- return $this->core_count;
- }
-
- /**
- * 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.
- *
- * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param int|string $var
- * @return $this
- */
- public function setCoreCount($var)
- {
- GPBUtil::checkInt64($var);
- $this->core_count = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/SetInstanceLabelsRequest.php b/Notebooks/src/V1beta1/SetInstanceLabelsRequest.php
deleted file mode 100644
index bcbaf6d9a6d9..000000000000
--- a/Notebooks/src/V1beta1/SetInstanceLabelsRequest.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest
- */
-class SetInstanceLabelsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
- /**
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method
- *
- * Generated from protobuf field map labels = 2;
- */
- private $labels;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method
- *
- * Generated from protobuf field map labels = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * Labels to apply to this instance.
- * These can be later modified by the setLabels method
- *
- * Generated from protobuf field map labels = 2;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLabels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->labels = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/SetInstanceMachineTypeRequest.php b/Notebooks/src/V1beta1/SetInstanceMachineTypeRequest.php
deleted file mode 100644
index ca3634380aff..000000000000
--- a/Notebooks/src/V1beta1/SetInstanceMachineTypeRequest.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.cloud.notebooks.v1beta1.SetInstanceMachineTypeRequest
- */
-class SetInstanceMachineTypeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
- /**
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types).
- *
- * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $machine_type = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @type string $machine_type
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types).
- *
- * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getMachineType()
- {
- return $this->machine_type;
- }
-
- /**
- * Required. The [Compute Engine machine
- * type](https://cloud.google.com/compute/docs/machine-types).
- *
- * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setMachineType($var)
- {
- GPBUtil::checkString($var, True);
- $this->machine_type = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/StartInstanceRequest.php b/Notebooks/src/V1beta1/StartInstanceRequest.php
deleted file mode 100644
index 791eaf0b0c46..000000000000
--- a/Notebooks/src/V1beta1/StartInstanceRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.StartInstanceRequest
- */
-class StartInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/StopInstanceRequest.php b/Notebooks/src/V1beta1/StopInstanceRequest.php
deleted file mode 100644
index d587f2bd1d04..000000000000
--- a/Notebooks/src/V1beta1/StopInstanceRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.StopInstanceRequest
- */
-class StopInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/UpgradeInstanceInternalRequest.php b/Notebooks/src/V1beta1/UpgradeInstanceInternalRequest.php
deleted file mode 100644
index 9ca602ab1f1a..000000000000
--- a/Notebooks/src/V1beta1/UpgradeInstanceInternalRequest.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.cloud.notebooks.v1beta1.UpgradeInstanceInternalRequest
- */
-class UpgradeInstanceInternalRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
- /**
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- *
- * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $vm_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * @type string $vm_id
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- *
- * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getVmId()
- {
- return $this->vm_id;
- }
-
- /**
- * Required. The VM hardware token for authenticating the VM.
- * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- *
- * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setVmId($var)
- {
- GPBUtil::checkString($var, True);
- $this->vm_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/UpgradeInstanceRequest.php b/Notebooks/src/V1beta1/UpgradeInstanceRequest.php
deleted file mode 100644
index 0f06377c00a9..000000000000
--- a/Notebooks/src/V1beta1/UpgradeInstanceRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.notebooks.v1beta1.UpgradeInstanceRequest
- */
-class UpgradeInstanceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Format:
- * `projects/{project_id}/locations/{location}/instances/{instance_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/VmImage.php b/Notebooks/src/V1beta1/VmImage.php
deleted file mode 100644
index 3e0630ca0b88..000000000000
--- a/Notebooks/src/V1beta1/VmImage.php
+++ /dev/null
@@ -1,150 +0,0 @@
-google.cloud.notebooks.v1beta1.VmImage
- */
-class VmImage extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the Google Cloud project that this VM image belongs to.
- * Format: `projects/{project_id}`
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- private $project = '';
- protected $image;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $project
- * Required. The name of the Google Cloud project that this VM image belongs to.
- * Format: `projects/{project_id}`
- * @type string $image_name
- * Use VM image name to find the image.
- * @type string $image_family
- * Use this VM image family to find the image; the newest image in this
- * family will be used.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Notebooks\V1Beta1\Environment::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the Google Cloud project that this VM image belongs to.
- * Format: `projects/{project_id}`
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getProject()
- {
- return $this->project;
- }
-
- /**
- * Required. The name of the Google Cloud project that this VM image belongs to.
- * Format: `projects/{project_id}`
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setProject($var)
- {
- GPBUtil::checkString($var, True);
- $this->project = $var;
-
- return $this;
- }
-
- /**
- * Use VM image name to find the image.
- *
- * Generated from protobuf field string image_name = 2;
- * @return string
- */
- public function getImageName()
- {
- return $this->readOneof(2);
- }
-
- public function hasImageName()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * Use VM image name to find the image.
- *
- * Generated from protobuf field string image_name = 2;
- * @param string $var
- * @return $this
- */
- public function setImageName($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * Use this VM image family to find the image; the newest image in this
- * family will be used.
- *
- * Generated from protobuf field string image_family = 3;
- * @return string
- */
- public function getImageFamily()
- {
- return $this->readOneof(3);
- }
-
- public function hasImageFamily()
- {
- return $this->hasOneof(3);
- }
-
- /**
- * Use this VM image family to find the image; the newest image in this
- * family will be used.
- *
- * Generated from protobuf field string image_family = 3;
- * @param string $var
- * @return $this
- */
- public function setImageFamily($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(3, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getImage()
- {
- return $this->whichOneof("image");
- }
-
-}
-
diff --git a/Notebooks/src/V1beta1/gapic_metadata.json b/Notebooks/src/V1beta1/gapic_metadata.json
deleted file mode 100644
index 48cfb690c3d7..000000000000
--- a/Notebooks/src/V1beta1/gapic_metadata.json
+++ /dev/null
@@ -1,138 +0,0 @@
-{
- "schema": "1.0",
- "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods",
- "language": "php",
- "protoPackage": "google.cloud.notebooks.v1beta1",
- "libraryPackage": "Google\\Cloud\\Notebooks\\V1beta1",
- "services": {
- "NotebookService": {
- "clients": {
- "grpc": {
- "libraryClient": "NotebookServiceGapicClient",
- "rpcs": {
- "CreateEnvironment": {
- "methods": [
- "createEnvironment"
- ]
- },
- "CreateInstance": {
- "methods": [
- "createInstance"
- ]
- },
- "DeleteEnvironment": {
- "methods": [
- "deleteEnvironment"
- ]
- },
- "DeleteInstance": {
- "methods": [
- "deleteInstance"
- ]
- },
- "GetEnvironment": {
- "methods": [
- "getEnvironment"
- ]
- },
- "GetInstance": {
- "methods": [
- "getInstance"
- ]
- },
- "IsInstanceUpgradeable": {
- "methods": [
- "isInstanceUpgradeable"
- ]
- },
- "ListEnvironments": {
- "methods": [
- "listEnvironments"
- ]
- },
- "ListInstances": {
- "methods": [
- "listInstances"
- ]
- },
- "RegisterInstance": {
- "methods": [
- "registerInstance"
- ]
- },
- "ReportInstanceInfo": {
- "methods": [
- "reportInstanceInfo"
- ]
- },
- "ResetInstance": {
- "methods": [
- "resetInstance"
- ]
- },
- "SetInstanceAccelerator": {
- "methods": [
- "setInstanceAccelerator"
- ]
- },
- "SetInstanceLabels": {
- "methods": [
- "setInstanceLabels"
- ]
- },
- "SetInstanceMachineType": {
- "methods": [
- "setInstanceMachineType"
- ]
- },
- "StartInstance": {
- "methods": [
- "startInstance"
- ]
- },
- "StopInstance": {
- "methods": [
- "stopInstance"
- ]
- },
- "UpgradeInstance": {
- "methods": [
- "upgradeInstance"
- ]
- },
- "UpgradeInstanceInternal": {
- "methods": [
- "upgradeInstanceInternal"
- ]
- },
- "GetLocation": {
- "methods": [
- "getLocation"
- ]
- },
- "ListLocations": {
- "methods": [
- "listLocations"
- ]
- },
- "GetIamPolicy": {
- "methods": [
- "getIamPolicy"
- ]
- },
- "SetIamPolicy": {
- "methods": [
- "setIamPolicy"
- ]
- },
- "TestIamPermissions": {
- "methods": [
- "testIamPermissions"
- ]
- }
- }
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Notebooks/src/V1beta1/resources/notebook_service_client_config.json b/Notebooks/src/V1beta1/resources/notebook_service_client_config.json
deleted file mode 100644
index 052fa58c29b6..000000000000
--- a/Notebooks/src/V1beta1/resources/notebook_service_client_config.json
+++ /dev/null
@@ -1,164 +0,0 @@
-{
- "interfaces": {
- "google.cloud.notebooks.v1beta1.NotebookService": {
- "retry_codes": {
- "no_retry_codes": [],
- "retry_policy_1_codes": [
- "UNAVAILABLE"
- ],
- "no_retry_1_codes": []
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- },
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000
- }
- },
- "methods": {
- "CreateEnvironment": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "CreateInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "DeleteEnvironment": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "DeleteInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "GetEnvironment": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "GetInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "IsInstanceUpgradeable": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "ListEnvironments": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "ListInstances": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "RegisterInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "ReportInstanceInfo": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "ResetInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "SetInstanceAccelerator": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "SetInstanceLabels": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "SetInstanceMachineType": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "StartInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "StopInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "UpgradeInstance": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "UpgradeInstanceInternal": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "GetLocation": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListLocations": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "GetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "SetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "TestIamPermissions": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- }
- }
- }
- }
-}
diff --git a/Notebooks/src/V1beta1/resources/notebook_service_descriptor_config.php b/Notebooks/src/V1beta1/resources/notebook_service_descriptor_config.php
deleted file mode 100644
index 33ecc9d79fec..000000000000
--- a/Notebooks/src/V1beta1/resources/notebook_service_descriptor_config.php
+++ /dev/null
@@ -1,211 +0,0 @@
- [
- 'google.cloud.notebooks.v1beta1.NotebookService' => [
- 'CreateEnvironment' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Environment',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'CreateInstance' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteEnvironment' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteInstance' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'RegisterInstance' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ReportInstanceInfo' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ResetInstance' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'SetInstanceAccelerator' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'SetInstanceLabels' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'SetInstanceMachineType' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'StartInstance' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'StopInstance' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpgradeInstance' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpgradeInstanceInternal' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Notebooks\V1beta1\Instance',
- 'metadataReturnType' => '\Google\Cloud\Notebooks\V1beta1\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ListEnvironments' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getEnvironments',
- ],
- ],
- 'ListInstances' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getInstances',
- ],
- ],
- 'GetLocation' => [
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'ListLocations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getLocations',
- ],
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'GetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- ],
- ],
-];
diff --git a/Notebooks/src/V1beta1/resources/notebook_service_rest_client_config.php b/Notebooks/src/V1beta1/resources/notebook_service_rest_client_config.php
deleted file mode 100644
index 8cfe9f1fc5ab..000000000000
--- a/Notebooks/src/V1beta1/resources/notebook_service_rest_client_config.php
+++ /dev/null
@@ -1,364 +0,0 @@
- [
- 'google.cloud.location.Locations' => [
- 'GetLocation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListLocations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{name=projects/*}/locations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.cloud.notebooks.v1beta1.NotebookService' => [
- 'CreateEnvironment' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/environments',
- 'body' => 'environment',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'environment_id',
- ],
- ],
- 'CreateInstance' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/instances',
- 'body' => 'instance',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'instance_id',
- ],
- ],
- 'DeleteEnvironment' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/environments/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteInstance' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetEnvironment' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/environments/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetInstance' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'IsInstanceUpgradeable' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{notebook_instance=projects/*/locations/*/instances/*}:isUpgradeable',
- 'placeholders' => [
- 'notebook_instance' => [
- 'getters' => [
- 'getNotebookInstance',
- ],
- ],
- ],
- ],
- 'ListEnvironments' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/environments',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListInstances' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/instances',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'RegisterInstance' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/instances:register',
- 'body' => '*',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ReportInstanceInfo' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:report',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ResetInstance' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:reset',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'SetInstanceAccelerator' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:setAccelerator',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'SetInstanceLabels' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:setLabels',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'SetInstanceMachineType' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:setMachineType',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'StartInstance' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:start',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'StopInstance' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:stop',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UpgradeInstance' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UpgradeInstanceInternal' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/instances/*}:upgradeInternal',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/instances/*}:getIamPolicy',
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/instances/*}:setIamPolicy',
- 'body' => '*',
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/instances/*}:testIamPermissions',
- 'body' => '*',
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'CancelOperation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteOperation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}/operations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/Notebooks/src/V2/AcceleratorConfig.php b/Notebooks/src/V2/AcceleratorConfig.php
index 870a9eb04930..bef92e9d19fb 100644
--- a/Notebooks/src/V2/AcceleratorConfig.php
+++ b/Notebooks/src/V2/AcceleratorConfig.php
@@ -25,13 +25,13 @@ class AcceleratorConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType type = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $type = 0;
+ protected $type = 0;
/**
* Optional. Count of cores of this accelerator.
*
* Generated from protobuf field int64 core_count = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $core_count = 0;
+ protected $core_count = 0;
/**
* Constructor.
diff --git a/Notebooks/src/V2/AcceleratorConfig/AcceleratorType.php b/Notebooks/src/V2/AcceleratorConfig/AcceleratorType.php
index c1f2b8471a7f..ff2bb8d5584b 100644
--- a/Notebooks/src/V2/AcceleratorConfig/AcceleratorType.php
+++ b/Notebooks/src/V2/AcceleratorConfig/AcceleratorType.php
@@ -116,6 +116,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V2\AcceleratorConfig_AcceleratorType::class);
diff --git a/Notebooks/src/V2/BootDisk.php b/Notebooks/src/V2/BootDisk.php
index d4ae28e419c9..fde8f7d94633 100644
--- a/Notebooks/src/V2/BootDisk.php
+++ b/Notebooks/src/V2/BootDisk.php
@@ -22,20 +22,20 @@ class BootDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_size_gb = 0;
+ protected $disk_size_gb = 0;
/**
* Optional. Indicates the type of the disk.
*
* Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_type = 0;
+ protected $disk_type = 0;
/**
* Optional. Input only. Disk encryption method used on the boot and data
* disks, defaults to GMEK.
*
* Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_encryption = 0;
+ protected $disk_encryption = 0;
/**
* Optional. Input only. The KMS key used to encrypt the disks, only
* applicable if disk_encryption is CMEK. Format:
@@ -44,7 +44,7 @@ class BootDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kms_key = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
*/
- private $kms_key = '';
+ protected $kms_key = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/CheckInstanceUpgradabilityRequest.php b/Notebooks/src/V2/CheckInstanceUpgradabilityRequest.php
index 1a662e1f909e..14ad3c7b8c7b 100644
--- a/Notebooks/src/V2/CheckInstanceUpgradabilityRequest.php
+++ b/Notebooks/src/V2/CheckInstanceUpgradabilityRequest.php
@@ -21,7 +21,7 @@ class CheckInstanceUpgradabilityRequest extends \Google\Protobuf\Internal\Messag
*
* Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $notebook_instance = '';
+ protected $notebook_instance = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/CheckInstanceUpgradabilityResponse.php b/Notebooks/src/V2/CheckInstanceUpgradabilityResponse.php
index b4d14e76bc15..fa10bb6afe87 100644
--- a/Notebooks/src/V2/CheckInstanceUpgradabilityResponse.php
+++ b/Notebooks/src/V2/CheckInstanceUpgradabilityResponse.php
@@ -20,20 +20,20 @@ class CheckInstanceUpgradabilityResponse extends \Google\Protobuf\Internal\Messa
*
* Generated from protobuf field bool upgradeable = 1;
*/
- private $upgradeable = false;
+ protected $upgradeable = false;
/**
* The version this instance will be upgraded to if calling the upgrade
* endpoint. This field will only be populated if field upgradeable is true.
*
* Generated from protobuf field string upgrade_version = 2;
*/
- private $upgrade_version = '';
+ protected $upgrade_version = '';
/**
* Additional information about upgrade.
*
* Generated from protobuf field string upgrade_info = 3;
*/
- private $upgrade_info = '';
+ protected $upgrade_info = '';
/**
* 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
@@ -41,7 +41,7 @@ class CheckInstanceUpgradabilityResponse extends \Google\Protobuf\Internal\Messa
*
* Generated from protobuf field string upgrade_image = 4;
*/
- private $upgrade_image = '';
+ protected $upgrade_image = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/Client/NotebookServiceClient.php b/Notebooks/src/V2/Client/NotebookServiceClient.php
index 066d76e30549..d626f221dec2 100644
--- a/Notebooks/src/V2/Client/NotebookServiceClient.php
+++ b/Notebooks/src/V2/Client/NotebookServiceClient.php
@@ -1,6 +1,6 @@
descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
+ $options = isset($this->descriptors[$methodName]['longRunning'])
+ ? $this->descriptors[$methodName]['longRunning']
+ : [];
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
$operation->reload();
return $operation;
@@ -342,8 +342,10 @@ public function __call($method, $args)
*
* @throws ApiException Thrown if the API call fails.
*/
- public function checkInstanceUpgradability(CheckInstanceUpgradabilityRequest $request, array $callOptions = []): CheckInstanceUpgradabilityResponse
- {
+ public function checkInstanceUpgradability(
+ CheckInstanceUpgradabilityRequest $request,
+ array $callOptions = []
+ ): CheckInstanceUpgradabilityResponse {
return $this->startApiCall('CheckInstanceUpgradability', $request, $callOptions)->wait();
}
@@ -769,8 +771,10 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions =
*
* @throws ApiException Thrown if the API call fails.
*/
- public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse
- {
+ public function testIamPermissions(
+ TestIamPermissionsRequest $request,
+ array $callOptions = []
+ ): TestIamPermissionsResponse {
return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait();
}
}
diff --git a/Notebooks/src/V2/ContainerImage.php b/Notebooks/src/V2/ContainerImage.php
index d24175bf1a10..72e77b2eb0b6 100644
--- a/Notebooks/src/V2/ContainerImage.php
+++ b/Notebooks/src/V2/ContainerImage.php
@@ -22,14 +22,14 @@ class ContainerImage extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $repository = '';
+ protected $repository = '';
/**
* Optional. The tag of the container image. If not specified, this defaults
* to the latest tag.
*
* Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $tag = '';
+ protected $tag = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/CreateInstanceRequest.php b/Notebooks/src/V2/CreateInstanceRequest.php
index d68a1dcc72bb..305567395f86 100644
--- a/Notebooks/src/V2/CreateInstanceRequest.php
+++ b/Notebooks/src/V2/CreateInstanceRequest.php
@@ -21,25 +21,25 @@ class CreateInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Required. User-defined unique ID of this instance.
*
* Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $instance_id = '';
+ protected $instance_id = '';
/**
* Required. The instance to be created.
*
* Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED];
*/
- private $instance = null;
+ protected $instance = null;
/**
* Optional. Idempotent request UUID.
*
* Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V2/DataDisk.php b/Notebooks/src/V2/DataDisk.php
index 78cc27f40674..670f178b50a0 100644
--- a/Notebooks/src/V2/DataDisk.php
+++ b/Notebooks/src/V2/DataDisk.php
@@ -21,20 +21,20 @@ class DataDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_size_gb = 0;
+ protected $disk_size_gb = 0;
/**
* Optional. Input only. Indicates the type of the disk.
*
* Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_type = 0;
+ protected $disk_type = 0;
/**
* Optional. Input only. Disk encryption method used on the boot and data
* disks, defaults to GMEK.
*
* Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
*/
- private $disk_encryption = 0;
+ protected $disk_encryption = 0;
/**
* Optional. Input only. The KMS key used to encrypt the disks, only
* applicable if disk_encryption is CMEK. Format:
@@ -43,7 +43,7 @@ class DataDisk extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
*/
- private $kms_key = '';
+ protected $kms_key = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/DeleteInstanceRequest.php b/Notebooks/src/V2/DeleteInstanceRequest.php
index c71f7d7da60e..6eb1f755fd45 100644
--- a/Notebooks/src/V2/DeleteInstanceRequest.php
+++ b/Notebooks/src/V2/DeleteInstanceRequest.php
@@ -21,13 +21,13 @@ class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Optional. Idempotent request UUID.
*
* Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V2/DiagnoseInstanceRequest.php b/Notebooks/src/V2/DiagnoseInstanceRequest.php
index 697edf89add1..bf8021ecb723 100644
--- a/Notebooks/src/V2/DiagnoseInstanceRequest.php
+++ b/Notebooks/src/V2/DiagnoseInstanceRequest.php
@@ -21,19 +21,19 @@ class DiagnoseInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Required. Defines flags that are used to run the diagnostic tool
*
* Generated from protobuf field .google.cloud.notebooks.v2.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $diagnostic_config = null;
+ protected $diagnostic_config = null;
/**
* Optional. Maxmium amount of time in minutes before the operation times out.
*
* Generated from protobuf field int32 timeout_minutes = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $timeout_minutes = 0;
+ protected $timeout_minutes = 0;
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V2/DiagnosticConfig.php b/Notebooks/src/V2/DiagnosticConfig.php
index b4aa1e72a4cd..23d388e99653 100644
--- a/Notebooks/src/V2/DiagnosticConfig.php
+++ b/Notebooks/src/V2/DiagnosticConfig.php
@@ -30,7 +30,7 @@ class DiagnosticConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $gcs_bucket = '';
+ protected $gcs_bucket = '';
/**
* Optional. Defines the relative storage path in the Cloud Storage bucket
* where the diagnostic logs will be written: Default path will be the root
@@ -40,25 +40,25 @@ class DiagnosticConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $relative_path = '';
+ protected $relative_path = '';
/**
* Optional. Enables flag to repair service for instance
*
* Generated from protobuf field bool enable_repair_flag = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_repair_flag = false;
+ protected $enable_repair_flag = false;
/**
* Optional. Enables flag to capture packets from the instance for 30 seconds
*
* Generated from protobuf field bool enable_packet_capture_flag = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_packet_capture_flag = false;
+ protected $enable_packet_capture_flag = false;
/**
* Optional. Enables flag to copy all `/home/jupyter` folder contents
*
* Generated from protobuf field bool enable_copy_home_files_flag = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_copy_home_files_flag = false;
+ protected $enable_copy_home_files_flag = false;
/**
* Constructor.
diff --git a/Notebooks/src/V2/Event.php b/Notebooks/src/V2/Event.php
index f1ff6f0c3d98..9214bd704974 100644
--- a/Notebooks/src/V2/Event.php
+++ b/Notebooks/src/V2/Event.php
@@ -20,13 +20,13 @@ class Event extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.protobuf.Timestamp report_time = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $report_time = null;
+ protected $report_time = null;
/**
* Optional. Event type.
*
* Generated from protobuf field .google.cloud.notebooks.v2.Event.EventType type = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $type = 0;
+ protected $type = 0;
/**
* Optional. Event details. This field is used to pass event information.
*
diff --git a/Notebooks/src/V2/Event/EventType.php b/Notebooks/src/V2/Event/EventType.php
index d99ae420a4ac..d5db26d5f066 100644
--- a/Notebooks/src/V2/Event/EventType.php
+++ b/Notebooks/src/V2/Event/EventType.php
@@ -88,6 +88,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(EventType::class, \Google\Cloud\Notebooks\V2\Event_EventType::class);
diff --git a/Notebooks/src/V2/GPUDriverConfig.php b/Notebooks/src/V2/GPUDriverConfig.php
index 37a58d278c37..e7b276edeb92 100644
--- a/Notebooks/src/V2/GPUDriverConfig.php
+++ b/Notebooks/src/V2/GPUDriverConfig.php
@@ -22,7 +22,7 @@ class GPUDriverConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_gpu_driver = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_gpu_driver = false;
+ protected $enable_gpu_driver = false;
/**
* Optional. Specify a custom Cloud Storage path where the GPU driver is
* stored. If not specified, we'll automatically choose from official GPU
@@ -30,7 +30,7 @@ class GPUDriverConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string custom_gpu_driver_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $custom_gpu_driver_path = '';
+ protected $custom_gpu_driver_path = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/GceSetup.php b/Notebooks/src/V2/GceSetup.php
index 64d6c174d11b..4865a23b99cd 100644
--- a/Notebooks/src/V2/GceSetup.php
+++ b/Notebooks/src/V2/GceSetup.php
@@ -22,7 +22,7 @@ class GceSetup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $machine_type = '';
+ protected $machine_type = '';
/**
* Optional. The hardware accelerators used on this instance. If you use
* accelerators, make sure that your configuration has
@@ -45,7 +45,7 @@ class GceSetup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v2.BootDisk boot_disk = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $boot_disk = null;
+ protected $boot_disk = null;
/**
* Optional. Data disks attached to the VM instance.
* Currently supports only one data disk.
@@ -60,7 +60,7 @@ class GceSetup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v2.ShieldedInstanceConfig shielded_instance_config = 8 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $shielded_instance_config = null;
+ protected $shielded_instance_config = null;
/**
* Optional. The network interfaces for the VM.
* Supports only one interface.
@@ -73,7 +73,7 @@ class GceSetup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool disable_public_ip = 10 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $disable_public_ip = false;
+ protected $disable_public_ip = false;
/**
* Optional. The Compute Engine tags to add to runtime (see [Tagging
* instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
@@ -93,13 +93,13 @@ class GceSetup extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_ip_forwarding = 13 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_ip_forwarding = false;
+ protected $enable_ip_forwarding = false;
/**
* Optional. Configuration for GPU drivers.
*
* Generated from protobuf field .google.cloud.notebooks.v2.GPUDriverConfig gpu_driver_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $gpu_driver_config = null;
+ protected $gpu_driver_config = null;
protected $image;
/**
diff --git a/Notebooks/src/V2/GetInstanceRequest.php b/Notebooks/src/V2/GetInstanceRequest.php
index c949da8ffe72..c33d67eee7dd 100644
--- a/Notebooks/src/V2/GetInstanceRequest.php
+++ b/Notebooks/src/V2/GetInstanceRequest.php
@@ -21,7 +21,7 @@ class GetInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* @param string $name Required. Format:
diff --git a/Notebooks/src/V2/Instance.php b/Notebooks/src/V2/Instance.php
index d0f4bb53825a..fac652448bdc 100644
--- a/Notebooks/src/V2/Instance.php
+++ b/Notebooks/src/V2/Instance.php
@@ -21,14 +21,14 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $name = '';
+ protected $name = '';
/**
* Output only. The proxy endpoint that is used to access the Jupyter
* notebook.
*
* Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $proxy_uri = '';
+ protected $proxy_uri = '';
/**
* Optional. Input only. The owner of this instance after creation. Format:
* `alias@example.com`
@@ -45,13 +45,13 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $creator = '';
+ protected $creator = '';
/**
* Output only. The state of this instance.
*
* Generated from protobuf field .google.cloud.notebooks.v2.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = 0;
+ protected $state = 0;
/**
* Output only. The upgrade history of this instance.
*
@@ -63,13 +63,13 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $id = '';
+ protected $id = '';
/**
* Output only. Instance health_state.
*
* Generated from protobuf field .google.cloud.notebooks.v2.HealthState health_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $health_state = 0;
+ protected $health_state = 0;
/**
* Output only. Additional information about instance health.
* Example:
@@ -89,19 +89,19 @@ class Instance extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* Output only. Instance update time.
*
* Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $update_time = null;
+ protected $update_time = null;
/**
* Optional. If true, the notebook instance will not register with the proxy.
*
* Generated from protobuf field bool disable_proxy_access = 13 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $disable_proxy_access = false;
+ protected $disable_proxy_access = false;
/**
* Optional. Labels to apply to this instance.
* These can be later modified by the UpdateInstance method.
diff --git a/Notebooks/src/V2/ListInstancesRequest.php b/Notebooks/src/V2/ListInstancesRequest.php
index d85952fde233..debdf1761f08 100644
--- a/Notebooks/src/V2/ListInstancesRequest.php
+++ b/Notebooks/src/V2/ListInstancesRequest.php
@@ -21,33 +21,33 @@ class ListInstancesRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $parent = '';
+ protected $parent = '';
/**
* Optional. Maximum return size of the list call.
*
* Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_size = 0;
+ protected $page_size = 0;
/**
* Optional. A previous returned page token that can be used to continue
* listing from the last result.
*
* Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $page_token = '';
+ protected $page_token = '';
/**
* Optional. Sort results. Supported values are "name", "name desc" or ""
* (unsorted).
*
* Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $order_by = '';
+ protected $order_by = '';
/**
* Optional. List filter.
*
* Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $filter = '';
+ protected $filter = '';
/**
* @param string $parent Required. Format:
diff --git a/Notebooks/src/V2/ListInstancesResponse.php b/Notebooks/src/V2/ListInstancesResponse.php
index 33e576fcf4a8..0a01d401ae79 100644
--- a/Notebooks/src/V2/ListInstancesResponse.php
+++ b/Notebooks/src/V2/ListInstancesResponse.php
@@ -27,7 +27,7 @@ class ListInstancesResponse extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string next_page_token = 2;
*/
- private $next_page_token = '';
+ protected $next_page_token = '';
/**
* Locations that could not be reached. For example,
* ['us-west1-a', 'us-central1-b'].
diff --git a/Notebooks/src/V2/NetworkInterface.php b/Notebooks/src/V2/NetworkInterface.php
index d40d88375389..66f44bc6a3bf 100644
--- a/Notebooks/src/V2/NetworkInterface.php
+++ b/Notebooks/src/V2/NetworkInterface.php
@@ -22,7 +22,7 @@ class NetworkInterface extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $network = '';
+ protected $network = '';
/**
* Optional. The name of the subnet that this VM instance is in.
* Format:
@@ -30,14 +30,14 @@ class NetworkInterface extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $subnet = '';
+ protected $subnet = '';
/**
* Optional. The type of vNIC to be used on this interface. This may be gVNIC
* or VirtioNet.
*
* Generated from protobuf field .google.cloud.notebooks.v2.NetworkInterface.NicType nic_type = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $nic_type = 0;
+ protected $nic_type = 0;
/**
* Constructor.
diff --git a/Notebooks/src/V2/NetworkInterface/NicType.php b/Notebooks/src/V2/NetworkInterface/NicType.php
index d8ddfee35971..781be1f53db4 100644
--- a/Notebooks/src/V2/NetworkInterface/NicType.php
+++ b/Notebooks/src/V2/NetworkInterface/NicType.php
@@ -60,6 +60,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(NicType::class, \Google\Cloud\Notebooks\V2\NetworkInterface_NicType::class);
diff --git a/Notebooks/src/V2/OperationMetadata.php b/Notebooks/src/V2/OperationMetadata.php
index d7da26dee06b..501b362e7d4f 100644
--- a/Notebooks/src/V2/OperationMetadata.php
+++ b/Notebooks/src/V2/OperationMetadata.php
@@ -20,31 +20,31 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* The time the operation finished running.
*
* Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
*/
- private $end_time = null;
+ protected $end_time = null;
/**
* Server-defined resource path for the target of the operation.
*
* Generated from protobuf field string target = 3;
*/
- private $target = '';
+ protected $target = '';
/**
* Name of the verb executed by the operation.
*
* Generated from protobuf field string verb = 4;
*/
- private $verb = '';
+ protected $verb = '';
/**
* Human-readable status of the operation, if any.
*
* Generated from protobuf field string status_message = 5;
*/
- private $status_message = '';
+ protected $status_message = '';
/**
* Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
@@ -54,19 +54,19 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool requested_cancellation = 6;
*/
- private $requested_cancellation = false;
+ protected $requested_cancellation = false;
/**
* API version used to start the operation.
*
* Generated from protobuf field string api_version = 7;
*/
- private $api_version = '';
+ protected $api_version = '';
/**
* API endpoint name of this operation.
*
* Generated from protobuf field string endpoint = 8;
*/
- private $endpoint = '';
+ protected $endpoint = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/ResetInstanceRequest.php b/Notebooks/src/V2/ResetInstanceRequest.php
index ab94d9c712b4..b76c5142315b 100644
--- a/Notebooks/src/V2/ResetInstanceRequest.php
+++ b/Notebooks/src/V2/ResetInstanceRequest.php
@@ -21,7 +21,7 @@ class ResetInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/RollbackInstanceRequest.php b/Notebooks/src/V2/RollbackInstanceRequest.php
index 1306dbe4eff3..77824123e24e 100644
--- a/Notebooks/src/V2/RollbackInstanceRequest.php
+++ b/Notebooks/src/V2/RollbackInstanceRequest.php
@@ -21,20 +21,20 @@ class RollbackInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
- private $name = '';
+ protected $name = '';
/**
* Required. The snapshot for rollback.
* Example: "projects/test-project/global/snapshots/krwlzipynril".
*
* Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $target_snapshot = '';
+ protected $target_snapshot = '';
/**
* Required. Output only. Revision Id
*
* Generated from protobuf field string revision_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = REQUIRED];
*/
- private $revision_id = '';
+ protected $revision_id = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/ServiceAccount.php b/Notebooks/src/V2/ServiceAccount.php
index d9639890b7e1..8016666a9a2f 100644
--- a/Notebooks/src/V2/ServiceAccount.php
+++ b/Notebooks/src/V2/ServiceAccount.php
@@ -20,7 +20,7 @@ class ServiceAccount extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $email = '';
+ protected $email = '';
/**
* Output only. The list of scopes to be made available for this service
* account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform
diff --git a/Notebooks/src/V2/ShieldedInstanceConfig.php b/Notebooks/src/V2/ShieldedInstanceConfig.php
index 9b7d58f14662..911a41c87c93 100644
--- a/Notebooks/src/V2/ShieldedInstanceConfig.php
+++ b/Notebooks/src/V2/ShieldedInstanceConfig.php
@@ -26,14 +26,14 @@ class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_secure_boot = false;
+ protected $enable_secure_boot = false;
/**
* Optional. Defines whether the VM instance has the vTPM enabled. Enabled by
* default.
*
* Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_vtpm = false;
+ protected $enable_vtpm = false;
/**
* Optional. Defines whether the VM instance has integrity monitoring enabled.
* Enables monitoring and attestation of the boot integrity of the VM
@@ -43,7 +43,7 @@ class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $enable_integrity_monitoring = false;
+ protected $enable_integrity_monitoring = false;
/**
* Constructor.
diff --git a/Notebooks/src/V2/StartInstanceRequest.php b/Notebooks/src/V2/StartInstanceRequest.php
index 97dc82f8fcf4..41021273b9d3 100644
--- a/Notebooks/src/V2/StartInstanceRequest.php
+++ b/Notebooks/src/V2/StartInstanceRequest.php
@@ -21,7 +21,7 @@ class StartInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/StopInstanceRequest.php b/Notebooks/src/V2/StopInstanceRequest.php
index 29385a867d5c..b3ae64046da9 100644
--- a/Notebooks/src/V2/StopInstanceRequest.php
+++ b/Notebooks/src/V2/StopInstanceRequest.php
@@ -21,7 +21,7 @@ class StopInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/UpdateInstanceRequest.php b/Notebooks/src/V2/UpdateInstanceRequest.php
index 8a60c44c5eea..7ded465f5ce2 100644
--- a/Notebooks/src/V2/UpdateInstanceRequest.php
+++ b/Notebooks/src/V2/UpdateInstanceRequest.php
@@ -20,19 +20,19 @@ class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $instance = null;
+ protected $instance = null;
/**
* Required. Mask used to update an instance
*
* Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
*/
- private $update_mask = null;
+ protected $update_mask = null;
/**
* Optional. Idempotent request UUID.
*
* Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $request_id = '';
+ protected $request_id = '';
/**
* @param \Google\Cloud\Notebooks\V2\Instance $instance Required. A representation of an instance.
diff --git a/Notebooks/src/V2/UpgradeHistoryEntry.php b/Notebooks/src/V2/UpgradeHistoryEntry.php
index a5978b95453f..01fdd5a03451 100644
--- a/Notebooks/src/V2/UpgradeHistoryEntry.php
+++ b/Notebooks/src/V2/UpgradeHistoryEntry.php
@@ -21,55 +21,55 @@ class UpgradeHistoryEntry extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $snapshot = '';
+ protected $snapshot = '';
/**
* Optional. The VM image before this instance upgrade.
*
* Generated from protobuf field string vm_image = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $vm_image = '';
+ protected $vm_image = '';
/**
* Optional. The container image before this instance upgrade.
*
* Generated from protobuf field string container_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $container_image = '';
+ protected $container_image = '';
/**
* Optional. The framework of this notebook instance.
*
* Generated from protobuf field string framework = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $framework = '';
+ protected $framework = '';
/**
* Optional. The version of the notebook instance before this upgrade.
*
* Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $version = '';
+ protected $version = '';
/**
* Output only. The state of this instance upgrade history entry.
*
* Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
- private $state = 0;
+ protected $state = 0;
/**
* Immutable. The time that this instance upgrade history entry is created.
*
* Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
- private $create_time = null;
+ protected $create_time = null;
/**
* Optional. Action. Rolloback or Upgrade.
*
* Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.Action action = 8 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $action = 0;
+ protected $action = 0;
/**
* Optional. Target VM Version, like m63.
*
* Generated from protobuf field string target_version = 9 [(.google.api.field_behavior) = OPTIONAL];
*/
- private $target_version = '';
+ protected $target_version = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/UpgradeHistoryEntry/Action.php b/Notebooks/src/V2/UpgradeHistoryEntry/Action.php
index 563ca0f0e2ef..9a466c032959 100644
--- a/Notebooks/src/V2/UpgradeHistoryEntry/Action.php
+++ b/Notebooks/src/V2/UpgradeHistoryEntry/Action.php
@@ -59,6 +59,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Action::class, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry_Action::class);
diff --git a/Notebooks/src/V2/UpgradeHistoryEntry/State.php b/Notebooks/src/V2/UpgradeHistoryEntry/State.php
index b1760831b649..dcba7619f3eb 100644
--- a/Notebooks/src/V2/UpgradeHistoryEntry/State.php
+++ b/Notebooks/src/V2/UpgradeHistoryEntry/State.php
@@ -66,6 +66,4 @@ public static function value($name)
}
}
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry_State::class);
diff --git a/Notebooks/src/V2/UpgradeInstanceRequest.php b/Notebooks/src/V2/UpgradeInstanceRequest.php
index 7be594b1ca14..7335c3fdaa52 100644
--- a/Notebooks/src/V2/UpgradeInstanceRequest.php
+++ b/Notebooks/src/V2/UpgradeInstanceRequest.php
@@ -21,7 +21,7 @@ class UpgradeInstanceRequest extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $name = '';
+ protected $name = '';
/**
* Constructor.
diff --git a/Notebooks/src/V2/VmImage.php b/Notebooks/src/V2/VmImage.php
index 3a77d0cde504..e1b2043b1087 100644
--- a/Notebooks/src/V2/VmImage.php
+++ b/Notebooks/src/V2/VmImage.php
@@ -22,7 +22,7 @@ class VmImage extends \Google\Protobuf\Internal\Message
*
* Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
*/
- private $project = '';
+ protected $project = '';
protected $image;
/**
diff --git a/Notebooks/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php b/Notebooks/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php
index e79fb286e6d9..98dc000d67e1 100644
--- a/Notebooks/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php
+++ b/Notebooks/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php
@@ -1,6 +1,6 @@
getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
+ return $this->getMockBuilder(CredentialsWrapper::class)
+ ->disableOriginalConstructor()
+ ->getMock();
}
/** @return ManagedNotebookServiceClient */
@@ -189,12 +191,15 @@ public function createRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
@@ -257,8 +262,7 @@ public function deleteRuntimeTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
- $request = (new DeleteRuntimeRequest())
- ->setName($formattedName);
+ $request = (new DeleteRuntimeRequest())->setName($formattedName);
$response = $gapicClient->deleteRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -314,17 +318,19 @@ public function deleteRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
- $request = (new DeleteRuntimeRequest())
- ->setName($formattedName);
+ $request = (new DeleteRuntimeRequest())->setName($formattedName);
$response = $gapicClient->deleteRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -383,9 +389,7 @@ public function diagnoseRuntimeTest()
$diagnosticConfig = new DiagnosticConfig();
$diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720';
$diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket);
- $request = (new DiagnoseRuntimeRequest())
- ->setName($formattedName)
- ->setDiagnosticConfig($diagnosticConfig);
+ $request = (new DiagnoseRuntimeRequest())->setName($formattedName)->setDiagnosticConfig($diagnosticConfig);
$response = $gapicClient->diagnoseRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -443,21 +447,22 @@ public function diagnoseRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
$diagnosticConfig = new DiagnosticConfig();
$diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720';
$diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket);
- $request = (new DiagnoseRuntimeRequest())
- ->setName($formattedName)
- ->setDiagnosticConfig($diagnosticConfig);
+ $request = (new DiagnoseRuntimeRequest())->setName($formattedName)->setDiagnosticConfig($diagnosticConfig);
$response = $gapicClient->diagnoseRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -495,8 +500,7 @@ public function getRuntimeTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
- $request = (new GetRuntimeRequest())
- ->setName($formattedName);
+ $request = (new GetRuntimeRequest())->setName($formattedName);
$response = $gapicClient->getRuntime($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -520,17 +524,19 @@ public function getRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
- $request = (new GetRuntimeRequest())
- ->setName($formattedName);
+ $request = (new GetRuntimeRequest())->setName($formattedName);
try {
$gapicClient->getRuntime($request);
// If the $gapicClient method call did not throw, fail the test
@@ -555,17 +561,14 @@ public function listRuntimesTest()
// Mock response
$nextPageToken = '';
$runtimesElement = new Runtime();
- $runtimes = [
- $runtimesElement,
- ];
+ $runtimes = [$runtimesElement];
$expectedResponse = new ListRuntimesResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setRuntimes($runtimes);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListRuntimesRequest())
- ->setParent($formattedParent);
+ $request = (new ListRuntimesRequest())->setParent($formattedParent);
$response = $gapicClient->listRuntimes($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -592,17 +595,19 @@ public function listRuntimesExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListRuntimesRequest())
- ->setParent($formattedParent);
+ $request = (new ListRuntimesRequest())->setParent($formattedParent);
try {
$gapicClient->listRuntimes($request);
// If the $gapicClient method call did not throw, fail the test
@@ -632,16 +637,17 @@ public function refreshRuntimeTokenInternalTest()
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
$vmId = 'vmId112317347';
- $request = (new RefreshRuntimeTokenInternalRequest())
- ->setName($formattedName)
- ->setVmId($vmId);
+ $request = (new RefreshRuntimeTokenInternalRequest())->setName($formattedName)->setVmId($vmId);
$response = $gapicClient->refreshRuntimeTokenInternal($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/RefreshRuntimeTokenInternal', $actualFuncCall);
+ $this->assertSame(
+ '/google.cloud.notebooks.v1.ManagedNotebookService/RefreshRuntimeTokenInternal',
+ $actualFuncCall
+ );
$actualValue = $actualRequestObject->getName();
$this->assertProtobufEquals($formattedName, $actualValue);
$actualValue = $actualRequestObject->getVmId();
@@ -660,19 +666,20 @@ public function refreshRuntimeTokenInternalExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
$vmId = 'vmId112317347';
- $request = (new RefreshRuntimeTokenInternalRequest())
- ->setName($formattedName)
- ->setVmId($vmId);
+ $request = (new RefreshRuntimeTokenInternalRequest())->setName($formattedName)->setVmId($vmId);
try {
$gapicClient->refreshRuntimeTokenInternal($request);
// If the $gapicClient method call did not throw, fail the test
@@ -784,12 +791,15 @@ public function reportRuntimeEventExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]');
@@ -854,8 +864,7 @@ public function resetRuntimeTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new ResetRuntimeRequest())
- ->setName($name);
+ $request = (new ResetRuntimeRequest())->setName($name);
$response = $gapicClient->resetRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -911,17 +920,19 @@ public function resetRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new ResetRuntimeRequest())
- ->setName($name);
+ $request = (new ResetRuntimeRequest())->setName($name);
$response = $gapicClient->resetRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -977,8 +988,7 @@ public function startRuntimeTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new StartRuntimeRequest())
- ->setName($name);
+ $request = (new StartRuntimeRequest())->setName($name);
$response = $gapicClient->startRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1034,17 +1044,19 @@ public function startRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new StartRuntimeRequest())
- ->setName($name);
+ $request = (new StartRuntimeRequest())->setName($name);
$response = $gapicClient->startRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1100,8 +1112,7 @@ public function stopRuntimeTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new StopRuntimeRequest())
- ->setName($name);
+ $request = (new StopRuntimeRequest())->setName($name);
$response = $gapicClient->stopRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1157,17 +1168,19 @@ public function stopRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new StopRuntimeRequest())
- ->setName($name);
+ $request = (new StopRuntimeRequest())->setName($name);
$response = $gapicClient->stopRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1223,8 +1236,7 @@ public function switchRuntimeTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new SwitchRuntimeRequest())
- ->setName($name);
+ $request = (new SwitchRuntimeRequest())->setName($name);
$response = $gapicClient->switchRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1280,17 +1292,19 @@ public function switchRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new SwitchRuntimeRequest())
- ->setName($name);
+ $request = (new SwitchRuntimeRequest())->setName($name);
$response = $gapicClient->switchRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1347,9 +1361,7 @@ public function updateRuntimeTest()
// Mock request
$runtime = new Runtime();
$updateMask = new FieldMask();
- $request = (new UpdateRuntimeRequest())
- ->setRuntime($runtime)
- ->setUpdateMask($updateMask);
+ $request = (new UpdateRuntimeRequest())->setRuntime($runtime)->setUpdateMask($updateMask);
$response = $gapicClient->updateRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1407,19 +1419,20 @@ public function updateRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$runtime = new Runtime();
$updateMask = new FieldMask();
- $request = (new UpdateRuntimeRequest())
- ->setRuntime($runtime)
- ->setUpdateMask($updateMask);
+ $request = (new UpdateRuntimeRequest())->setRuntime($runtime)->setUpdateMask($updateMask);
$response = $gapicClient->updateRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1475,8 +1488,7 @@ public function upgradeRuntimeTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new UpgradeRuntimeRequest())
- ->setName($name);
+ $request = (new UpgradeRuntimeRequest())->setName($name);
$response = $gapicClient->upgradeRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1532,17 +1544,19 @@ public function upgradeRuntimeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new UpgradeRuntimeRequest())
- ->setName($name);
+ $request = (new UpgradeRuntimeRequest())->setName($name);
$response = $gapicClient->upgradeRuntime($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1604,12 +1618,15 @@ public function getLocationExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new GetLocationRequest();
try {
@@ -1636,9 +1653,7 @@ public function listLocationsTest()
// Mock response
$nextPageToken = '';
$locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
+ $locations = [$locationsElement];
$expectedResponse = new ListLocationsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setLocations($locations);
@@ -1668,12 +1683,15 @@ public function listLocationsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new ListLocationsRequest();
try {
@@ -1706,8 +1724,7 @@ public function getIamPolicyTest()
$transport->addResponse($expectedResponse);
// Mock request
$resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
+ $request = (new GetIamPolicyRequest())->setResource($resource);
$response = $gapicClient->getIamPolicy($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1731,17 +1748,19 @@ public function getIamPolicyExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
+ $request = (new GetIamPolicyRequest())->setResource($resource);
try {
$gapicClient->getIamPolicy($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1773,9 +1792,7 @@ public function setIamPolicyTest()
// Mock request
$resource = 'resource-341064690';
$policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
+ $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy);
$response = $gapicClient->setIamPolicy($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1801,19 +1818,20 @@ public function setIamPolicyExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
$policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
+ $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy);
try {
$gapicClient->setIamPolicy($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1841,9 +1859,7 @@ public function testIamPermissionsTest()
// Mock request
$resource = 'resource-341064690';
$permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
+ $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions);
$response = $gapicClient->testIamPermissions($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1869,19 +1885,20 @@ public function testIamPermissionsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
$permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
+ $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions);
try {
$gapicClient->testIamPermissions($request);
// If the $gapicClient method call did not throw, fail the test
diff --git a/Notebooks/tests/Unit/V1/Client/NotebookServiceClientTest.php b/Notebooks/tests/Unit/V1/Client/NotebookServiceClientTest.php
index a8ff7941d432..b7b0e24c3802 100644
--- a/Notebooks/tests/Unit/V1/Client/NotebookServiceClientTest.php
+++ b/Notebooks/tests/Unit/V1/Client/NotebookServiceClientTest.php
@@ -1,6 +1,6 @@
getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
+ return $this->getMockBuilder(CredentialsWrapper::class)
+ ->disableOriginalConstructor()
+ ->getMock();
}
/** @return NotebookServiceClient */
@@ -223,12 +225,15 @@ public function createEnvironmentExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$parent = 'parent-995424086';
@@ -366,12 +371,15 @@ public function createExecutionExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]');
@@ -535,12 +543,15 @@ public function createInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$parent = 'parent-995424086';
@@ -680,12 +691,15 @@ public function createScheduleExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
@@ -748,8 +762,7 @@ public function deleteEnvironmentTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new DeleteEnvironmentRequest())
- ->setName($name);
+ $request = (new DeleteEnvironmentRequest())->setName($name);
$response = $gapicClient->deleteEnvironment($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -805,17 +818,19 @@ public function deleteEnvironmentExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new DeleteEnvironmentRequest())
- ->setName($name);
+ $request = (new DeleteEnvironmentRequest())->setName($name);
$response = $gapicClient->deleteEnvironment($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -869,8 +884,7 @@ public function deleteExecutionTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]');
- $request = (new DeleteExecutionRequest())
- ->setName($formattedName);
+ $request = (new DeleteExecutionRequest())->setName($formattedName);
$response = $gapicClient->deleteExecution($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -926,17 +940,19 @@ public function deleteExecutionExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]');
- $request = (new DeleteExecutionRequest())
- ->setName($formattedName);
+ $request = (new DeleteExecutionRequest())->setName($formattedName);
$response = $gapicClient->deleteExecution($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -990,8 +1006,7 @@ public function deleteInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new DeleteInstanceRequest())
- ->setName($name);
+ $request = (new DeleteInstanceRequest())->setName($name);
$response = $gapicClient->deleteInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1047,17 +1062,19 @@ public function deleteInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new DeleteInstanceRequest())
- ->setName($name);
+ $request = (new DeleteInstanceRequest())->setName($name);
$response = $gapicClient->deleteInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1111,8 +1128,7 @@ public function deleteScheduleTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new DeleteScheduleRequest())
- ->setName($formattedName);
+ $request = (new DeleteScheduleRequest())->setName($formattedName);
$response = $gapicClient->deleteSchedule($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1168,17 +1184,19 @@ public function deleteScheduleExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new DeleteScheduleRequest())
- ->setName($formattedName);
+ $request = (new DeleteScheduleRequest())->setName($formattedName);
$response = $gapicClient->deleteSchedule($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1269,9 +1287,7 @@ public function diagnoseInstanceTest()
$diagnosticConfig = new DiagnosticConfig();
$diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720';
$diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket);
- $request = (new DiagnoseInstanceRequest())
- ->setName($formattedName)
- ->setDiagnosticConfig($diagnosticConfig);
+ $request = (new DiagnoseInstanceRequest())->setName($formattedName)->setDiagnosticConfig($diagnosticConfig);
$response = $gapicClient->diagnoseInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1329,21 +1345,22 @@ public function diagnoseInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]');
$diagnosticConfig = new DiagnosticConfig();
$diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720';
$diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket);
- $request = (new DiagnoseInstanceRequest())
- ->setName($formattedName)
- ->setDiagnosticConfig($diagnosticConfig);
+ $request = (new DiagnoseInstanceRequest())->setName($formattedName)->setDiagnosticConfig($diagnosticConfig);
$response = $gapicClient->diagnoseInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1387,8 +1404,7 @@ public function getEnvironmentTest()
$transport->addResponse($expectedResponse);
// Mock request
$name = 'name3373707';
- $request = (new GetEnvironmentRequest())
- ->setName($name);
+ $request = (new GetEnvironmentRequest())->setName($name);
$response = $gapicClient->getEnvironment($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1412,17 +1428,19 @@ public function getEnvironmentExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new GetEnvironmentRequest())
- ->setName($name);
+ $request = (new GetEnvironmentRequest())->setName($name);
try {
$gapicClient->getEnvironment($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1459,8 +1477,7 @@ public function getExecutionTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]');
- $request = (new GetExecutionRequest())
- ->setName($formattedName);
+ $request = (new GetExecutionRequest())->setName($formattedName);
$response = $gapicClient->getExecution($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1484,17 +1501,19 @@ public function getExecutionExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]');
- $request = (new GetExecutionRequest())
- ->setName($formattedName);
+ $request = (new GetExecutionRequest())->setName($formattedName);
try {
$gapicClient->getExecution($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1555,8 +1574,7 @@ public function getInstanceTest()
$transport->addResponse($expectedResponse);
// Mock request
$name = 'name3373707';
- $request = (new GetInstanceRequest())
- ->setName($name);
+ $request = (new GetInstanceRequest())->setName($name);
$response = $gapicClient->getInstance($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1580,17 +1598,19 @@ public function getInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new GetInstanceRequest())
- ->setName($name);
+ $request = (new GetInstanceRequest())->setName($name);
try {
$gapicClient->getInstance($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1617,8 +1637,7 @@ public function getInstanceHealthTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]');
- $request = (new GetInstanceHealthRequest())
- ->setName($formattedName);
+ $request = (new GetInstanceHealthRequest())->setName($formattedName);
$response = $gapicClient->getInstanceHealth($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1642,17 +1661,19 @@ public function getInstanceHealthExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]');
- $request = (new GetInstanceHealthRequest())
- ->setName($formattedName);
+ $request = (new GetInstanceHealthRequest())->setName($formattedName);
try {
$gapicClient->getInstanceHealth($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1689,8 +1710,7 @@ public function getScheduleTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new GetScheduleRequest())
- ->setName($formattedName);
+ $request = (new GetScheduleRequest())->setName($formattedName);
$response = $gapicClient->getSchedule($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1714,17 +1734,19 @@ public function getScheduleExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new GetScheduleRequest())
- ->setName($formattedName);
+ $request = (new GetScheduleRequest())->setName($formattedName);
try {
$gapicClient->getSchedule($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1759,8 +1781,7 @@ public function isInstanceUpgradeableTest()
$transport->addResponse($expectedResponse);
// Mock request
$notebookInstance = 'notebookInstance-1078982023';
- $request = (new IsInstanceUpgradeableRequest())
- ->setNotebookInstance($notebookInstance);
+ $request = (new IsInstanceUpgradeableRequest())->setNotebookInstance($notebookInstance);
$response = $gapicClient->isInstanceUpgradeable($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1784,17 +1805,19 @@ public function isInstanceUpgradeableExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$notebookInstance = 'notebookInstance-1078982023';
- $request = (new IsInstanceUpgradeableRequest())
- ->setNotebookInstance($notebookInstance);
+ $request = (new IsInstanceUpgradeableRequest())->setNotebookInstance($notebookInstance);
try {
$gapicClient->isInstanceUpgradeable($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1819,17 +1842,14 @@ public function listEnvironmentsTest()
// Mock response
$nextPageToken = '';
$environmentsElement = new Environment();
- $environments = [
- $environmentsElement,
- ];
+ $environments = [$environmentsElement];
$expectedResponse = new ListEnvironmentsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setEnvironments($environments);
$transport->addResponse($expectedResponse);
// Mock request
$parent = 'parent-995424086';
- $request = (new ListEnvironmentsRequest())
- ->setParent($parent);
+ $request = (new ListEnvironmentsRequest())->setParent($parent);
$response = $gapicClient->listEnvironments($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -1856,17 +1876,19 @@ public function listEnvironmentsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$parent = 'parent-995424086';
- $request = (new ListEnvironmentsRequest())
- ->setParent($parent);
+ $request = (new ListEnvironmentsRequest())->setParent($parent);
try {
$gapicClient->listEnvironments($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1891,17 +1913,14 @@ public function listExecutionsTest()
// Mock response
$nextPageToken = '';
$executionsElement = new Execution();
- $executions = [
- $executionsElement,
- ];
+ $executions = [$executionsElement];
$expectedResponse = new ListExecutionsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setExecutions($executions);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]');
- $request = (new ListExecutionsRequest())
- ->setParent($formattedParent);
+ $request = (new ListExecutionsRequest())->setParent($formattedParent);
$response = $gapicClient->listExecutions($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -1928,17 +1947,19 @@ public function listExecutionsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]');
- $request = (new ListExecutionsRequest())
- ->setParent($formattedParent);
+ $request = (new ListExecutionsRequest())->setParent($formattedParent);
try {
$gapicClient->listExecutions($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1963,17 +1984,14 @@ public function listInstancesTest()
// Mock response
$nextPageToken = '';
$instancesElement = new Instance();
- $instances = [
- $instancesElement,
- ];
+ $instances = [$instancesElement];
$expectedResponse = new ListInstancesResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setInstances($instances);
$transport->addResponse($expectedResponse);
// Mock request
$parent = 'parent-995424086';
- $request = (new ListInstancesRequest())
- ->setParent($parent);
+ $request = (new ListInstancesRequest())->setParent($parent);
$response = $gapicClient->listInstances($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -2000,17 +2018,19 @@ public function listInstancesExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$parent = 'parent-995424086';
- $request = (new ListInstancesRequest())
- ->setParent($parent);
+ $request = (new ListInstancesRequest())->setParent($parent);
try {
$gapicClient->listInstances($request);
// If the $gapicClient method call did not throw, fail the test
@@ -2035,17 +2055,14 @@ public function listSchedulesTest()
// Mock response
$nextPageToken = '';
$schedulesElement = new Schedule();
- $schedules = [
- $schedulesElement,
- ];
+ $schedules = [$schedulesElement];
$expectedResponse = new ListSchedulesResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setSchedules($schedules);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new ListSchedulesRequest())
- ->setParent($formattedParent);
+ $request = (new ListSchedulesRequest())->setParent($formattedParent);
$response = $gapicClient->listSchedules($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -2072,17 +2089,19 @@ public function listSchedulesExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new ListSchedulesRequest())
- ->setParent($formattedParent);
+ $request = (new ListSchedulesRequest())->setParent($formattedParent);
try {
$gapicClient->listSchedules($request);
// If the $gapicClient method call did not throw, fail the test
@@ -2162,9 +2181,7 @@ public function registerInstanceTest()
// Mock request
$parent = 'parent-995424086';
$instanceId = 'instanceId-2101995259';
- $request = (new RegisterInstanceRequest())
- ->setParent($parent)
- ->setInstanceId($instanceId);
+ $request = (new RegisterInstanceRequest())->setParent($parent)->setInstanceId($instanceId);
$response = $gapicClient->registerInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2222,19 +2239,20 @@ public function registerInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$parent = 'parent-995424086';
$instanceId = 'instanceId-2101995259';
- $request = (new RegisterInstanceRequest())
- ->setParent($parent)
- ->setInstanceId($instanceId);
+ $request = (new RegisterInstanceRequest())->setParent($parent)->setInstanceId($instanceId);
$response = $gapicClient->registerInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2323,9 +2341,7 @@ public function reportInstanceInfoTest()
// Mock request
$name = 'name3373707';
$vmId = 'vmId112317347';
- $request = (new ReportInstanceInfoRequest())
- ->setName($name)
- ->setVmId($vmId);
+ $request = (new ReportInstanceInfoRequest())->setName($name)->setVmId($vmId);
$response = $gapicClient->reportInstanceInfo($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2383,19 +2399,20 @@ public function reportInstanceInfoExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
$vmId = 'vmId112317347';
- $request = (new ReportInstanceInfoRequest())
- ->setName($name)
- ->setVmId($vmId);
+ $request = (new ReportInstanceInfoRequest())->setName($name)->setVmId($vmId);
$response = $gapicClient->reportInstanceInfo($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2483,8 +2500,7 @@ public function resetInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new ResetInstanceRequest())
- ->setName($name);
+ $request = (new ResetInstanceRequest())->setName($name);
$response = $gapicClient->resetInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2540,17 +2556,19 @@ public function resetInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new ResetInstanceRequest())
- ->setName($name);
+ $request = (new ResetInstanceRequest())->setName($name);
$response = $gapicClient->resetInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2639,9 +2657,7 @@ public function rollbackInstanceTest()
// Mock request
$name = 'name3373707';
$targetSnapshot = 'targetSnapshot556386482';
- $request = (new RollbackInstanceRequest())
- ->setName($name)
- ->setTargetSnapshot($targetSnapshot);
+ $request = (new RollbackInstanceRequest())->setName($name)->setTargetSnapshot($targetSnapshot);
$response = $gapicClient->rollbackInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2699,19 +2715,20 @@ public function rollbackInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
$targetSnapshot = 'targetSnapshot556386482';
- $request = (new RollbackInstanceRequest())
- ->setName($name)
- ->setTargetSnapshot($targetSnapshot);
+ $request = (new RollbackInstanceRequest())->setName($name)->setTargetSnapshot($targetSnapshot);
$response = $gapicClient->rollbackInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2864,12 +2881,15 @@ public function setInstanceAcceleratorExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
@@ -2966,8 +2986,7 @@ public function setInstanceLabelsTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new SetInstanceLabelsRequest())
- ->setName($name);
+ $request = (new SetInstanceLabelsRequest())->setName($name);
$response = $gapicClient->setInstanceLabels($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3023,17 +3042,19 @@ public function setInstanceLabelsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new SetInstanceLabelsRequest())
- ->setName($name);
+ $request = (new SetInstanceLabelsRequest())->setName($name);
$response = $gapicClient->setInstanceLabels($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3122,9 +3143,7 @@ public function setInstanceMachineTypeTest()
// Mock request
$name = 'name3373707';
$machineType = 'machineType1838323762';
- $request = (new SetInstanceMachineTypeRequest())
- ->setName($name)
- ->setMachineType($machineType);
+ $request = (new SetInstanceMachineTypeRequest())->setName($name)->setMachineType($machineType);
$response = $gapicClient->setInstanceMachineType($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3182,19 +3201,20 @@ public function setInstanceMachineTypeExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
$machineType = 'machineType1838323762';
- $request = (new SetInstanceMachineTypeRequest())
- ->setName($name)
- ->setMachineType($machineType);
+ $request = (new SetInstanceMachineTypeRequest())->setName($name)->setMachineType($machineType);
$response = $gapicClient->setInstanceMachineType($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3282,8 +3302,7 @@ public function startInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new StartInstanceRequest())
- ->setName($name);
+ $request = (new StartInstanceRequest())->setName($name);
$response = $gapicClient->startInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3339,17 +3358,19 @@ public function startInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new StartInstanceRequest())
- ->setName($name);
+ $request = (new StartInstanceRequest())->setName($name);
$response = $gapicClient->startInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3437,8 +3458,7 @@ public function stopInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new StopInstanceRequest())
- ->setName($name);
+ $request = (new StopInstanceRequest())->setName($name);
$response = $gapicClient->stopInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3494,17 +3514,19 @@ public function stopInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new StopInstanceRequest())
- ->setName($name);
+ $request = (new StopInstanceRequest())->setName($name);
$response = $gapicClient->stopInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3568,8 +3590,7 @@ public function triggerScheduleTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new TriggerScheduleRequest())
- ->setName($formattedName);
+ $request = (new TriggerScheduleRequest())->setName($formattedName);
$response = $gapicClient->triggerSchedule($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3625,17 +3646,19 @@ public function triggerScheduleExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]');
- $request = (new TriggerScheduleRequest())
- ->setName($formattedName);
+ $request = (new TriggerScheduleRequest())->setName($formattedName);
$response = $gapicClient->triggerSchedule($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3723,8 +3746,7 @@ public function updateInstanceConfigTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new UpdateInstanceConfigRequest())
- ->setName($name);
+ $request = (new UpdateInstanceConfigRequest())->setName($name);
$response = $gapicClient->updateInstanceConfig($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3780,17 +3802,19 @@ public function updateInstanceConfigExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new UpdateInstanceConfigRequest())
- ->setName($name);
+ $request = (new UpdateInstanceConfigRequest())->setName($name);
$response = $gapicClient->updateInstanceConfig($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3826,8 +3850,7 @@ public function updateInstanceMetadataItemsTest()
$transport->addResponse($expectedResponse);
// Mock request
$name = 'name3373707';
- $request = (new UpdateInstanceMetadataItemsRequest())
- ->setName($name);
+ $request = (new UpdateInstanceMetadataItemsRequest())->setName($name);
$response = $gapicClient->updateInstanceMetadataItems($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -3851,17 +3874,19 @@ public function updateInstanceMetadataItemsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new UpdateInstanceMetadataItemsRequest())
- ->setName($name);
+ $request = (new UpdateInstanceMetadataItemsRequest())->setName($name);
try {
$gapicClient->updateInstanceMetadataItems($request);
// If the $gapicClient method call did not throw, fail the test
@@ -3940,8 +3965,7 @@ public function updateShieldedInstanceConfigTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new UpdateShieldedInstanceConfigRequest())
- ->setName($name);
+ $request = (new UpdateShieldedInstanceConfigRequest())->setName($name);
$response = $gapicClient->updateShieldedInstanceConfig($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -3951,7 +3975,10 @@ public function updateShieldedInstanceConfigTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpdateShieldedInstanceConfig', $actualApiFuncCall);
+ $this->assertSame(
+ '/google.cloud.notebooks.v1.NotebookService/UpdateShieldedInstanceConfig',
+ $actualApiFuncCall
+ );
$actualValue = $actualApiRequestObject->getName();
$this->assertProtobufEquals($name, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
@@ -3997,17 +4024,19 @@ public function updateShieldedInstanceConfigExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new UpdateShieldedInstanceConfigRequest())
- ->setName($name);
+ $request = (new UpdateShieldedInstanceConfigRequest())->setName($name);
$response = $gapicClient->updateShieldedInstanceConfig($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -4095,8 +4124,7 @@ public function upgradeInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new UpgradeInstanceRequest())
- ->setName($name);
+ $request = (new UpgradeInstanceRequest())->setName($name);
$response = $gapicClient->upgradeInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -4152,17 +4180,19 @@ public function upgradeInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new UpgradeInstanceRequest())
- ->setName($name);
+ $request = (new UpgradeInstanceRequest())->setName($name);
$response = $gapicClient->upgradeInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -4251,9 +4281,7 @@ public function upgradeInstanceInternalTest()
// Mock request
$name = 'name3373707';
$vmId = 'vmId112317347';
- $request = (new UpgradeInstanceInternalRequest())
- ->setName($name)
- ->setVmId($vmId);
+ $request = (new UpgradeInstanceInternalRequest())->setName($name)->setVmId($vmId);
$response = $gapicClient->upgradeInstanceInternal($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -4311,19 +4339,20 @@ public function upgradeInstanceInternalExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
$vmId = 'vmId112317347';
- $request = (new UpgradeInstanceInternalRequest())
- ->setName($name)
- ->setVmId($vmId);
+ $request = (new UpgradeInstanceInternalRequest())->setName($name)->setVmId($vmId);
$response = $gapicClient->upgradeInstanceInternal($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -4385,12 +4414,15 @@ public function getLocationExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new GetLocationRequest();
try {
@@ -4417,9 +4449,7 @@ public function listLocationsTest()
// Mock response
$nextPageToken = '';
$locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
+ $locations = [$locationsElement];
$expectedResponse = new ListLocationsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setLocations($locations);
@@ -4449,12 +4479,15 @@ public function listLocationsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new ListLocationsRequest();
try {
@@ -4487,8 +4520,7 @@ public function getIamPolicyTest()
$transport->addResponse($expectedResponse);
// Mock request
$resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
+ $request = (new GetIamPolicyRequest())->setResource($resource);
$response = $gapicClient->getIamPolicy($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -4512,17 +4544,19 @@ public function getIamPolicyExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
+ $request = (new GetIamPolicyRequest())->setResource($resource);
try {
$gapicClient->getIamPolicy($request);
// If the $gapicClient method call did not throw, fail the test
@@ -4554,9 +4588,7 @@ public function setIamPolicyTest()
// Mock request
$resource = 'resource-341064690';
$policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
+ $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy);
$response = $gapicClient->setIamPolicy($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -4582,19 +4614,20 @@ public function setIamPolicyExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
$policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
+ $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy);
try {
$gapicClient->setIamPolicy($request);
// If the $gapicClient method call did not throw, fail the test
@@ -4622,9 +4655,7 @@ public function testIamPermissionsTest()
// Mock request
$resource = 'resource-341064690';
$permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
+ $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions);
$response = $gapicClient->testIamPermissions($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -4650,19 +4681,20 @@ public function testIamPermissionsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
$permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
+ $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions);
try {
$gapicClient->testIamPermissions($request);
// If the $gapicClient method call did not throw, fail the test
diff --git a/Notebooks/tests/Unit/V1beta1/NotebookServiceClientTest.php b/Notebooks/tests/Unit/V1beta1/NotebookServiceClientTest.php
deleted file mode 100644
index 87e99808942f..000000000000
--- a/Notebooks/tests/Unit/V1beta1/NotebookServiceClientTest.php
+++ /dev/null
@@ -1,2785 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return NotebookServiceClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new NotebookServiceClient($options);
- }
-
- /** @test */
- public function createEnvironmentTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createEnvironmentTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $displayName = 'displayName1615086568';
- $description = 'description-1724546052';
- $postStartupScript = 'postStartupScript355382860';
- $expectedResponse = new Environment();
- $expectedResponse->setName($name);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setDescription($description);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createEnvironmentTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $parent = 'parent-995424086';
- $environmentId = 'environmentId608412359';
- $environment = new Environment();
- $response = $gapicClient->createEnvironment($parent, $environmentId, $environment);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/CreateEnvironment', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($parent, $actualValue);
- $actualValue = $actualApiRequestObject->getEnvironmentId();
- $this->assertProtobufEquals($environmentId, $actualValue);
- $actualValue = $actualApiRequestObject->getEnvironment();
- $this->assertProtobufEquals($environment, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createEnvironmentTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createEnvironmentExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createEnvironmentTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $parent = 'parent-995424086';
- $environmentId = 'environmentId608412359';
- $environment = new Environment();
- $response = $gapicClient->createEnvironment($parent, $environmentId, $environment);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createEnvironmentTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createInstanceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createInstanceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $parent = 'parent-995424086';
- $instanceId = 'instanceId-2101995259';
- $instance = new Instance();
- $instanceMachineType = 'instanceMachineType-107765684';
- $instance->setMachineType($instanceMachineType);
- $response = $gapicClient->createInstance($parent, $instanceId, $instance);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/CreateInstance', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($parent, $actualValue);
- $actualValue = $actualApiRequestObject->getInstanceId();
- $this->assertProtobufEquals($instanceId, $actualValue);
- $actualValue = $actualApiRequestObject->getInstance();
- $this->assertProtobufEquals($instance, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createInstanceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createInstanceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $parent = 'parent-995424086';
- $instanceId = 'instanceId-2101995259';
- $instance = new Instance();
- $instanceMachineType = 'instanceMachineType-107765684';
- $instance->setMachineType($instanceMachineType);
- $response = $gapicClient->createInstance($parent, $instanceId, $instance);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createInstanceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteEnvironmentTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteEnvironmentTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteEnvironmentTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->deleteEnvironment($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/DeleteEnvironment', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteEnvironmentExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteEnvironmentTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->deleteEnvironment($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteInstanceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteInstanceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->deleteInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/DeleteInstance', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteInstanceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteInstanceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->deleteInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteInstanceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getEnvironmentTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $displayName = 'displayName1615086568';
- $description = 'description-1724546052';
- $postStartupScript = 'postStartupScript355382860';
- $expectedResponse = new Environment();
- $expectedResponse->setName($name2);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setDescription($description);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->getEnvironment($name);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/GetEnvironment', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getEnvironmentExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- try {
- $gapicClient->getEnvironment($name);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getInstanceTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->getInstance($name);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/GetInstance', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getInstanceExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- try {
- $gapicClient->getInstance($name);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function isInstanceUpgradeableTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $upgradeable = true;
- $upgradeVersion = 'upgradeVersion1040155061';
- $upgradeInfo = 'upgradeInfo-1337232143';
- $upgradeImage = 'upgradeImage1495441784';
- $expectedResponse = new IsInstanceUpgradeableResponse();
- $expectedResponse->setUpgradeable($upgradeable);
- $expectedResponse->setUpgradeVersion($upgradeVersion);
- $expectedResponse->setUpgradeInfo($upgradeInfo);
- $expectedResponse->setUpgradeImage($upgradeImage);
- $transport->addResponse($expectedResponse);
- // Mock request
- $notebookInstance = 'notebookInstance-1078982023';
- $response = $gapicClient->isInstanceUpgradeable($notebookInstance);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/IsInstanceUpgradeable', $actualFuncCall);
- $actualValue = $actualRequestObject->getNotebookInstance();
- $this->assertProtobufEquals($notebookInstance, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function isInstanceUpgradeableExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $notebookInstance = 'notebookInstance-1078982023';
- try {
- $gapicClient->isInstanceUpgradeable($notebookInstance);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listEnvironmentsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $environmentsElement = new Environment();
- $environments = [
- $environmentsElement,
- ];
- $expectedResponse = new ListEnvironmentsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setEnvironments($environments);
- $transport->addResponse($expectedResponse);
- // Mock request
- $parent = 'parent-995424086';
- $response = $gapicClient->listEnvironments($parent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/ListEnvironments', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($parent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listEnvironmentsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $parent = 'parent-995424086';
- try {
- $gapicClient->listEnvironments($parent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listInstancesTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $instancesElement = new Instance();
- $instances = [
- $instancesElement,
- ];
- $expectedResponse = new ListInstancesResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setInstances($instances);
- $transport->addResponse($expectedResponse);
- // Mock request
- $parent = 'parent-995424086';
- $response = $gapicClient->listInstances($parent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/ListInstances', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($parent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listInstancesExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $parent = 'parent-995424086';
- try {
- $gapicClient->listInstances($parent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function registerInstanceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/registerInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/registerInstanceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $parent = 'parent-995424086';
- $instanceId = 'instanceId-2101995259';
- $response = $gapicClient->registerInstance($parent, $instanceId);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/RegisterInstance', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($parent, $actualValue);
- $actualValue = $actualApiRequestObject->getInstanceId();
- $this->assertProtobufEquals($instanceId, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/registerInstanceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function registerInstanceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/registerInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $parent = 'parent-995424086';
- $instanceId = 'instanceId-2101995259';
- $response = $gapicClient->registerInstance($parent, $instanceId);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/registerInstanceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function reportInstanceInfoTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/reportInstanceInfoTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/reportInstanceInfoTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $vmId = 'vmId112317347';
- $response = $gapicClient->reportInstanceInfo($name, $vmId);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/ReportInstanceInfo', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $actualValue = $actualApiRequestObject->getVmId();
- $this->assertProtobufEquals($vmId, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/reportInstanceInfoTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function reportInstanceInfoExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/reportInstanceInfoTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $vmId = 'vmId112317347';
- $response = $gapicClient->reportInstanceInfo($name, $vmId);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/reportInstanceInfoTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function resetInstanceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/resetInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/resetInstanceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->resetInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/ResetInstance', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/resetInstanceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function resetInstanceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/resetInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->resetInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/resetInstanceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function setInstanceAcceleratorTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/setInstanceAcceleratorTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/setInstanceAcceleratorTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED;
- $coreCount = 1963855761;
- $response = $gapicClient->setInstanceAccelerator($name, $type, $coreCount);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/SetInstanceAccelerator', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $actualValue = $actualApiRequestObject->getType();
- $this->assertProtobufEquals($type, $actualValue);
- $actualValue = $actualApiRequestObject->getCoreCount();
- $this->assertProtobufEquals($coreCount, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/setInstanceAcceleratorTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function setInstanceAcceleratorExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/setInstanceAcceleratorTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED;
- $coreCount = 1963855761;
- $response = $gapicClient->setInstanceAccelerator($name, $type, $coreCount);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/setInstanceAcceleratorTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function setInstanceLabelsTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/setInstanceLabelsTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/setInstanceLabelsTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->setInstanceLabels($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/SetInstanceLabels', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/setInstanceLabelsTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function setInstanceLabelsExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/setInstanceLabelsTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->setInstanceLabels($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/setInstanceLabelsTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function setInstanceMachineTypeTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/setInstanceMachineTypeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType2 = 'machineType21397579621';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType2);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/setInstanceMachineTypeTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $machineType = 'machineType1838323762';
- $response = $gapicClient->setInstanceMachineType($name, $machineType);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/SetInstanceMachineType', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $actualValue = $actualApiRequestObject->getMachineType();
- $this->assertProtobufEquals($machineType, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/setInstanceMachineTypeTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function setInstanceMachineTypeExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/setInstanceMachineTypeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $machineType = 'machineType1838323762';
- $response = $gapicClient->setInstanceMachineType($name, $machineType);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/setInstanceMachineTypeTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function startInstanceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/startInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/startInstanceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->startInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/StartInstance', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/startInstanceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function startInstanceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/startInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->startInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/startInstanceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function stopInstanceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/stopInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/stopInstanceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->stopInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/StopInstance', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/stopInstanceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function stopInstanceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/stopInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->stopInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/stopInstanceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function upgradeInstanceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/upgradeInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/upgradeInstanceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->upgradeInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/UpgradeInstance', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function upgradeInstanceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/upgradeInstanceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->upgradeInstance($name);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function upgradeInstanceInternalTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/upgradeInstanceInternalTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $postStartupScript = 'postStartupScript355382860';
- $proxyUri = 'proxyUri-475670501';
- $serviceAccount = 'serviceAccount-1948028253';
- $machineType = 'machineType1838323762';
- $installGpuDriver = false;
- $customGpuDriverPath = 'customGpuDriverPath1863223803';
- $bootDiskSizeGb = 1398920548;
- $dataDiskSizeGb = 1668379732;
- $noRemoveDataDisk = false;
- $kmsKey = 'kmsKey-591635343';
- $noPublicIp = false;
- $noProxyAccess = false;
- $network = 'network1843485230';
- $subnet = 'subnet-891534499';
- $canIpForward = true;
- $expectedResponse = new Instance();
- $expectedResponse->setName($name2);
- $expectedResponse->setPostStartupScript($postStartupScript);
- $expectedResponse->setProxyUri($proxyUri);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setMachineType($machineType);
- $expectedResponse->setInstallGpuDriver($installGpuDriver);
- $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath);
- $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb);
- $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb);
- $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk);
- $expectedResponse->setKmsKey($kmsKey);
- $expectedResponse->setNoPublicIp($noPublicIp);
- $expectedResponse->setNoProxyAccess($noProxyAccess);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setSubnet($subnet);
- $expectedResponse->setCanIpForward($canIpForward);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/upgradeInstanceInternalTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $name = 'name3373707';
- $vmId = 'vmId112317347';
- $response = $gapicClient->upgradeInstanceInternal($name, $vmId);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.notebooks.v1beta1.NotebookService/UpgradeInstanceInternal', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $actualValue = $actualApiRequestObject->getVmId();
- $this->assertProtobufEquals($vmId, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/upgradeInstanceInternalTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function upgradeInstanceInternalExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/upgradeInstanceInternalTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $name = 'name3373707';
- $vmId = 'vmId112317347';
- $response = $gapicClient->upgradeInstanceInternal($name, $vmId);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/upgradeInstanceInternalTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getLocationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $locationId = 'locationId552319461';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Location();
- $expectedResponse->setName($name2);
- $expectedResponse->setLocationId($locationId);
- $expectedResponse->setDisplayName($displayName);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->getLocation();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getLocationExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->getLocation();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
- $expectedResponse = new ListLocationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setLocations($locations);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->listLocations();
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->listLocations();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/Notebooks/tests/Unit/V2/Client/NotebookServiceClientTest.php b/Notebooks/tests/Unit/V2/Client/NotebookServiceClientTest.php
index 1b6594282982..a491fa765b98 100644
--- a/Notebooks/tests/Unit/V2/Client/NotebookServiceClientTest.php
+++ b/Notebooks/tests/Unit/V2/Client/NotebookServiceClientTest.php
@@ -1,6 +1,6 @@
getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
+ return $this->getMockBuilder(CredentialsWrapper::class)
+ ->disableOriginalConstructor()
+ ->getMock();
}
/** @return NotebookServiceClient */
@@ -110,8 +112,7 @@ public function checkInstanceUpgradabilityTest()
$transport->addResponse($expectedResponse);
// Mock request
$notebookInstance = 'notebookInstance-1078982023';
- $request = (new CheckInstanceUpgradabilityRequest())
- ->setNotebookInstance($notebookInstance);
+ $request = (new CheckInstanceUpgradabilityRequest())->setNotebookInstance($notebookInstance);
$response = $gapicClient->checkInstanceUpgradability($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -135,17 +136,19 @@ public function checkInstanceUpgradabilityExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$notebookInstance = 'notebookInstance-1078982023';
- $request = (new CheckInstanceUpgradabilityRequest())
- ->setNotebookInstance($notebookInstance);
+ $request = (new CheckInstanceUpgradabilityRequest())->setNotebookInstance($notebookInstance);
try {
$gapicClient->checkInstanceUpgradability($request);
// If the $gapicClient method call did not throw, fail the test
@@ -265,12 +268,15 @@ public function createInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
@@ -333,8 +339,7 @@ public function deleteInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
- $request = (new DeleteInstanceRequest())
- ->setName($formattedName);
+ $request = (new DeleteInstanceRequest())->setName($formattedName);
$response = $gapicClient->deleteInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -390,17 +395,19 @@ public function deleteInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
- $request = (new DeleteInstanceRequest())
- ->setName($formattedName);
+ $request = (new DeleteInstanceRequest())->setName($formattedName);
$response = $gapicClient->deleteInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -467,9 +474,7 @@ public function diagnoseInstanceTest()
$diagnosticConfig = new DiagnosticConfig();
$diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720';
$diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket);
- $request = (new DiagnoseInstanceRequest())
- ->setName($formattedName)
- ->setDiagnosticConfig($diagnosticConfig);
+ $request = (new DiagnoseInstanceRequest())->setName($formattedName)->setDiagnosticConfig($diagnosticConfig);
$response = $gapicClient->diagnoseInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -527,21 +532,22 @@ public function diagnoseInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$diagnosticConfig = new DiagnosticConfig();
$diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720';
$diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket);
- $request = (new DiagnoseInstanceRequest())
- ->setName($formattedName)
- ->setDiagnosticConfig($diagnosticConfig);
+ $request = (new DiagnoseInstanceRequest())->setName($formattedName)->setDiagnosticConfig($diagnosticConfig);
$response = $gapicClient->diagnoseInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -587,8 +593,7 @@ public function getInstanceTest()
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
- $request = (new GetInstanceRequest())
- ->setName($formattedName);
+ $request = (new GetInstanceRequest())->setName($formattedName);
$response = $gapicClient->getInstance($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -612,17 +617,19 @@ public function getInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
- $request = (new GetInstanceRequest())
- ->setName($formattedName);
+ $request = (new GetInstanceRequest())->setName($formattedName);
try {
$gapicClient->getInstance($request);
// If the $gapicClient method call did not throw, fail the test
@@ -647,17 +654,14 @@ public function listInstancesTest()
// Mock response
$nextPageToken = '';
$instancesElement = new Instance();
- $instances = [
- $instancesElement,
- ];
+ $instances = [$instancesElement];
$expectedResponse = new ListInstancesResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setInstances($instances);
$transport->addResponse($expectedResponse);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListInstancesRequest())
- ->setParent($formattedParent);
+ $request = (new ListInstancesRequest())->setParent($formattedParent);
$response = $gapicClient->listInstances($request);
$this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
$resources = iterator_to_array($response->iterateAllElements());
@@ -684,17 +688,19 @@ public function listInstancesExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListInstancesRequest())
- ->setParent($formattedParent);
+ $request = (new ListInstancesRequest())->setParent($formattedParent);
try {
$gapicClient->listInstances($request);
// If the $gapicClient method call did not throw, fail the test
@@ -749,8 +755,7 @@ public function resetInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new ResetInstanceRequest())
- ->setName($name);
+ $request = (new ResetInstanceRequest())->setName($name);
$response = $gapicClient->resetInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -806,17 +811,19 @@ public function resetInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new ResetInstanceRequest())
- ->setName($name);
+ $request = (new ResetInstanceRequest())->setName($name);
$response = $gapicClient->resetInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -945,12 +952,15 @@ public function rollbackInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
@@ -1023,8 +1033,7 @@ public function startInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new StartInstanceRequest())
- ->setName($name);
+ $request = (new StartInstanceRequest())->setName($name);
$response = $gapicClient->startInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1080,17 +1089,19 @@ public function startInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new StartInstanceRequest())
- ->setName($name);
+ $request = (new StartInstanceRequest())->setName($name);
$response = $gapicClient->startInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1154,8 +1165,7 @@ public function stopInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new StopInstanceRequest())
- ->setName($name);
+ $request = (new StopInstanceRequest())->setName($name);
$response = $gapicClient->stopInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1211,17 +1221,19 @@ public function stopInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new StopInstanceRequest())
- ->setName($name);
+ $request = (new StopInstanceRequest())->setName($name);
$response = $gapicClient->stopInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1286,9 +1298,7 @@ public function updateInstanceTest()
// Mock request
$instance = new Instance();
$updateMask = new FieldMask();
- $request = (new UpdateInstanceRequest())
- ->setInstance($instance)
- ->setUpdateMask($updateMask);
+ $request = (new UpdateInstanceRequest())->setInstance($instance)->setUpdateMask($updateMask);
$response = $gapicClient->updateInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1346,19 +1356,20 @@ public function updateInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$instance = new Instance();
$updateMask = new FieldMask();
- $request = (new UpdateInstanceRequest())
- ->setInstance($instance)
- ->setUpdateMask($updateMask);
+ $request = (new UpdateInstanceRequest())->setInstance($instance)->setUpdateMask($updateMask);
$response = $gapicClient->updateInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1422,8 +1433,7 @@ public function upgradeInstanceTest()
$operationsTransport->addResponse($completeOperation);
// Mock request
$name = 'name3373707';
- $request = (new UpgradeInstanceRequest())
- ->setName($name);
+ $request = (new UpgradeInstanceRequest())->setName($name);
$response = $gapicClient->upgradeInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1479,17 +1489,19 @@ public function upgradeInstanceExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$operationsTransport->addResponse(null, $status);
// Mock request
$name = 'name3373707';
- $request = (new UpgradeInstanceRequest())
- ->setName($name);
+ $request = (new UpgradeInstanceRequest())->setName($name);
$response = $gapicClient->upgradeInstance($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1551,12 +1563,15 @@ public function getLocationExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new GetLocationRequest();
try {
@@ -1583,9 +1598,7 @@ public function listLocationsTest()
// Mock response
$nextPageToken = '';
$locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
+ $locations = [$locationsElement];
$expectedResponse = new ListLocationsResponse();
$expectedResponse->setNextPageToken($nextPageToken);
$expectedResponse->setLocations($locations);
@@ -1615,12 +1628,15 @@ public function listLocationsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
$request = new ListLocationsRequest();
try {
@@ -1653,8 +1669,7 @@ public function getIamPolicyTest()
$transport->addResponse($expectedResponse);
// Mock request
$resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
+ $request = (new GetIamPolicyRequest())->setResource($resource);
$response = $gapicClient->getIamPolicy($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1678,17 +1693,19 @@ public function getIamPolicyExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
+ $request = (new GetIamPolicyRequest())->setResource($resource);
try {
$gapicClient->getIamPolicy($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1720,9 +1737,7 @@ public function setIamPolicyTest()
// Mock request
$resource = 'resource-341064690';
$policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
+ $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy);
$response = $gapicClient->setIamPolicy($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1748,19 +1763,20 @@ public function setIamPolicyExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
$policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
+ $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy);
try {
$gapicClient->setIamPolicy($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1788,9 +1804,7 @@ public function testIamPermissionsTest()
// Mock request
$resource = 'resource-341064690';
$permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
+ $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions);
$response = $gapicClient->testIamPermissions($request);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -1816,19 +1830,20 @@ public function testIamPermissionsExceptionTest()
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
$transport->addResponse(null, $status);
// Mock request
$resource = 'resource-341064690';
$permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
+ $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions);
try {
$gapicClient->testIamPermissions($request);
// If the $gapicClient method call did not throw, fail the test
@@ -1863,8 +1878,7 @@ public function checkInstanceUpgradabilityAsyncTest()
$transport->addResponse($expectedResponse);
// Mock request
$notebookInstance = 'notebookInstance-1078982023';
- $request = (new CheckInstanceUpgradabilityRequest())
- ->setNotebookInstance($notebookInstance);
+ $request = (new CheckInstanceUpgradabilityRequest())->setNotebookInstance($notebookInstance);
$response = $gapicClient->checkInstanceUpgradabilityAsync($request)->wait();
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();