Skip to content

Commit 919fd4c

Browse files
authored
chore(google-cloud-dataproc): regenerate (#16634)
PR created by the Librarian CLI to generate Cloud Client Libraries code from protos. BEGIN_COMMIT BEGIN_NESTED_COMMIT feat: Add `Engine` field to support LightningEngine in clusters and add support for stop ttl PiperOrigin-RevId: 897294662 Library-IDs: google-cloud-dataproc Source-link: [https://github.com/googleapis/googleapis/commit/2da86587](https://github.com/googleapis/googleapis/commit/2da86587) END_NESTED_COMMIT END_COMMIT This pull request is generated with proto changes between [https://github.com/googleapis/googleapis/commit/1133adb1](https://github.com/googleapis/googleapis/commit/1133adb136f742df62864f1d9d307df25d451880) (exclusive) and [https://github.com/googleapis/googleapis/commit/2da86587](https://github.com/googleapis/googleapis/commit/2da86587126416eb48d561cd800bb03afa2f501a) (inclusive). Librarian Version: v1.0.2-0.20260325150042-e450f8f7dcab Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:234b9d1f2ddb057ed7ac6a38db0bf8163d839c65c6cf88ade52530cddebce59e
1 parent 662fcf1 commit 919fd4c

File tree

4 files changed

+84
-1
lines changed

4 files changed

+84
-1
lines changed

.librarian/state.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ libraries:
15311531
tag_format: '{id}-v{version}'
15321532
- id: google-cloud-dataproc
15331533
version: 5.26.0
1534-
last_generated_commit: 1133adb136f742df62864f1d9d307df25d451880
1534+
last_generated_commit: 38ed7d6ba66a774924722146f054d12b4487a89f
15351535
apis:
15361536
- path: google/cloud/dataproc/v1
15371537
service_config: dataproc_v1.yaml

packages/google-cloud-dataproc/google/cloud/dataproc_v1/types/clusters.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ class ClusterConfig(proto.Message):
183183
Optional. The type of the cluster.
184184
cluster_tier (google.cloud.dataproc_v1.types.ClusterConfig.ClusterTier):
185185
Optional. The cluster tier.
186+
engine (google.cloud.dataproc_v1.types.ClusterConfig.Engine):
187+
Optional. The cluster engine.
186188
config_bucket (str):
187189
Optional. A Cloud Storage bucket used to stage job
188190
dependencies, config files, and job driver console output.
@@ -300,6 +302,23 @@ class ClusterTier(proto.Enum):
300302
CLUSTER_TIER_STANDARD = 1
301303
CLUSTER_TIER_PREMIUM = 2
302304

305+
class Engine(proto.Enum):
306+
r"""The cluster engine.
307+
308+
Values:
309+
ENGINE_UNSPECIFIED (0):
310+
The engine is not specified. Works the same as
311+
ENGINE_DEFAULT.
312+
DEFAULT (1):
313+
The cluster is a default engine cluster.
314+
LIGHTNING (2):
315+
The cluster is a lightning engine cluster.
316+
"""
317+
318+
ENGINE_UNSPECIFIED = 0
319+
DEFAULT = 1
320+
LIGHTNING = 2
321+
303322
cluster_type: ClusterType = proto.Field(
304323
proto.ENUM,
305324
number=27,
@@ -310,6 +329,11 @@ class ClusterTier(proto.Enum):
310329
number=29,
311330
enum=ClusterTier,
312331
)
332+
engine: Engine = proto.Field(
333+
proto.ENUM,
334+
number=30,
335+
enum=Engine,
336+
)
313337
config_bucket: str = proto.Field(
314338
proto.STRING,
315339
number=1,
@@ -1911,6 +1935,28 @@ class LifecycleConfig(proto.Message):
19111935
`Duration <https://developers.google.com/protocol-buffers/docs/proto3#json>`__).
19121936
19131937
This field is a member of `oneof`_ ``ttl``.
1938+
idle_stop_ttl (google.protobuf.duration_pb2.Duration):
1939+
Optional. The duration to keep the cluster started while
1940+
idling (when no jobs are running). Passing this threshold
1941+
will cause the cluster to be stopped. Minimum value is 5
1942+
minutes; maximum value is 14 days (see JSON representation
1943+
of
1944+
`Duration <https://developers.google.com/protocol-buffers/docs/proto3#json>`__).
1945+
auto_stop_time (google.protobuf.timestamp_pb2.Timestamp):
1946+
Optional. The time when cluster will be auto-stopped (see
1947+
JSON representation of
1948+
`Timestamp <https://developers.google.com/protocol-buffers/docs/proto3#json>`__).
1949+
1950+
This field is a member of `oneof`_ ``stop_ttl``.
1951+
auto_stop_ttl (google.protobuf.duration_pb2.Duration):
1952+
Optional. The lifetime duration of the cluster. The cluster
1953+
will be auto-stopped at the end of this period, calculated
1954+
from the time of submission of the create or update cluster
1955+
request. Minimum value is 10 minutes; maximum value is 14
1956+
days (see JSON representation of
1957+
`Duration <https://developers.google.com/protocol-buffers/docs/proto3#json>`__).
1958+
1959+
This field is a member of `oneof`_ ``stop_ttl``.
19141960
idle_start_time (google.protobuf.timestamp_pb2.Timestamp):
19151961
Output only. The time when cluster became idle (most recent
19161962
job finished) and became eligible for deletion due to
@@ -1935,6 +1981,23 @@ class LifecycleConfig(proto.Message):
19351981
oneof="ttl",
19361982
message=duration_pb2.Duration,
19371983
)
1984+
idle_stop_ttl: duration_pb2.Duration = proto.Field(
1985+
proto.MESSAGE,
1986+
number=5,
1987+
message=duration_pb2.Duration,
1988+
)
1989+
auto_stop_time: timestamp_pb2.Timestamp = proto.Field(
1990+
proto.MESSAGE,
1991+
number=6,
1992+
oneof="stop_ttl",
1993+
message=timestamp_pb2.Timestamp,
1994+
)
1995+
auto_stop_ttl: duration_pb2.Duration = proto.Field(
1996+
proto.MESSAGE,
1997+
number=7,
1998+
oneof="stop_ttl",
1999+
message=duration_pb2.Duration,
2000+
)
19382001
idle_start_time: timestamp_pb2.Timestamp = proto.Field(
19392002
proto.MESSAGE,
19402003
number=4,

packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_cluster_controller.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6369,6 +6369,7 @@ def test_create_cluster_rest_call_success(request_type):
63696369
"config": {
63706370
"cluster_type": 1,
63716371
"cluster_tier": 1,
6372+
"engine": 1,
63726373
"config_bucket": "config_bucket_value",
63736374
"temp_bucket": "temp_bucket_value",
63746375
"gce_cluster_config": {
@@ -6495,6 +6496,9 @@ def test_create_cluster_rest_call_success(request_type):
64956496
"idle_delete_ttl": {},
64966497
"auto_delete_time": {"seconds": 751, "nanos": 543},
64976498
"auto_delete_ttl": {},
6499+
"idle_stop_ttl": {},
6500+
"auto_stop_time": {},
6501+
"auto_stop_ttl": {},
64986502
"idle_start_time": {},
64996503
},
65006504
"endpoint_config": {"http_ports": {}, "enable_http_port_access": True},
@@ -6785,6 +6789,7 @@ def test_update_cluster_rest_call_success(request_type):
67856789
"config": {
67866790
"cluster_type": 1,
67876791
"cluster_tier": 1,
6792+
"engine": 1,
67886793
"config_bucket": "config_bucket_value",
67896794
"temp_bucket": "temp_bucket_value",
67906795
"gce_cluster_config": {
@@ -6911,6 +6916,9 @@ def test_update_cluster_rest_call_success(request_type):
69116916
"idle_delete_ttl": {},
69126917
"auto_delete_time": {"seconds": 751, "nanos": 543},
69136918
"auto_delete_ttl": {},
6919+
"idle_stop_ttl": {},
6920+
"auto_stop_time": {},
6921+
"auto_stop_ttl": {},
69146922
"idle_start_time": {},
69156923
},
69166924
"endpoint_config": {"http_ports": {}, "enable_http_port_access": True},

packages/google-cloud-dataproc/tests/unit/gapic/dataproc_v1/test_workflow_template_service.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5994,6 +5994,7 @@ def test_create_workflow_template_rest_call_success(request_type):
59945994
"config": {
59955995
"cluster_type": 1,
59965996
"cluster_tier": 1,
5997+
"engine": 1,
59975998
"config_bucket": "config_bucket_value",
59985999
"temp_bucket": "temp_bucket_value",
59996000
"gce_cluster_config": {
@@ -6127,6 +6128,9 @@ def test_create_workflow_template_rest_call_success(request_type):
61276128
"idle_delete_ttl": {},
61286129
"auto_delete_time": {},
61296130
"auto_delete_ttl": {},
6131+
"idle_stop_ttl": {},
6132+
"auto_stop_time": {},
6133+
"auto_stop_ttl": {},
61306134
"idle_start_time": {},
61316135
},
61326136
"endpoint_config": {
@@ -6786,6 +6790,7 @@ def test_instantiate_inline_workflow_template_rest_call_success(request_type):
67866790
"config": {
67876791
"cluster_type": 1,
67886792
"cluster_tier": 1,
6793+
"engine": 1,
67896794
"config_bucket": "config_bucket_value",
67906795
"temp_bucket": "temp_bucket_value",
67916796
"gce_cluster_config": {
@@ -6919,6 +6924,9 @@ def test_instantiate_inline_workflow_template_rest_call_success(request_type):
69196924
"idle_delete_ttl": {},
69206925
"auto_delete_time": {},
69216926
"auto_delete_ttl": {},
6927+
"idle_stop_ttl": {},
6928+
"auto_stop_time": {},
6929+
"auto_stop_ttl": {},
69226930
"idle_start_time": {},
69236931
},
69246932
"endpoint_config": {
@@ -7296,6 +7304,7 @@ def test_update_workflow_template_rest_call_success(request_type):
72967304
"config": {
72977305
"cluster_type": 1,
72987306
"cluster_tier": 1,
7307+
"engine": 1,
72997308
"config_bucket": "config_bucket_value",
73007309
"temp_bucket": "temp_bucket_value",
73017310
"gce_cluster_config": {
@@ -7429,6 +7438,9 @@ def test_update_workflow_template_rest_call_success(request_type):
74297438
"idle_delete_ttl": {},
74307439
"auto_delete_time": {},
74317440
"auto_delete_ttl": {},
7441+
"idle_stop_ttl": {},
7442+
"auto_stop_time": {},
7443+
"auto_stop_ttl": {},
74327444
"idle_start_time": {},
74337445
},
74347446
"endpoint_config": {

0 commit comments

Comments
 (0)