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.orchestration.airflow.service.v1; 18 19import "google/protobuf/timestamp.proto"; 20 21option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb"; 22option java_multiple_files = true; 23option java_outer_classname = "OperationsProto"; 24option java_package = "com.google.cloud.orchestration.airflow.service.v1"; 25 26// Metadata describing an operation. 27message OperationMetadata { 28 // An enum describing the overall state of an operation. 29 enum State { 30 option allow_alias = true; 31 32 // Unused. 33 STATE_UNSPECIFIED = 0; 34 35 // The operation has been created but is not yet started. 36 PENDING = 1; 37 38 // The operation is underway. 39 RUNNING = 2; 40 41 // The operation completed successfully. 42 SUCCEEDED = 3; 43 44 SUCCESSFUL = 3; 45 46 // The operation is no longer running but did not succeed. 47 FAILED = 4; 48 } 49 50 // Type of longrunning operation. 51 enum Type { 52 // Unused. 53 TYPE_UNSPECIFIED = 0; 54 55 // A resource creation operation. 56 CREATE = 1; 57 58 // A resource deletion operation. 59 DELETE = 2; 60 61 // A resource update operation. 62 UPDATE = 3; 63 64 // A resource check operation. 65 CHECK = 4; 66 67 // Saves snapshot of the resource operation. 68 SAVE_SNAPSHOT = 5; 69 70 // Loads snapshot of the resource operation. 71 LOAD_SNAPSHOT = 6; 72 73 // Triggers failover of environment's Cloud SQL instance (only for highly 74 // resilient environments). 75 DATABASE_FAILOVER = 7; 76 } 77 78 // Output only. The current operation state. 79 State state = 1; 80 81 // Output only. The type of operation being performed. 82 Type operation_type = 2; 83 84 // Output only. The resource being operated on, as a [relative resource name]( 85 // /apis/design/resource_names#relative_resource_name). 86 string resource = 3; 87 88 // Output only. The UUID of the resource being operated on. 89 string resource_uuid = 4; 90 91 // Output only. The time the operation was submitted to the server. 92 google.protobuf.Timestamp create_time = 5; 93 94 // Output only. The time when the operation terminated, regardless of its 95 // success. This field is unset if the operation is still ongoing. 96 google.protobuf.Timestamp end_time = 6; 97} 98