xref: /aosp_15_r20/external/googleapis/google/cloud/dataproc/v1/operations.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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// Metadata describing the Session operation.
64message SessionOperationMetadata {
65  // Operation type for Session resources
66  enum SessionOperationType {
67    // Session operation type is unknown.
68    SESSION_OPERATION_TYPE_UNSPECIFIED = 0;
69
70    // Create Session operation type.
71    CREATE = 1;
72
73    // Terminate Session operation type.
74    TERMINATE = 2;
75
76    // Delete Session operation type.
77    DELETE = 3;
78  }
79
80  // Name of the session for the operation.
81  string session = 1;
82
83  // Session UUID for the operation.
84  string session_uuid = 2;
85
86  // The time when the operation was created.
87  google.protobuf.Timestamp create_time = 3;
88
89  // The time when the operation was finished.
90  google.protobuf.Timestamp done_time = 4;
91
92  // The operation type.
93  SessionOperationType operation_type = 6;
94
95  // Short description of the operation.
96  string description = 7;
97
98  // Labels associated with the operation.
99  map<string, string> labels = 8;
100
101  // Warnings encountered during operation execution.
102  repeated string warnings = 9;
103}
104
105// The status of the operation.
106message ClusterOperationStatus {
107  // The operation state.
108  enum State {
109    // Unused.
110    UNKNOWN = 0;
111
112    // The operation has been created.
113    PENDING = 1;
114
115    // The operation is running.
116    RUNNING = 2;
117
118    // The operation is done; either cancelled or completed.
119    DONE = 3;
120  }
121
122  // Output only. A message containing the operation state.
123  State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
124
125  // Output only. A message containing the detailed operation state.
126  string inner_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
127
128  // Output only. A message containing any operation metadata details.
129  string details = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
130
131  // Output only. The time this state was entered.
132  google.protobuf.Timestamp state_start_time = 4
133      [(google.api.field_behavior) = OUTPUT_ONLY];
134}
135
136// Metadata describing the operation.
137message ClusterOperationMetadata {
138  // Output only. Name of the cluster for the operation.
139  string cluster_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
140
141  // Output only. Cluster UUID for the operation.
142  string cluster_uuid = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
143
144  // Output only. Current operation status.
145  ClusterOperationStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
146
147  // Output only. The previous operation status.
148  repeated ClusterOperationStatus status_history = 10
149      [(google.api.field_behavior) = OUTPUT_ONLY];
150
151  // Output only. The operation type.
152  string operation_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
153
154  // Output only. Short description of operation.
155  string description = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
156
157  // Output only. Labels associated with the operation
158  map<string, string> labels = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
159
160  // Output only. Errors encountered during operation execution.
161  repeated string warnings = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
162
163  // Output only. Child operation ids
164  repeated string child_operation_ids = 15
165      [(google.api.field_behavior) = OUTPUT_ONLY];
166}
167
168// Metadata describing the node group operation.
169message NodeGroupOperationMetadata {
170  // Operation type for node group resources.
171  enum NodeGroupOperationType {
172    // Node group operation type is unknown.
173    NODE_GROUP_OPERATION_TYPE_UNSPECIFIED = 0;
174
175    // Create node group operation type.
176    CREATE = 1;
177
178    // Update node group operation type.
179    UPDATE = 2;
180
181    // Delete node group operation type.
182    DELETE = 3;
183
184    // Resize node group operation type.
185    RESIZE = 4;
186  }
187
188  // Output only. Node group ID for the operation.
189  string node_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
190
191  // Output only. Cluster UUID associated with the node group operation.
192  string cluster_uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
193
194  // Output only. Current operation status.
195  ClusterOperationStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
196
197  // Output only. The previous operation status.
198  repeated ClusterOperationStatus status_history = 4
199      [(google.api.field_behavior) = OUTPUT_ONLY];
200
201  // The operation type.
202  NodeGroupOperationType operation_type = 5;
203
204  // Output only. Short description of operation.
205  string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
206
207  // Output only. Labels associated with the operation.
208  map<string, string> labels = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
209
210  // Output only. Errors encountered during operation execution.
211  repeated string warnings = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
212}
213