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.functions.v1; 18 19import "google/protobuf/any.proto"; 20import "google/protobuf/timestamp.proto"; 21 22option go_package = "cloud.google.com/go/functions/apiv1/functionspb;functionspb"; 23option java_multiple_files = true; 24option java_outer_classname = "FunctionsOperationsProto"; 25option java_package = "com.google.cloud.functions.v1"; 26 27// A type of an operation. 28enum OperationType { 29 // Unknown operation type. 30 OPERATION_UNSPECIFIED = 0; 31 32 // Triggered by CreateFunction call 33 CREATE_FUNCTION = 1; 34 35 // Triggered by UpdateFunction call 36 UPDATE_FUNCTION = 2; 37 38 // Triggered by DeleteFunction call. 39 DELETE_FUNCTION = 3; 40} 41 42// Metadata describing an [Operation][google.longrunning.Operation] 43message OperationMetadataV1 { 44 // Target of the operation - for example 45 // `projects/project-1/locations/region-1/functions/function-1` 46 string target = 1; 47 48 // Type of operation. 49 OperationType type = 2; 50 51 // The original request that started the operation. 52 google.protobuf.Any request = 3; 53 54 // Version id of the function created or updated by an API call. 55 // This field is only populated for Create and Update operations. 56 int64 version_id = 4; 57 58 // The last update timestamp of the operation. 59 google.protobuf.Timestamp update_time = 5; 60 61 // The Cloud Build ID of the function created or updated by an API call. 62 // This field is only populated for Create and Update operations. 63 string build_id = 6; 64 65 // An identifier for Firebase function sources. Disclaimer: This field is only 66 // supported for Firebase function deployments. 67 string source_token = 7; 68 69 // The Cloud Build Name of the function deployment. 70 // This field is only populated for Create and Update operations. 71 // `projects/<project-number>/locations/<region>/builds/<build-id>`. 72 string build_name = 8; 73} 74