1*d5c09012SAndroid Build Coastguard Worker// Copyright 2022 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.dataproc.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/annotations.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/client.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 22*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto"; 23*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/dataproc/v1/shared.proto"; 24*d5c09012SAndroid Build Coastguard Workerimport "google/longrunning/operations.proto"; 25*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/empty.proto"; 26*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto"; 27*d5c09012SAndroid Build Coastguard Worker 28*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; 29*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 30*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "BatchesProto"; 31*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.dataproc.v1"; 32*d5c09012SAndroid Build Coastguard Worker 33*d5c09012SAndroid Build Coastguard Worker// The BatchController provides methods to manage batch workloads. 34*d5c09012SAndroid Build Coastguard Workerservice BatchController { 35*d5c09012SAndroid Build Coastguard Worker option (google.api.default_host) = "dataproc.googleapis.com"; 36*d5c09012SAndroid Build Coastguard Worker option (google.api.oauth_scopes) = 37*d5c09012SAndroid Build Coastguard Worker "https://www.googleapis.com/auth/cloud-platform"; 38*d5c09012SAndroid Build Coastguard Worker 39*d5c09012SAndroid Build Coastguard Worker // Creates a batch workload that executes asynchronously. 40*d5c09012SAndroid Build Coastguard Worker rpc CreateBatch(CreateBatchRequest) returns (google.longrunning.Operation) { 41*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 42*d5c09012SAndroid Build Coastguard Worker post: "/v1/{parent=projects/*/locations/*}/batches" 43*d5c09012SAndroid Build Coastguard Worker body: "batch" 44*d5c09012SAndroid Build Coastguard Worker }; 45*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "parent,batch,batch_id"; 46*d5c09012SAndroid Build Coastguard Worker option (google.longrunning.operation_info) = { 47*d5c09012SAndroid Build Coastguard Worker response_type: "Batch" 48*d5c09012SAndroid Build Coastguard Worker metadata_type: "google.cloud.dataproc.v1.BatchOperationMetadata" 49*d5c09012SAndroid Build Coastguard Worker }; 50*d5c09012SAndroid Build Coastguard Worker } 51*d5c09012SAndroid Build Coastguard Worker 52*d5c09012SAndroid Build Coastguard Worker // Gets the batch workload resource representation. 53*d5c09012SAndroid Build Coastguard Worker rpc GetBatch(GetBatchRequest) returns (Batch) { 54*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 55*d5c09012SAndroid Build Coastguard Worker get: "/v1/{name=projects/*/locations/*/batches/*}" 56*d5c09012SAndroid Build Coastguard Worker }; 57*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name"; 58*d5c09012SAndroid Build Coastguard Worker } 59*d5c09012SAndroid Build Coastguard Worker 60*d5c09012SAndroid Build Coastguard Worker // Lists batch workloads. 61*d5c09012SAndroid Build Coastguard Worker rpc ListBatches(ListBatchesRequest) returns (ListBatchesResponse) { 62*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 63*d5c09012SAndroid Build Coastguard Worker get: "/v1/{parent=projects/*/locations/*}/batches" 64*d5c09012SAndroid Build Coastguard Worker }; 65*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "parent"; 66*d5c09012SAndroid Build Coastguard Worker } 67*d5c09012SAndroid Build Coastguard Worker 68*d5c09012SAndroid Build Coastguard Worker // Deletes the batch workload resource. If the batch is not in terminal state, 69*d5c09012SAndroid Build Coastguard Worker // the delete fails and the response returns `FAILED_PRECONDITION`. 70*d5c09012SAndroid Build Coastguard Worker rpc DeleteBatch(DeleteBatchRequest) returns (google.protobuf.Empty) { 71*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 72*d5c09012SAndroid Build Coastguard Worker delete: "/v1/{name=projects/*/locations/*/batches/*}" 73*d5c09012SAndroid Build Coastguard Worker }; 74*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name"; 75*d5c09012SAndroid Build Coastguard Worker } 76*d5c09012SAndroid Build Coastguard Worker} 77*d5c09012SAndroid Build Coastguard Worker 78*d5c09012SAndroid Build Coastguard Worker// A request to create a batch workload. 79*d5c09012SAndroid Build Coastguard Workermessage CreateBatchRequest { 80*d5c09012SAndroid Build Coastguard Worker // Required. The parent resource where this batch will be created. 81*d5c09012SAndroid Build Coastguard Worker string parent = 1 [ 82*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 83*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 84*d5c09012SAndroid Build Coastguard Worker child_type: "dataproc.googleapis.com/Batch" 85*d5c09012SAndroid Build Coastguard Worker } 86*d5c09012SAndroid Build Coastguard Worker ]; 87*d5c09012SAndroid Build Coastguard Worker 88*d5c09012SAndroid Build Coastguard Worker // Required. The batch to create. 89*d5c09012SAndroid Build Coastguard Worker Batch batch = 2 [(google.api.field_behavior) = REQUIRED]; 90*d5c09012SAndroid Build Coastguard Worker 91*d5c09012SAndroid Build Coastguard Worker // Optional. The ID to use for the batch, which will become the final 92*d5c09012SAndroid Build Coastguard Worker // component of the batch's resource name. 93*d5c09012SAndroid Build Coastguard Worker // 94*d5c09012SAndroid Build Coastguard Worker // This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. 95*d5c09012SAndroid Build Coastguard Worker string batch_id = 3 [(google.api.field_behavior) = OPTIONAL]; 96*d5c09012SAndroid Build Coastguard Worker 97*d5c09012SAndroid Build Coastguard Worker // Optional. A unique ID used to identify the request. If the service 98*d5c09012SAndroid Build Coastguard Worker // receives two 99*d5c09012SAndroid Build Coastguard Worker // [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s 100*d5c09012SAndroid Build Coastguard Worker // with the same request_id, the second request is ignored and the 101*d5c09012SAndroid Build Coastguard Worker // Operation that corresponds to the first Batch created and stored 102*d5c09012SAndroid Build Coastguard Worker // in the backend is returned. 103*d5c09012SAndroid Build Coastguard Worker // 104*d5c09012SAndroid Build Coastguard Worker // Recommendation: Set this value to a 105*d5c09012SAndroid Build Coastguard Worker // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). 106*d5c09012SAndroid Build Coastguard Worker // 107*d5c09012SAndroid Build Coastguard Worker // The value must contain only letters (a-z, A-Z), numbers (0-9), 108*d5c09012SAndroid Build Coastguard Worker // underscores (_), and hyphens (-). The maximum length is 40 characters. 109*d5c09012SAndroid Build Coastguard Worker string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 110*d5c09012SAndroid Build Coastguard Worker} 111*d5c09012SAndroid Build Coastguard Worker 112*d5c09012SAndroid Build Coastguard Worker// A request to get the resource representation for a batch workload. 113*d5c09012SAndroid Build Coastguard Workermessage GetBatchRequest { 114*d5c09012SAndroid Build Coastguard Worker // Required. The fully qualified name of the batch to retrieve 115*d5c09012SAndroid Build Coastguard Worker // in the format 116*d5c09012SAndroid Build Coastguard Worker // "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" 117*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 118*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 119*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { type: "dataproc.googleapis.com/Batch" } 120*d5c09012SAndroid Build Coastguard Worker ]; 121*d5c09012SAndroid Build Coastguard Worker} 122*d5c09012SAndroid Build Coastguard Worker 123*d5c09012SAndroid Build Coastguard Worker// A request to list batch workloads in a project. 124*d5c09012SAndroid Build Coastguard Workermessage ListBatchesRequest { 125*d5c09012SAndroid Build Coastguard Worker // Required. The parent, which owns this collection of batches. 126*d5c09012SAndroid Build Coastguard Worker string parent = 1 [ 127*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 128*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 129*d5c09012SAndroid Build Coastguard Worker child_type: "dataproc.googleapis.com/Batch" 130*d5c09012SAndroid Build Coastguard Worker } 131*d5c09012SAndroid Build Coastguard Worker ]; 132*d5c09012SAndroid Build Coastguard Worker 133*d5c09012SAndroid Build Coastguard Worker // Optional. The maximum number of batches to return in each response. 134*d5c09012SAndroid Build Coastguard Worker // The service may return fewer than this value. 135*d5c09012SAndroid Build Coastguard Worker // The default page size is 20; the maximum page size is 1000. 136*d5c09012SAndroid Build Coastguard Worker int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 137*d5c09012SAndroid Build Coastguard Worker 138*d5c09012SAndroid Build Coastguard Worker // Optional. A page token received from a previous `ListBatches` call. 139*d5c09012SAndroid Build Coastguard Worker // Provide this token to retrieve the subsequent page. 140*d5c09012SAndroid Build Coastguard Worker string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 141*d5c09012SAndroid Build Coastguard Worker 142*d5c09012SAndroid Build Coastguard Worker // Optional. A filter for the batches to return in the response. 143*d5c09012SAndroid Build Coastguard Worker // 144*d5c09012SAndroid Build Coastguard Worker // A filter is a logical expression constraining the values of various fields 145*d5c09012SAndroid Build Coastguard Worker // in each batch resource. Filters are case sensitive, and may contain 146*d5c09012SAndroid Build Coastguard Worker // multiple clauses combined with logical operators (AND/OR). 147*d5c09012SAndroid Build Coastguard Worker // Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. 148*d5c09012SAndroid Build Coastguard Worker // 149*d5c09012SAndroid Build Coastguard Worker // e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` 150*d5c09012SAndroid Build Coastguard Worker // filters for batches in state RUNNING that were created before 2023-01-01 151*d5c09012SAndroid Build Coastguard Worker // 152*d5c09012SAndroid Build Coastguard Worker // See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed 153*d5c09012SAndroid Build Coastguard Worker // description of the filter syntax and a list of supported comparisons. 154*d5c09012SAndroid Build Coastguard Worker string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 155*d5c09012SAndroid Build Coastguard Worker 156*d5c09012SAndroid Build Coastguard Worker // Optional. Field(s) on which to sort the list of batches. 157*d5c09012SAndroid Build Coastguard Worker // 158*d5c09012SAndroid Build Coastguard Worker // Currently the only supported sort orders are unspecified (empty) and 159*d5c09012SAndroid Build Coastguard Worker // `create_time desc` to sort by most recently created batches first. 160*d5c09012SAndroid Build Coastguard Worker // 161*d5c09012SAndroid Build Coastguard Worker // See https://google.aip.dev/132#ordering for more details. 162*d5c09012SAndroid Build Coastguard Worker string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 163*d5c09012SAndroid Build Coastguard Worker} 164*d5c09012SAndroid Build Coastguard Worker 165*d5c09012SAndroid Build Coastguard Worker// A list of batch workloads. 166*d5c09012SAndroid Build Coastguard Workermessage ListBatchesResponse { 167*d5c09012SAndroid Build Coastguard Worker // The batches from the specified collection. 168*d5c09012SAndroid Build Coastguard Worker repeated Batch batches = 1; 169*d5c09012SAndroid Build Coastguard Worker 170*d5c09012SAndroid Build Coastguard Worker // A token, which can be sent as `page_token` to retrieve the next page. 171*d5c09012SAndroid Build Coastguard Worker // If this field is omitted, there are no subsequent pages. 172*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 173*d5c09012SAndroid Build Coastguard Worker} 174*d5c09012SAndroid Build Coastguard Worker 175*d5c09012SAndroid Build Coastguard Worker// A request to delete a batch workload. 176*d5c09012SAndroid Build Coastguard Workermessage DeleteBatchRequest { 177*d5c09012SAndroid Build Coastguard Worker // Required. The fully qualified name of the batch to retrieve 178*d5c09012SAndroid Build Coastguard Worker // in the format 179*d5c09012SAndroid Build Coastguard Worker // "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" 180*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 181*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 182*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { type: "dataproc.googleapis.com/Batch" } 183*d5c09012SAndroid Build Coastguard Worker ]; 184*d5c09012SAndroid Build Coastguard Worker} 185*d5c09012SAndroid Build Coastguard Worker 186*d5c09012SAndroid Build Coastguard Worker// A representation of a batch workload in the service. 187*d5c09012SAndroid Build Coastguard Workermessage Batch { 188*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 189*d5c09012SAndroid Build Coastguard Worker type: "dataproc.googleapis.com/Batch" 190*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/locations/{location}/batches/{batch}" 191*d5c09012SAndroid Build Coastguard Worker }; 192*d5c09012SAndroid Build Coastguard Worker 193*d5c09012SAndroid Build Coastguard Worker // The batch state. 194*d5c09012SAndroid Build Coastguard Worker enum State { 195*d5c09012SAndroid Build Coastguard Worker // The batch state is unknown. 196*d5c09012SAndroid Build Coastguard Worker STATE_UNSPECIFIED = 0; 197*d5c09012SAndroid Build Coastguard Worker 198*d5c09012SAndroid Build Coastguard Worker // The batch is created before running. 199*d5c09012SAndroid Build Coastguard Worker PENDING = 1; 200*d5c09012SAndroid Build Coastguard Worker 201*d5c09012SAndroid Build Coastguard Worker // The batch is running. 202*d5c09012SAndroid Build Coastguard Worker RUNNING = 2; 203*d5c09012SAndroid Build Coastguard Worker 204*d5c09012SAndroid Build Coastguard Worker // The batch is cancelling. 205*d5c09012SAndroid Build Coastguard Worker CANCELLING = 3; 206*d5c09012SAndroid Build Coastguard Worker 207*d5c09012SAndroid Build Coastguard Worker // The batch cancellation was successful. 208*d5c09012SAndroid Build Coastguard Worker CANCELLED = 4; 209*d5c09012SAndroid Build Coastguard Worker 210*d5c09012SAndroid Build Coastguard Worker // The batch completed successfully. 211*d5c09012SAndroid Build Coastguard Worker SUCCEEDED = 5; 212*d5c09012SAndroid Build Coastguard Worker 213*d5c09012SAndroid Build Coastguard Worker // The batch is no longer running due to an error. 214*d5c09012SAndroid Build Coastguard Worker FAILED = 6; 215*d5c09012SAndroid Build Coastguard Worker } 216*d5c09012SAndroid Build Coastguard Worker 217*d5c09012SAndroid Build Coastguard Worker // Historical state information. 218*d5c09012SAndroid Build Coastguard Worker message StateHistory { 219*d5c09012SAndroid Build Coastguard Worker // Output only. The state of the batch at this point in history. 220*d5c09012SAndroid Build Coastguard Worker State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 221*d5c09012SAndroid Build Coastguard Worker 222*d5c09012SAndroid Build Coastguard Worker // Output only. Details about the state at this point in history. 223*d5c09012SAndroid Build Coastguard Worker string state_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 224*d5c09012SAndroid Build Coastguard Worker 225*d5c09012SAndroid Build Coastguard Worker // Output only. The time when the batch entered the historical state. 226*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp state_start_time = 3 227*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 228*d5c09012SAndroid Build Coastguard Worker } 229*d5c09012SAndroid Build Coastguard Worker 230*d5c09012SAndroid Build Coastguard Worker // Output only. The resource name of the batch. 231*d5c09012SAndroid Build Coastguard Worker string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 232*d5c09012SAndroid Build Coastguard Worker 233*d5c09012SAndroid Build Coastguard Worker // Output only. A batch UUID (Unique Universal Identifier). The service 234*d5c09012SAndroid Build Coastguard Worker // generates this value when it creates the batch. 235*d5c09012SAndroid Build Coastguard Worker string uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 236*d5c09012SAndroid Build Coastguard Worker 237*d5c09012SAndroid Build Coastguard Worker // Output only. The time when the batch was created. 238*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp create_time = 3 239*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 240*d5c09012SAndroid Build Coastguard Worker 241*d5c09012SAndroid Build Coastguard Worker // The application/framework-specific portion of the batch configuration. 242*d5c09012SAndroid Build Coastguard Worker oneof batch_config { 243*d5c09012SAndroid Build Coastguard Worker // Optional. PySpark batch config. 244*d5c09012SAndroid Build Coastguard Worker PySparkBatch pyspark_batch = 4 [(google.api.field_behavior) = OPTIONAL]; 245*d5c09012SAndroid Build Coastguard Worker 246*d5c09012SAndroid Build Coastguard Worker // Optional. Spark batch config. 247*d5c09012SAndroid Build Coastguard Worker SparkBatch spark_batch = 5 [(google.api.field_behavior) = OPTIONAL]; 248*d5c09012SAndroid Build Coastguard Worker 249*d5c09012SAndroid Build Coastguard Worker // Optional. SparkR batch config. 250*d5c09012SAndroid Build Coastguard Worker SparkRBatch spark_r_batch = 6 [(google.api.field_behavior) = OPTIONAL]; 251*d5c09012SAndroid Build Coastguard Worker 252*d5c09012SAndroid Build Coastguard Worker // Optional. SparkSql batch config. 253*d5c09012SAndroid Build Coastguard Worker SparkSqlBatch spark_sql_batch = 7 [(google.api.field_behavior) = OPTIONAL]; 254*d5c09012SAndroid Build Coastguard Worker } 255*d5c09012SAndroid Build Coastguard Worker 256*d5c09012SAndroid Build Coastguard Worker // Output only. Runtime information about batch execution. 257*d5c09012SAndroid Build Coastguard Worker RuntimeInfo runtime_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 258*d5c09012SAndroid Build Coastguard Worker 259*d5c09012SAndroid Build Coastguard Worker // Output only. The state of the batch. 260*d5c09012SAndroid Build Coastguard Worker State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 261*d5c09012SAndroid Build Coastguard Worker 262*d5c09012SAndroid Build Coastguard Worker // Output only. Batch state details, such as a failure 263*d5c09012SAndroid Build Coastguard Worker // description if the state is `FAILED`. 264*d5c09012SAndroid Build Coastguard Worker string state_message = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 265*d5c09012SAndroid Build Coastguard Worker 266*d5c09012SAndroid Build Coastguard Worker // Output only. The time when the batch entered a current state. 267*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp state_time = 11 268*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 269*d5c09012SAndroid Build Coastguard Worker 270*d5c09012SAndroid Build Coastguard Worker // Output only. The email address of the user who created the batch. 271*d5c09012SAndroid Build Coastguard Worker string creator = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 272*d5c09012SAndroid Build Coastguard Worker 273*d5c09012SAndroid Build Coastguard Worker // Optional. The labels to associate with this batch. 274*d5c09012SAndroid Build Coastguard Worker // Label **keys** must contain 1 to 63 characters, and must conform to 275*d5c09012SAndroid Build Coastguard Worker // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 276*d5c09012SAndroid Build Coastguard Worker // Label **values** may be empty, but, if present, must contain 1 to 63 277*d5c09012SAndroid Build Coastguard Worker // characters, and must conform to [RFC 278*d5c09012SAndroid Build Coastguard Worker // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 279*d5c09012SAndroid Build Coastguard Worker // associated with a batch. 280*d5c09012SAndroid Build Coastguard Worker map<string, string> labels = 13 [(google.api.field_behavior) = OPTIONAL]; 281*d5c09012SAndroid Build Coastguard Worker 282*d5c09012SAndroid Build Coastguard Worker // Optional. Runtime configuration for the batch execution. 283*d5c09012SAndroid Build Coastguard Worker RuntimeConfig runtime_config = 14 [(google.api.field_behavior) = OPTIONAL]; 284*d5c09012SAndroid Build Coastguard Worker 285*d5c09012SAndroid Build Coastguard Worker // Optional. Environment configuration for the batch execution. 286*d5c09012SAndroid Build Coastguard Worker EnvironmentConfig environment_config = 15 287*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OPTIONAL]; 288*d5c09012SAndroid Build Coastguard Worker 289*d5c09012SAndroid Build Coastguard Worker // Output only. The resource name of the operation associated with this batch. 290*d5c09012SAndroid Build Coastguard Worker string operation = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; 291*d5c09012SAndroid Build Coastguard Worker 292*d5c09012SAndroid Build Coastguard Worker // Output only. Historical state information for the batch. 293*d5c09012SAndroid Build Coastguard Worker repeated StateHistory state_history = 17 294*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 295*d5c09012SAndroid Build Coastguard Worker} 296*d5c09012SAndroid Build Coastguard Worker 297*d5c09012SAndroid Build Coastguard Worker// A configuration for running an 298*d5c09012SAndroid Build Coastguard Worker// [Apache 299*d5c09012SAndroid Build Coastguard Worker// PySpark](https://spark.apache.org/docs/latest/api/python/getting_started/quickstart.html) 300*d5c09012SAndroid Build Coastguard Worker// batch workload. 301*d5c09012SAndroid Build Coastguard Workermessage PySparkBatch { 302*d5c09012SAndroid Build Coastguard Worker // Required. The HCFS URI of the main Python file to use as the Spark driver. 303*d5c09012SAndroid Build Coastguard Worker // Must be a .py file. 304*d5c09012SAndroid Build Coastguard Worker string main_python_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; 305*d5c09012SAndroid Build Coastguard Worker 306*d5c09012SAndroid Build Coastguard Worker // Optional. The arguments to pass to the driver. Do not include arguments 307*d5c09012SAndroid Build Coastguard Worker // that can be set as batch properties, such as `--conf`, since a collision 308*d5c09012SAndroid Build Coastguard Worker // can occur that causes an incorrect batch submission. 309*d5c09012SAndroid Build Coastguard Worker repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; 310*d5c09012SAndroid Build Coastguard Worker 311*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS file URIs of Python files to pass to the PySpark 312*d5c09012SAndroid Build Coastguard Worker // framework. Supported file types: `.py`, `.egg`, and `.zip`. 313*d5c09012SAndroid Build Coastguard Worker repeated string python_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; 314*d5c09012SAndroid Build Coastguard Worker 315*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of jar files to add to the classpath of the 316*d5c09012SAndroid Build Coastguard Worker // Spark driver and tasks. 317*d5c09012SAndroid Build Coastguard Worker repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; 318*d5c09012SAndroid Build Coastguard Worker 319*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of files to be placed in the working directory of 320*d5c09012SAndroid Build Coastguard Worker // each executor. 321*d5c09012SAndroid Build Coastguard Worker repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; 322*d5c09012SAndroid Build Coastguard Worker 323*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of archives to be extracted into the working directory 324*d5c09012SAndroid Build Coastguard Worker // of each executor. Supported file types: 325*d5c09012SAndroid Build Coastguard Worker // `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. 326*d5c09012SAndroid Build Coastguard Worker repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; 327*d5c09012SAndroid Build Coastguard Worker} 328*d5c09012SAndroid Build Coastguard Worker 329*d5c09012SAndroid Build Coastguard Worker// A configuration for running an [Apache Spark](https://spark.apache.org/) 330*d5c09012SAndroid Build Coastguard Worker// batch workload. 331*d5c09012SAndroid Build Coastguard Workermessage SparkBatch { 332*d5c09012SAndroid Build Coastguard Worker // The specification of the main method to call to drive the Spark 333*d5c09012SAndroid Build Coastguard Worker // workload. Specify either the jar file that contains the main class or the 334*d5c09012SAndroid Build Coastguard Worker // main class name. To pass both a main jar and a main class in that jar, add 335*d5c09012SAndroid Build Coastguard Worker // the jar to `jar_file_uris`, and then specify the main class 336*d5c09012SAndroid Build Coastguard Worker // name in `main_class`. 337*d5c09012SAndroid Build Coastguard Worker oneof driver { 338*d5c09012SAndroid Build Coastguard Worker // Optional. The HCFS URI of the jar file that contains the main class. 339*d5c09012SAndroid Build Coastguard Worker string main_jar_file_uri = 1 [(google.api.field_behavior) = OPTIONAL]; 340*d5c09012SAndroid Build Coastguard Worker 341*d5c09012SAndroid Build Coastguard Worker // Optional. The name of the driver main class. The jar file that contains 342*d5c09012SAndroid Build Coastguard Worker // the class must be in the classpath or specified in `jar_file_uris`. 343*d5c09012SAndroid Build Coastguard Worker string main_class = 2 [(google.api.field_behavior) = OPTIONAL]; 344*d5c09012SAndroid Build Coastguard Worker } 345*d5c09012SAndroid Build Coastguard Worker 346*d5c09012SAndroid Build Coastguard Worker // Optional. The arguments to pass to the driver. Do not include arguments 347*d5c09012SAndroid Build Coastguard Worker // that can be set as batch properties, such as `--conf`, since a collision 348*d5c09012SAndroid Build Coastguard Worker // can occur that causes an incorrect batch submission. 349*d5c09012SAndroid Build Coastguard Worker repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; 350*d5c09012SAndroid Build Coastguard Worker 351*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of jar files to add to the classpath of the 352*d5c09012SAndroid Build Coastguard Worker // Spark driver and tasks. 353*d5c09012SAndroid Build Coastguard Worker repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; 354*d5c09012SAndroid Build Coastguard Worker 355*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of files to be placed in the working directory of 356*d5c09012SAndroid Build Coastguard Worker // each executor. 357*d5c09012SAndroid Build Coastguard Worker repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; 358*d5c09012SAndroid Build Coastguard Worker 359*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of archives to be extracted into the working directory 360*d5c09012SAndroid Build Coastguard Worker // of each executor. Supported file types: 361*d5c09012SAndroid Build Coastguard Worker // `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. 362*d5c09012SAndroid Build Coastguard Worker repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; 363*d5c09012SAndroid Build Coastguard Worker} 364*d5c09012SAndroid Build Coastguard Worker 365*d5c09012SAndroid Build Coastguard Worker// A configuration for running an 366*d5c09012SAndroid Build Coastguard Worker// [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html) 367*d5c09012SAndroid Build Coastguard Worker// batch workload. 368*d5c09012SAndroid Build Coastguard Workermessage SparkRBatch { 369*d5c09012SAndroid Build Coastguard Worker // Required. The HCFS URI of the main R file to use as the driver. 370*d5c09012SAndroid Build Coastguard Worker // Must be a `.R` or `.r` file. 371*d5c09012SAndroid Build Coastguard Worker string main_r_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; 372*d5c09012SAndroid Build Coastguard Worker 373*d5c09012SAndroid Build Coastguard Worker // Optional. The arguments to pass to the Spark driver. Do not include 374*d5c09012SAndroid Build Coastguard Worker // arguments that can be set as batch properties, such as `--conf`, since a 375*d5c09012SAndroid Build Coastguard Worker // collision can occur that causes an incorrect batch submission. 376*d5c09012SAndroid Build Coastguard Worker repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; 377*d5c09012SAndroid Build Coastguard Worker 378*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of files to be placed in the working directory of 379*d5c09012SAndroid Build Coastguard Worker // each executor. 380*d5c09012SAndroid Build Coastguard Worker repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; 381*d5c09012SAndroid Build Coastguard Worker 382*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of archives to be extracted into the working directory 383*d5c09012SAndroid Build Coastguard Worker // of each executor. Supported file types: 384*d5c09012SAndroid Build Coastguard Worker // `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. 385*d5c09012SAndroid Build Coastguard Worker repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; 386*d5c09012SAndroid Build Coastguard Worker} 387*d5c09012SAndroid Build Coastguard Worker 388*d5c09012SAndroid Build Coastguard Worker// A configuration for running 389*d5c09012SAndroid Build Coastguard Worker// [Apache Spark SQL](https://spark.apache.org/sql/) queries as a batch 390*d5c09012SAndroid Build Coastguard Worker// workload. 391*d5c09012SAndroid Build Coastguard Workermessage SparkSqlBatch { 392*d5c09012SAndroid Build Coastguard Worker // Required. The HCFS URI of the script that contains Spark SQL queries to 393*d5c09012SAndroid Build Coastguard Worker // execute. 394*d5c09012SAndroid Build Coastguard Worker string query_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; 395*d5c09012SAndroid Build Coastguard Worker 396*d5c09012SAndroid Build Coastguard Worker // Optional. Mapping of query variable names to values (equivalent to the 397*d5c09012SAndroid Build Coastguard Worker // Spark SQL command: `SET name="value";`). 398*d5c09012SAndroid Build Coastguard Worker map<string, string> query_variables = 2 399*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OPTIONAL]; 400*d5c09012SAndroid Build Coastguard Worker 401*d5c09012SAndroid Build Coastguard Worker // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. 402*d5c09012SAndroid Build Coastguard Worker repeated string jar_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; 403*d5c09012SAndroid Build Coastguard Worker} 404