From c2d140b25f3545a7a8df2cf164318840b6dc1da3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:32:16 -0700 Subject: [PATCH] feat: add support for Spark Connect sessions in Dataproc Serverless for Spark (#7700) docs: update docs for `filter` field in `ListSessionsRequest` PiperOrigin-RevId: 678438691 Source-Link: https://github.com/googleapis/googleapis/commit/5c181aaf78bd1ae2e08c3a2971cd9e87b6e00986 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3b37678e3ed4e52f2a122ea91738a9e7b5f4cba1 Copy-Tag: eyJwIjoiRGF0YXByb2MvLk93bEJvdC55YW1sIiwiaCI6IjNiMzc2NzhlM2VkNGU1MmYyYTEyMmVhOTE3MzhhOWU3YjVmNGNiYTEifQ== --- Dataproc/metadata/V1/SessionTemplates.php | Bin 4080 -> 4164 bytes Dataproc/metadata/V1/Sessions.php | Bin 4635 -> 4741 bytes Dataproc/src/V1/ListSessionsRequest.php | 28 ++++++++++-------- Dataproc/src/V1/Session.php | 33 ++++++++++++++++++++++ Dataproc/src/V1/SessionTemplate.php | 33 ++++++++++++++++++++++ Dataproc/src/V1/SparkConnectConfig.php | 33 ++++++++++++++++++++++ 6 files changed, 115 insertions(+), 12 deletions(-) create mode 100644 Dataproc/src/V1/SparkConnectConfig.php diff --git a/Dataproc/metadata/V1/SessionTemplates.php b/Dataproc/metadata/V1/SessionTemplates.php index 2dfa7b62e8102a1a42c701f3734ce3b0a315940f..e7a914ac62446e8a2ed1ebdd2f9bbe2eb3a4b01b 100644 GIT binary patch delta 83 zcmew$e?(!!ab}iv5?lt8b6FHNzh)L-VQOKU{Fi;dLJ*f|aY15Hc6@SvUS4W)Nqli? iadBpTo&>i7qXxH;&g6^SQar&R70wU^o7ZtTu>%0Z`W$iq delta 33 pcmX@2@IijVab}iV;#>xkb6FHNzh)L-VcNht`7ita%>tYz>;To!3yJ^$ diff --git a/Dataproc/metadata/V1/Sessions.php b/Dataproc/metadata/V1/Sessions.php index 4b9e4dfa3e268a7b703fa46dd5b80de121a755da..df6cb9893dc2229e0459df677bae1b7ac044c2af 100644 GIT binary patch delta 105 zcmbQO(yF?loSA8l?B+`5SIkVyxhAKwZ%_#05-l!BEXs~g&d.google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null + */ + public function getSparkConnectSession() + { + return $this->readOneof(17); + } + + public function hasSparkConnectSession() + { + return $this->hasOneof(17); + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var + * @return $this + */ + public function setSparkConnectSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); + $this->writeOneof(17, $var); + + return $this; + } + /** * Output only. Runtime information about session execution. * diff --git a/Dataproc/src/V1/SessionTemplate.php b/Dataproc/src/V1/SessionTemplate.php index 3c96f753f7cd..67f8bbc9f743 100644 --- a/Dataproc/src/V1/SessionTemplate.php +++ b/Dataproc/src/V1/SessionTemplate.php @@ -92,6 +92,8 @@ class SessionTemplate extends \Google\Protobuf\Internal\Message * Output only. The time when the template was created. * @type \Google\Cloud\Dataproc\V1\JupyterConfig $jupyter_session * Optional. Jupyter session config. + * @type \Google\Cloud\Dataproc\V1\SparkConnectConfig $spark_connect_session + * Optional. Spark Connect session config. * @type string $creator * Output only. The email address of the user who created the template. * @type array|\Google\Protobuf\Internal\MapField $labels @@ -237,6 +239,37 @@ public function setJupyterSession($var) return $this; } + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null + */ + public function getSparkConnectSession() + { + return $this->readOneof(11); + } + + public function hasSparkConnectSession() + { + return $this->hasOneof(11); + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var + * @return $this + */ + public function setSparkConnectSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); + $this->writeOneof(11, $var); + + return $this; + } + /** * Output only. The email address of the user who created the template. * diff --git a/Dataproc/src/V1/SparkConnectConfig.php b/Dataproc/src/V1/SparkConnectConfig.php new file mode 100644 index 000000000000..abbf6f34ebbe --- /dev/null +++ b/Dataproc/src/V1/SparkConnectConfig.php @@ -0,0 +1,33 @@ +google.cloud.dataproc.v1.SparkConnectConfig + */ +class SparkConnectConfig extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); + parent::__construct($data); + } + +} +