1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.dataproc.v1;
18
19import "google/api/field_behavior.proto";
20import "google/protobuf/timestamp.proto";
21
22option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb";
23option java_multiple_files = true;
24option java_outer_classname = "OperationsProto";
25option java_package = "com.google.cloud.dataproc.v1";
26
27// Metadata describing the Batch operation.
28message BatchOperationMetadata {
29  // Operation type for Batch resources
30  enum BatchOperationType {
31    // Batch operation type is unknown.
32    BATCH_OPERATION_TYPE_UNSPECIFIED = 0;
33
34    // Batch operation type.
35    BATCH = 1;
36  }
37
38  // Name of the batch for the operation.
39  string batch = 1;
40
41  // Batch UUID for the operation.
42  string batch_uuid = 2;
43
44  // The time when the operation was created.
45  google.protobuf.Timestamp create_time = 3;
46
47  // The time when the operation finished.
48  google.protobuf.Timestamp done_time = 4;
49
50  // The operation type.
51  BatchOperationType operation_type = 6;
52
53  // Short description of the operation.
54  string description = 7;
55
56  // Labels associated with the operation.
57  map<string, string> labels = 8;
58
59  // Warnings encountered during operation execution.
60  repeated string warnings = 9;
61}
62
63// The status of the operation.
64message ClusterOperationStatus {
65  // The operation state.
66  enum State {
67    // Unused.
68    UNKNOWN = 0;
69
70    // The operation has been created.
71    PENDING = 1;
72
73    // The operation is running.
74    RUNNING = 2;
75
76    // The operation is done; either cancelled or completed.
77    DONE = 3;
78  }
79
80  // Output only. A message containing the operation state.
81  State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
82
83  // Output only. A message containing the detailed operation state.
84  string inner_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
85
86  // Output only. A message containing any operation metadata details.
87  string details = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
88
89  // Output only. The time this state was entered.
90  google.protobuf.Timestamp state_start_time = 4
91      [(google.api.field_behavior) = OUTPUT_ONLY];
92}
93
94// Metadata describing the operation.
95message ClusterOperationMetadata {
96  // Output only. Name of the cluster for the operation.
97  string cluster_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
98
99  // Output only. Cluster UUID for the operation.
100  string cluster_uuid = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
101
102  // Output only. Current operation status.
103  ClusterOperationStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
104
105  // Output only. The previous operation status.
106  repeated ClusterOperationStatus status_history = 10
107      [(google.api.field_behavior) = OUTPUT_ONLY];
108
109  // Output only. The operation type.
110  string operation_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
111
112  // Output only. Short description of operation.
113  string description = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
114
115  // Output only. Labels associated with the operation
116  map<string, string> labels = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
117
118  // Output only. Errors encountered during operation execution.
119  repeated string warnings = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
120
121  // Output only. Child operation ids
122  repeated string child_operation_ids = 15
123      [(google.api.field_behavior) = OUTPUT_ONLY];
124}
125
126// Metadata describing the node group operation.
127message NodeGroupOperationMetadata {
128  // Operation type for node group resources.
129  enum NodeGroupOperationType {
130    // Node group operation type is unknown.
131    NODE_GROUP_OPERATION_TYPE_UNSPECIFIED = 0;
132
133    // Create node group operation type.
134    CREATE = 1;
135
136    // Update node group operation type.
137    UPDATE = 2;
138
139    // Delete node group operation type.
140    DELETE = 3;
141
142    // Resize node group operation type.
143    RESIZE = 4;
144  }
145
146  // Output only. Node group ID for the operation.
147  string node_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
148
149  // Output only. Cluster UUID associated with the node group operation.
150  string cluster_uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
151
152  // Output only. Current operation status.
153  ClusterOperationStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
154
155  // Output only. The previous operation status.
156  repeated ClusterOperationStatus status_history = 4
157      [(google.api.field_behavior) = OUTPUT_ONLY];
158
159  // The operation type.
160  NodeGroupOperationType operation_type = 5;
161
162  // Output only. Short description of operation.
163  string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
164
165  // Output only. Labels associated with the operation.
166  map<string, string> labels = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
167
168  // Output only. Errors encountered during operation execution.
169  repeated string warnings = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
170}
171