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