1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 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.functions.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/functions/v1/operations.proto"; 24*d5c09012SAndroid Build Coastguard Workerimport "google/iam/v1/iam_policy.proto"; 25*d5c09012SAndroid Build Coastguard Workerimport "google/iam/v1/policy.proto"; 26*d5c09012SAndroid Build Coastguard Workerimport "google/longrunning/operations.proto"; 27*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/duration.proto"; 28*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/empty.proto"; 29*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/field_mask.proto"; 30*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto"; 31*d5c09012SAndroid Build Coastguard Worker 32*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/functions/apiv1/functionspb;functionspb"; 33*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 34*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "FunctionsProto"; 35*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.functions.v1"; 36*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GCF"; 37*d5c09012SAndroid Build Coastguard Workeroption (google.api.resource_definition) = { 38*d5c09012SAndroid Build Coastguard Worker type: "artifactregistry.googleapis.com/Repository" 39*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/locations/{location}/repositories/{repository}" 40*d5c09012SAndroid Build Coastguard Worker}; 41*d5c09012SAndroid Build Coastguard Workeroption (google.api.resource_definition) = { 42*d5c09012SAndroid Build Coastguard Worker type: "cloudkms.googleapis.com/CryptoKey" 43*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" 44*d5c09012SAndroid Build Coastguard Worker}; 45*d5c09012SAndroid Build Coastguard Worker 46*d5c09012SAndroid Build Coastguard Worker// A service that application uses to manipulate triggers and functions. 47*d5c09012SAndroid Build Coastguard Workerservice CloudFunctionsService { 48*d5c09012SAndroid Build Coastguard Worker option (google.api.default_host) = "cloudfunctions.googleapis.com"; 49*d5c09012SAndroid Build Coastguard Worker option (google.api.oauth_scopes) = 50*d5c09012SAndroid Build Coastguard Worker "https://www.googleapis.com/auth/cloud-platform"; 51*d5c09012SAndroid Build Coastguard Worker 52*d5c09012SAndroid Build Coastguard Worker // Returns a list of functions that belong to the requested project. 53*d5c09012SAndroid Build Coastguard Worker rpc ListFunctions(ListFunctionsRequest) returns (ListFunctionsResponse) { 54*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 55*d5c09012SAndroid Build Coastguard Worker get: "/v1/{parent=projects/*/locations/*}/functions" 56*d5c09012SAndroid Build Coastguard Worker }; 57*d5c09012SAndroid Build Coastguard Worker } 58*d5c09012SAndroid Build Coastguard Worker 59*d5c09012SAndroid Build Coastguard Worker // Returns a function with the given name from the requested project. 60*d5c09012SAndroid Build Coastguard Worker rpc GetFunction(GetFunctionRequest) returns (CloudFunction) { 61*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 62*d5c09012SAndroid Build Coastguard Worker get: "/v1/{name=projects/*/locations/*/functions/*}" 63*d5c09012SAndroid Build Coastguard Worker }; 64*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name"; 65*d5c09012SAndroid Build Coastguard Worker } 66*d5c09012SAndroid Build Coastguard Worker 67*d5c09012SAndroid Build Coastguard Worker // Creates a new function. If a function with the given name already exists in 68*d5c09012SAndroid Build Coastguard Worker // the specified project, the long running operation will return 69*d5c09012SAndroid Build Coastguard Worker // `ALREADY_EXISTS` error. 70*d5c09012SAndroid Build Coastguard Worker rpc CreateFunction(CreateFunctionRequest) 71*d5c09012SAndroid Build Coastguard Worker returns (google.longrunning.Operation) { 72*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 73*d5c09012SAndroid Build Coastguard Worker post: "/v1/{location=projects/*/locations/*}/functions" 74*d5c09012SAndroid Build Coastguard Worker body: "function" 75*d5c09012SAndroid Build Coastguard Worker }; 76*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "location,function"; 77*d5c09012SAndroid Build Coastguard Worker option (google.longrunning.operation_info) = { 78*d5c09012SAndroid Build Coastguard Worker response_type: "CloudFunction" 79*d5c09012SAndroid Build Coastguard Worker metadata_type: "OperationMetadataV1" 80*d5c09012SAndroid Build Coastguard Worker }; 81*d5c09012SAndroid Build Coastguard Worker } 82*d5c09012SAndroid Build Coastguard Worker 83*d5c09012SAndroid Build Coastguard Worker // Updates existing function. 84*d5c09012SAndroid Build Coastguard Worker rpc UpdateFunction(UpdateFunctionRequest) 85*d5c09012SAndroid Build Coastguard Worker returns (google.longrunning.Operation) { 86*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 87*d5c09012SAndroid Build Coastguard Worker patch: "/v1/{function.name=projects/*/locations/*/functions/*}" 88*d5c09012SAndroid Build Coastguard Worker body: "function" 89*d5c09012SAndroid Build Coastguard Worker }; 90*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "function"; 91*d5c09012SAndroid Build Coastguard Worker option (google.longrunning.operation_info) = { 92*d5c09012SAndroid Build Coastguard Worker response_type: "CloudFunction" 93*d5c09012SAndroid Build Coastguard Worker metadata_type: "OperationMetadataV1" 94*d5c09012SAndroid Build Coastguard Worker }; 95*d5c09012SAndroid Build Coastguard Worker } 96*d5c09012SAndroid Build Coastguard Worker 97*d5c09012SAndroid Build Coastguard Worker // Deletes a function with the given name from the specified project. If the 98*d5c09012SAndroid Build Coastguard Worker // given function is used by some trigger, the trigger will be updated to 99*d5c09012SAndroid Build Coastguard Worker // remove this function. 100*d5c09012SAndroid Build Coastguard Worker rpc DeleteFunction(DeleteFunctionRequest) 101*d5c09012SAndroid Build Coastguard Worker returns (google.longrunning.Operation) { 102*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 103*d5c09012SAndroid Build Coastguard Worker delete: "/v1/{name=projects/*/locations/*/functions/*}" 104*d5c09012SAndroid Build Coastguard Worker }; 105*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name"; 106*d5c09012SAndroid Build Coastguard Worker option (google.longrunning.operation_info) = { 107*d5c09012SAndroid Build Coastguard Worker response_type: "google.protobuf.Empty" 108*d5c09012SAndroid Build Coastguard Worker metadata_type: "OperationMetadataV1" 109*d5c09012SAndroid Build Coastguard Worker }; 110*d5c09012SAndroid Build Coastguard Worker } 111*d5c09012SAndroid Build Coastguard Worker 112*d5c09012SAndroid Build Coastguard Worker // Synchronously invokes a deployed Cloud Function. To be used for testing 113*d5c09012SAndroid Build Coastguard Worker // purposes as very limited traffic is allowed. For more information on 114*d5c09012SAndroid Build Coastguard Worker // the actual limits, refer to 115*d5c09012SAndroid Build Coastguard Worker // [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). 116*d5c09012SAndroid Build Coastguard Worker rpc CallFunction(CallFunctionRequest) returns (CallFunctionResponse) { 117*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 118*d5c09012SAndroid Build Coastguard Worker post: "/v1/{name=projects/*/locations/*/functions/*}:call" 119*d5c09012SAndroid Build Coastguard Worker body: "*" 120*d5c09012SAndroid Build Coastguard Worker }; 121*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name,data"; 122*d5c09012SAndroid Build Coastguard Worker } 123*d5c09012SAndroid Build Coastguard Worker 124*d5c09012SAndroid Build Coastguard Worker // Returns a signed URL for uploading a function source code. 125*d5c09012SAndroid Build Coastguard Worker // For more information about the signed URL usage see: 126*d5c09012SAndroid Build Coastguard Worker // https://cloud.google.com/storage/docs/access-control/signed-urls. 127*d5c09012SAndroid Build Coastguard Worker // Once the function source code upload is complete, the used signed 128*d5c09012SAndroid Build Coastguard Worker // URL should be provided in CreateFunction or UpdateFunction request 129*d5c09012SAndroid Build Coastguard Worker // as a reference to the function source code. 130*d5c09012SAndroid Build Coastguard Worker // 131*d5c09012SAndroid Build Coastguard Worker // When uploading source code to the generated signed URL, please follow 132*d5c09012SAndroid Build Coastguard Worker // these restrictions: 133*d5c09012SAndroid Build Coastguard Worker // 134*d5c09012SAndroid Build Coastguard Worker // * Source file type should be a zip file. 135*d5c09012SAndroid Build Coastguard Worker // * Source file size should not exceed 100MB limit. 136*d5c09012SAndroid Build Coastguard Worker // * No credentials should be attached - the signed URLs provide access to the 137*d5c09012SAndroid Build Coastguard Worker // target bucket using internal service identity; if credentials were 138*d5c09012SAndroid Build Coastguard Worker // attached, the identity from the credentials would be used, but that 139*d5c09012SAndroid Build Coastguard Worker // identity does not have permissions to upload files to the URL. 140*d5c09012SAndroid Build Coastguard Worker // 141*d5c09012SAndroid Build Coastguard Worker // When making a HTTP PUT request, these two headers need to be specified: 142*d5c09012SAndroid Build Coastguard Worker // 143*d5c09012SAndroid Build Coastguard Worker // * `content-type: application/zip` 144*d5c09012SAndroid Build Coastguard Worker // * `x-goog-content-length-range: 0,104857600` 145*d5c09012SAndroid Build Coastguard Worker // 146*d5c09012SAndroid Build Coastguard Worker // And this header SHOULD NOT be specified: 147*d5c09012SAndroid Build Coastguard Worker // 148*d5c09012SAndroid Build Coastguard Worker // * `Authorization: Bearer YOUR_TOKEN` 149*d5c09012SAndroid Build Coastguard Worker rpc GenerateUploadUrl(GenerateUploadUrlRequest) 150*d5c09012SAndroid Build Coastguard Worker returns (GenerateUploadUrlResponse) { 151*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 152*d5c09012SAndroid Build Coastguard Worker post: "/v1/{parent=projects/*/locations/*}/functions:generateUploadUrl" 153*d5c09012SAndroid Build Coastguard Worker body: "*" 154*d5c09012SAndroid Build Coastguard Worker }; 155*d5c09012SAndroid Build Coastguard Worker } 156*d5c09012SAndroid Build Coastguard Worker 157*d5c09012SAndroid Build Coastguard Worker // Returns a signed URL for downloading deployed function source code. 158*d5c09012SAndroid Build Coastguard Worker // The URL is only valid for a limited period and should be used within 159*d5c09012SAndroid Build Coastguard Worker // minutes after generation. 160*d5c09012SAndroid Build Coastguard Worker // For more information about the signed URL usage see: 161*d5c09012SAndroid Build Coastguard Worker // https://cloud.google.com/storage/docs/access-control/signed-urls 162*d5c09012SAndroid Build Coastguard Worker rpc GenerateDownloadUrl(GenerateDownloadUrlRequest) 163*d5c09012SAndroid Build Coastguard Worker returns (GenerateDownloadUrlResponse) { 164*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 165*d5c09012SAndroid Build Coastguard Worker post: "/v1/{name=projects/*/locations/*/functions/*}:generateDownloadUrl" 166*d5c09012SAndroid Build Coastguard Worker body: "*" 167*d5c09012SAndroid Build Coastguard Worker }; 168*d5c09012SAndroid Build Coastguard Worker } 169*d5c09012SAndroid Build Coastguard Worker 170*d5c09012SAndroid Build Coastguard Worker // Sets the IAM access control policy on the specified function. 171*d5c09012SAndroid Build Coastguard Worker // Replaces any existing policy. 172*d5c09012SAndroid Build Coastguard Worker rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) 173*d5c09012SAndroid Build Coastguard Worker returns (google.iam.v1.Policy) { 174*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 175*d5c09012SAndroid Build Coastguard Worker post: "/v1/{resource=projects/*/locations/*/functions/*}:setIamPolicy" 176*d5c09012SAndroid Build Coastguard Worker body: "*" 177*d5c09012SAndroid Build Coastguard Worker }; 178*d5c09012SAndroid Build Coastguard Worker } 179*d5c09012SAndroid Build Coastguard Worker 180*d5c09012SAndroid Build Coastguard Worker // Gets the IAM access control policy for a function. 181*d5c09012SAndroid Build Coastguard Worker // Returns an empty policy if the function exists and does not have a policy 182*d5c09012SAndroid Build Coastguard Worker // set. 183*d5c09012SAndroid Build Coastguard Worker rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) 184*d5c09012SAndroid Build Coastguard Worker returns (google.iam.v1.Policy) { 185*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 186*d5c09012SAndroid Build Coastguard Worker get: "/v1/{resource=projects/*/locations/*/functions/*}:getIamPolicy" 187*d5c09012SAndroid Build Coastguard Worker }; 188*d5c09012SAndroid Build Coastguard Worker } 189*d5c09012SAndroid Build Coastguard Worker 190*d5c09012SAndroid Build Coastguard Worker // Tests the specified permissions against the IAM access control policy 191*d5c09012SAndroid Build Coastguard Worker // for a function. 192*d5c09012SAndroid Build Coastguard Worker // If the function does not exist, this will return an empty set of 193*d5c09012SAndroid Build Coastguard Worker // permissions, not a NOT_FOUND error. 194*d5c09012SAndroid Build Coastguard Worker rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) 195*d5c09012SAndroid Build Coastguard Worker returns (google.iam.v1.TestIamPermissionsResponse) { 196*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 197*d5c09012SAndroid Build Coastguard Worker post: "/v1/{resource=projects/*/locations/*/functions/*}:testIamPermissions" 198*d5c09012SAndroid Build Coastguard Worker body: "*" 199*d5c09012SAndroid Build Coastguard Worker }; 200*d5c09012SAndroid Build Coastguard Worker } 201*d5c09012SAndroid Build Coastguard Worker} 202*d5c09012SAndroid Build Coastguard Worker 203*d5c09012SAndroid Build Coastguard Worker// Describes a Cloud Function that contains user computation executed in 204*d5c09012SAndroid Build Coastguard Worker// response to an event. It encapsulate function and triggers configurations. 205*d5c09012SAndroid Build Coastguard Workermessage CloudFunction { 206*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 207*d5c09012SAndroid Build Coastguard Worker type: "cloudfunctions.googleapis.com/CloudFunction" 208*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/locations/{location}/functions/{function}" 209*d5c09012SAndroid Build Coastguard Worker }; 210*d5c09012SAndroid Build Coastguard Worker 211*d5c09012SAndroid Build Coastguard Worker // Available egress settings. 212*d5c09012SAndroid Build Coastguard Worker // 213*d5c09012SAndroid Build Coastguard Worker // This controls what traffic is diverted through the VPC Access Connector 214*d5c09012SAndroid Build Coastguard Worker // resource. By default PRIVATE_RANGES_ONLY will be used. 215*d5c09012SAndroid Build Coastguard Worker enum VpcConnectorEgressSettings { 216*d5c09012SAndroid Build Coastguard Worker // Unspecified. 217*d5c09012SAndroid Build Coastguard Worker VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; 218*d5c09012SAndroid Build Coastguard Worker 219*d5c09012SAndroid Build Coastguard Worker // Use the VPC Access Connector only for private IP space from RFC1918. 220*d5c09012SAndroid Build Coastguard Worker PRIVATE_RANGES_ONLY = 1; 221*d5c09012SAndroid Build Coastguard Worker 222*d5c09012SAndroid Build Coastguard Worker // Force the use of VPC Access Connector for all egress traffic from the 223*d5c09012SAndroid Build Coastguard Worker // function. 224*d5c09012SAndroid Build Coastguard Worker ALL_TRAFFIC = 2; 225*d5c09012SAndroid Build Coastguard Worker } 226*d5c09012SAndroid Build Coastguard Worker 227*d5c09012SAndroid Build Coastguard Worker // Available ingress settings. 228*d5c09012SAndroid Build Coastguard Worker // 229*d5c09012SAndroid Build Coastguard Worker // This controls what traffic can reach the function. 230*d5c09012SAndroid Build Coastguard Worker // 231*d5c09012SAndroid Build Coastguard Worker // If unspecified, ALLOW_ALL will be used. 232*d5c09012SAndroid Build Coastguard Worker enum IngressSettings { 233*d5c09012SAndroid Build Coastguard Worker // Unspecified. 234*d5c09012SAndroid Build Coastguard Worker INGRESS_SETTINGS_UNSPECIFIED = 0; 235*d5c09012SAndroid Build Coastguard Worker 236*d5c09012SAndroid Build Coastguard Worker // Allow HTTP traffic from public and private sources. 237*d5c09012SAndroid Build Coastguard Worker ALLOW_ALL = 1; 238*d5c09012SAndroid Build Coastguard Worker 239*d5c09012SAndroid Build Coastguard Worker // Allow HTTP traffic from only private VPC sources. 240*d5c09012SAndroid Build Coastguard Worker ALLOW_INTERNAL_ONLY = 2; 241*d5c09012SAndroid Build Coastguard Worker 242*d5c09012SAndroid Build Coastguard Worker // Allow HTTP traffic from private VPC sources and through GCLB. 243*d5c09012SAndroid Build Coastguard Worker ALLOW_INTERNAL_AND_GCLB = 3; 244*d5c09012SAndroid Build Coastguard Worker } 245*d5c09012SAndroid Build Coastguard Worker 246*d5c09012SAndroid Build Coastguard Worker // Docker Registry to use for storing function Docker images. 247*d5c09012SAndroid Build Coastguard Worker enum DockerRegistry { 248*d5c09012SAndroid Build Coastguard Worker // Unspecified. 249*d5c09012SAndroid Build Coastguard Worker DOCKER_REGISTRY_UNSPECIFIED = 0; 250*d5c09012SAndroid Build Coastguard Worker 251*d5c09012SAndroid Build Coastguard Worker // Docker images will be stored in multi-regional Container Registry 252*d5c09012SAndroid Build Coastguard Worker // repositories named `gcf`. 253*d5c09012SAndroid Build Coastguard Worker CONTAINER_REGISTRY = 1; 254*d5c09012SAndroid Build Coastguard Worker 255*d5c09012SAndroid Build Coastguard Worker // Docker images will be stored in regional Artifact Registry repositories. 256*d5c09012SAndroid Build Coastguard Worker // By default, GCF will create and use repositories named `gcf-artifacts` 257*d5c09012SAndroid Build Coastguard Worker // in every region in which a function is deployed. But the repository to 258*d5c09012SAndroid Build Coastguard Worker // use can also be specified by the user using the `docker_repository` 259*d5c09012SAndroid Build Coastguard Worker // field. 260*d5c09012SAndroid Build Coastguard Worker ARTIFACT_REGISTRY = 2; 261*d5c09012SAndroid Build Coastguard Worker } 262*d5c09012SAndroid Build Coastguard Worker 263*d5c09012SAndroid Build Coastguard Worker // Security patches are applied automatically to the runtime without requiring 264*d5c09012SAndroid Build Coastguard Worker // the function to be redeployed. 265*d5c09012SAndroid Build Coastguard Worker message AutomaticUpdatePolicy {} 266*d5c09012SAndroid Build Coastguard Worker 267*d5c09012SAndroid Build Coastguard Worker // Security patches are only applied when a function is redeployed. 268*d5c09012SAndroid Build Coastguard Worker message OnDeployUpdatePolicy { 269*d5c09012SAndroid Build Coastguard Worker // Output only. contains the runtime version which was used during latest 270*d5c09012SAndroid Build Coastguard Worker // function deployment. 271*d5c09012SAndroid Build Coastguard Worker string runtime_version = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 272*d5c09012SAndroid Build Coastguard Worker } 273*d5c09012SAndroid Build Coastguard Worker 274*d5c09012SAndroid Build Coastguard Worker // A user-defined name of the function. Function names must be unique 275*d5c09012SAndroid Build Coastguard Worker // globally and match pattern `projects/*/locations/*/functions/*` 276*d5c09012SAndroid Build Coastguard Worker string name = 1; 277*d5c09012SAndroid Build Coastguard Worker 278*d5c09012SAndroid Build Coastguard Worker // User-provided description of a function. 279*d5c09012SAndroid Build Coastguard Worker string description = 2; 280*d5c09012SAndroid Build Coastguard Worker 281*d5c09012SAndroid Build Coastguard Worker // The location of the function source code. 282*d5c09012SAndroid Build Coastguard Worker oneof source_code { 283*d5c09012SAndroid Build Coastguard Worker // The Google Cloud Storage URL, starting with `gs://`, pointing to the zip 284*d5c09012SAndroid Build Coastguard Worker // archive which contains the function. 285*d5c09012SAndroid Build Coastguard Worker string source_archive_url = 3; 286*d5c09012SAndroid Build Coastguard Worker 287*d5c09012SAndroid Build Coastguard Worker // **Beta Feature** 288*d5c09012SAndroid Build Coastguard Worker // 289*d5c09012SAndroid Build Coastguard Worker // The source repository where a function is hosted. 290*d5c09012SAndroid Build Coastguard Worker SourceRepository source_repository = 4; 291*d5c09012SAndroid Build Coastguard Worker 292*d5c09012SAndroid Build Coastguard Worker // The Google Cloud Storage signed URL used for source uploading, generated 293*d5c09012SAndroid Build Coastguard Worker // by calling [google.cloud.functions.v1.GenerateUploadUrl]. 294*d5c09012SAndroid Build Coastguard Worker // 295*d5c09012SAndroid Build Coastguard Worker // The signature is validated on write methods (Create, Update) 296*d5c09012SAndroid Build Coastguard Worker // The signature is stripped from the Function object on read methods (Get, 297*d5c09012SAndroid Build Coastguard Worker // List) 298*d5c09012SAndroid Build Coastguard Worker string source_upload_url = 16; 299*d5c09012SAndroid Build Coastguard Worker } 300*d5c09012SAndroid Build Coastguard Worker 301*d5c09012SAndroid Build Coastguard Worker // An event that triggers the function. 302*d5c09012SAndroid Build Coastguard Worker oneof trigger { 303*d5c09012SAndroid Build Coastguard Worker // An HTTPS endpoint type of source that can be triggered via URL. 304*d5c09012SAndroid Build Coastguard Worker HttpsTrigger https_trigger = 5; 305*d5c09012SAndroid Build Coastguard Worker 306*d5c09012SAndroid Build Coastguard Worker // A source that fires events in response to a condition in another service. 307*d5c09012SAndroid Build Coastguard Worker EventTrigger event_trigger = 6; 308*d5c09012SAndroid Build Coastguard Worker } 309*d5c09012SAndroid Build Coastguard Worker 310*d5c09012SAndroid Build Coastguard Worker // Output only. Status of the function deployment. 311*d5c09012SAndroid Build Coastguard Worker CloudFunctionStatus status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 312*d5c09012SAndroid Build Coastguard Worker 313*d5c09012SAndroid Build Coastguard Worker // The name of the function (as defined in source code) that will be 314*d5c09012SAndroid Build Coastguard Worker // executed. Defaults to the resource name suffix (ID of the function), if not 315*d5c09012SAndroid Build Coastguard Worker // specified. 316*d5c09012SAndroid Build Coastguard Worker string entry_point = 8; 317*d5c09012SAndroid Build Coastguard Worker 318*d5c09012SAndroid Build Coastguard Worker // The runtime in which to run the function. Required when deploying a new 319*d5c09012SAndroid Build Coastguard Worker // function, optional when updating an existing function. For a complete 320*d5c09012SAndroid Build Coastguard Worker // list of possible choices, see the 321*d5c09012SAndroid Build Coastguard Worker // [`gcloud` command 322*d5c09012SAndroid Build Coastguard Worker // reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). 323*d5c09012SAndroid Build Coastguard Worker string runtime = 19; 324*d5c09012SAndroid Build Coastguard Worker 325*d5c09012SAndroid Build Coastguard Worker // The function execution timeout. Execution is considered failed and 326*d5c09012SAndroid Build Coastguard Worker // can be terminated if the function is not completed at the end of the 327*d5c09012SAndroid Build Coastguard Worker // timeout period. Defaults to 60 seconds. 328*d5c09012SAndroid Build Coastguard Worker google.protobuf.Duration timeout = 9; 329*d5c09012SAndroid Build Coastguard Worker 330*d5c09012SAndroid Build Coastguard Worker // The amount of memory in MB available for a function. 331*d5c09012SAndroid Build Coastguard Worker // Defaults to 256MB. 332*d5c09012SAndroid Build Coastguard Worker int32 available_memory_mb = 10; 333*d5c09012SAndroid Build Coastguard Worker 334*d5c09012SAndroid Build Coastguard Worker // The email of the function's service account. If empty, defaults to 335*d5c09012SAndroid Build Coastguard Worker // `{project_id}@appspot.gserviceaccount.com`. 336*d5c09012SAndroid Build Coastguard Worker string service_account_email = 11; 337*d5c09012SAndroid Build Coastguard Worker 338*d5c09012SAndroid Build Coastguard Worker // Output only. The last update timestamp of a Cloud Function. 339*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp update_time = 12 340*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 341*d5c09012SAndroid Build Coastguard Worker 342*d5c09012SAndroid Build Coastguard Worker // Output only. The version identifier of the Cloud Function. Each deployment 343*d5c09012SAndroid Build Coastguard Worker // attempt results in a new version of a function being created. 344*d5c09012SAndroid Build Coastguard Worker int64 version_id = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; 345*d5c09012SAndroid Build Coastguard Worker 346*d5c09012SAndroid Build Coastguard Worker // Labels associated with this Cloud Function. 347*d5c09012SAndroid Build Coastguard Worker map<string, string> labels = 15; 348*d5c09012SAndroid Build Coastguard Worker 349*d5c09012SAndroid Build Coastguard Worker // Environment variables that shall be available during function execution. 350*d5c09012SAndroid Build Coastguard Worker map<string, string> environment_variables = 17; 351*d5c09012SAndroid Build Coastguard Worker 352*d5c09012SAndroid Build Coastguard Worker // Build environment variables that shall be available during build time. 353*d5c09012SAndroid Build Coastguard Worker map<string, string> build_environment_variables = 28; 354*d5c09012SAndroid Build Coastguard Worker 355*d5c09012SAndroid Build Coastguard Worker // Deprecated: use vpc_connector 356*d5c09012SAndroid Build Coastguard Worker string network = 18 [deprecated = true]; 357*d5c09012SAndroid Build Coastguard Worker 358*d5c09012SAndroid Build Coastguard Worker // The limit on the maximum number of function instances that may coexist at a 359*d5c09012SAndroid Build Coastguard Worker // given time. 360*d5c09012SAndroid Build Coastguard Worker // 361*d5c09012SAndroid Build Coastguard Worker // In some cases, such as rapid traffic surges, Cloud Functions may, for a 362*d5c09012SAndroid Build Coastguard Worker // short period of time, create more instances than the specified max 363*d5c09012SAndroid Build Coastguard Worker // instances limit. If your function cannot tolerate this temporary behavior, 364*d5c09012SAndroid Build Coastguard Worker // you may want to factor in a safety margin and set a lower max instances 365*d5c09012SAndroid Build Coastguard Worker // value than your function can tolerate. 366*d5c09012SAndroid Build Coastguard Worker // 367*d5c09012SAndroid Build Coastguard Worker // See the [Max 368*d5c09012SAndroid Build Coastguard Worker // Instances](https://cloud.google.com/functions/docs/max-instances) Guide for 369*d5c09012SAndroid Build Coastguard Worker // more details. 370*d5c09012SAndroid Build Coastguard Worker int32 max_instances = 20; 371*d5c09012SAndroid Build Coastguard Worker 372*d5c09012SAndroid Build Coastguard Worker // A lower bound for the number function instances that may coexist at a 373*d5c09012SAndroid Build Coastguard Worker // given time. 374*d5c09012SAndroid Build Coastguard Worker int32 min_instances = 32; 375*d5c09012SAndroid Build Coastguard Worker 376*d5c09012SAndroid Build Coastguard Worker // The VPC Network Connector that this cloud function can connect to. It can 377*d5c09012SAndroid Build Coastguard Worker // be either the fully-qualified URI, or the short name of the network 378*d5c09012SAndroid Build Coastguard Worker // connector resource. The format of this field is 379*d5c09012SAndroid Build Coastguard Worker // `projects/*/locations/*/connectors/*` 380*d5c09012SAndroid Build Coastguard Worker // 381*d5c09012SAndroid Build Coastguard Worker // This field is mutually exclusive with `network` field and will eventually 382*d5c09012SAndroid Build Coastguard Worker // replace it. 383*d5c09012SAndroid Build Coastguard Worker // 384*d5c09012SAndroid Build Coastguard Worker // See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for 385*d5c09012SAndroid Build Coastguard Worker // more information on connecting Cloud projects. 386*d5c09012SAndroid Build Coastguard Worker string vpc_connector = 22; 387*d5c09012SAndroid Build Coastguard Worker 388*d5c09012SAndroid Build Coastguard Worker // The egress settings for the connector, controlling what traffic is diverted 389*d5c09012SAndroid Build Coastguard Worker // through it. 390*d5c09012SAndroid Build Coastguard Worker VpcConnectorEgressSettings vpc_connector_egress_settings = 23; 391*d5c09012SAndroid Build Coastguard Worker 392*d5c09012SAndroid Build Coastguard Worker // The ingress settings for the function, controlling what traffic can reach 393*d5c09012SAndroid Build Coastguard Worker // it. 394*d5c09012SAndroid Build Coastguard Worker IngressSettings ingress_settings = 24; 395*d5c09012SAndroid Build Coastguard Worker 396*d5c09012SAndroid Build Coastguard Worker // Resource name of a KMS crypto key (managed by the user) used to 397*d5c09012SAndroid Build Coastguard Worker // encrypt/decrypt function resources. 398*d5c09012SAndroid Build Coastguard Worker // 399*d5c09012SAndroid Build Coastguard Worker // It must match the pattern 400*d5c09012SAndroid Build Coastguard Worker // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. 401*d5c09012SAndroid Build Coastguard Worker // 402*d5c09012SAndroid Build Coastguard Worker // If specified, you must also provide an artifact registry repository using 403*d5c09012SAndroid Build Coastguard Worker // the `docker_repository` field that was created with the same KMS crypto 404*d5c09012SAndroid Build Coastguard Worker // key. 405*d5c09012SAndroid Build Coastguard Worker // 406*d5c09012SAndroid Build Coastguard Worker // The following service accounts need to be granted the role 'Cloud KMS 407*d5c09012SAndroid Build Coastguard Worker // CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' 408*d5c09012SAndroid Build Coastguard Worker // on the Key/KeyRing/Project/Organization (least access preferred). 409*d5c09012SAndroid Build Coastguard Worker // 410*d5c09012SAndroid Build Coastguard Worker // 1. Google Cloud Functions service account 411*d5c09012SAndroid Build Coastguard Worker // (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - 412*d5c09012SAndroid Build Coastguard Worker // Required to protect the function's image. 413*d5c09012SAndroid Build Coastguard Worker // 2. Google Storage service account 414*d5c09012SAndroid Build Coastguard Worker // (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - 415*d5c09012SAndroid Build Coastguard Worker // Required to protect the function's source code. 416*d5c09012SAndroid Build Coastguard Worker // If this service account does not exist, deploying a function without a 417*d5c09012SAndroid Build Coastguard Worker // KMS key or retrieving the service agent name provisions it. For more 418*d5c09012SAndroid Build Coastguard Worker // information, see 419*d5c09012SAndroid Build Coastguard Worker // https://cloud.google.com/storage/docs/projects#service-agents and 420*d5c09012SAndroid Build Coastguard Worker // https://cloud.google.com/storage/docs/getting-service-agent#gsutil. 421*d5c09012SAndroid Build Coastguard Worker // 422*d5c09012SAndroid Build Coastguard Worker // Google Cloud Functions delegates access to service agents to protect 423*d5c09012SAndroid Build Coastguard Worker // function resources in internal projects that are not accessible by the 424*d5c09012SAndroid Build Coastguard Worker // end user. 425*d5c09012SAndroid Build Coastguard Worker string kms_key_name = 25 [(google.api.resource_reference) = { 426*d5c09012SAndroid Build Coastguard Worker type: "cloudkms.googleapis.com/CryptoKey" 427*d5c09012SAndroid Build Coastguard Worker }]; 428*d5c09012SAndroid Build Coastguard Worker 429*d5c09012SAndroid Build Coastguard Worker // Name of the Cloud Build Custom Worker Pool that should be used to build the 430*d5c09012SAndroid Build Coastguard Worker // function. The format of this field is 431*d5c09012SAndroid Build Coastguard Worker // `projects/{project}/locations/{region}/workerPools/{workerPool}` where 432*d5c09012SAndroid Build Coastguard Worker // `{project}` and `{region}` are the project id and region respectively where 433*d5c09012SAndroid Build Coastguard Worker // the worker pool is defined and `{workerPool}` is the short name of the 434*d5c09012SAndroid Build Coastguard Worker // worker pool. 435*d5c09012SAndroid Build Coastguard Worker // 436*d5c09012SAndroid Build Coastguard Worker // If the project id is not the same as the function, then the Cloud 437*d5c09012SAndroid Build Coastguard Worker // Functions Service Agent 438*d5c09012SAndroid Build Coastguard Worker // (`service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com`) must 439*d5c09012SAndroid Build Coastguard Worker // be granted the role Cloud Build Custom Workers Builder 440*d5c09012SAndroid Build Coastguard Worker // (`roles/cloudbuild.customworkers.builder`) in the project. 441*d5c09012SAndroid Build Coastguard Worker string build_worker_pool = 26; 442*d5c09012SAndroid Build Coastguard Worker 443*d5c09012SAndroid Build Coastguard Worker // Output only. The Cloud Build ID of the latest successful deployment of the 444*d5c09012SAndroid Build Coastguard Worker // function. 445*d5c09012SAndroid Build Coastguard Worker string build_id = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; 446*d5c09012SAndroid Build Coastguard Worker 447*d5c09012SAndroid Build Coastguard Worker // Output only. The Cloud Build Name of the function deployment. 448*d5c09012SAndroid Build Coastguard Worker // `projects/<project-number>/locations/<region>/builds/<build-id>`. 449*d5c09012SAndroid Build Coastguard Worker string build_name = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; 450*d5c09012SAndroid Build Coastguard Worker 451*d5c09012SAndroid Build Coastguard Worker // Secret environment variables configuration. 452*d5c09012SAndroid Build Coastguard Worker repeated SecretEnvVar secret_environment_variables = 29; 453*d5c09012SAndroid Build Coastguard Worker 454*d5c09012SAndroid Build Coastguard Worker // Secret volumes configuration. 455*d5c09012SAndroid Build Coastguard Worker repeated SecretVolume secret_volumes = 30; 456*d5c09012SAndroid Build Coastguard Worker 457*d5c09012SAndroid Build Coastguard Worker // Input only. An identifier for Firebase function sources. Disclaimer: This 458*d5c09012SAndroid Build Coastguard Worker // field is only supported for Firebase function deployments. 459*d5c09012SAndroid Build Coastguard Worker string source_token = 31 [(google.api.field_behavior) = INPUT_ONLY]; 460*d5c09012SAndroid Build Coastguard Worker 461*d5c09012SAndroid Build Coastguard Worker // User managed repository created in Artifact Registry optionally with a 462*d5c09012SAndroid Build Coastguard Worker // customer managed encryption key. If specified, deployments will use 463*d5c09012SAndroid Build Coastguard Worker // Artifact Registry. If unspecified and the deployment is eligible to use 464*d5c09012SAndroid Build Coastguard Worker // Artifact Registry, GCF will create and use a repository named 465*d5c09012SAndroid Build Coastguard Worker // 'gcf-artifacts' for every deployed region. This is the repository to which 466*d5c09012SAndroid Build Coastguard Worker // the function docker image will be pushed after it is built by Cloud Build. 467*d5c09012SAndroid Build Coastguard Worker // 468*d5c09012SAndroid Build Coastguard Worker // It must match the pattern 469*d5c09012SAndroid Build Coastguard Worker // `projects/{project}/locations/{location}/repositories/{repository}`. 470*d5c09012SAndroid Build Coastguard Worker // 471*d5c09012SAndroid Build Coastguard Worker // Cross-project repositories are not supported. 472*d5c09012SAndroid Build Coastguard Worker // Cross-location repositories are not supported. 473*d5c09012SAndroid Build Coastguard Worker // Repository format must be 'DOCKER'. 474*d5c09012SAndroid Build Coastguard Worker string docker_repository = 34 [(google.api.resource_reference) = { 475*d5c09012SAndroid Build Coastguard Worker type: "artifactregistry.googleapis.com/Repository" 476*d5c09012SAndroid Build Coastguard Worker }]; 477*d5c09012SAndroid Build Coastguard Worker 478*d5c09012SAndroid Build Coastguard Worker // Docker Registry to use for this deployment. 479*d5c09012SAndroid Build Coastguard Worker // 480*d5c09012SAndroid Build Coastguard Worker // If unspecified, it defaults to `ARTIFACT_REGISTRY`. 481*d5c09012SAndroid Build Coastguard Worker // If `docker_repository` field is specified, this field should either be left 482*d5c09012SAndroid Build Coastguard Worker // unspecified or set to `ARTIFACT_REGISTRY`. 483*d5c09012SAndroid Build Coastguard Worker DockerRegistry docker_registry = 35; 484*d5c09012SAndroid Build Coastguard Worker 485*d5c09012SAndroid Build Coastguard Worker // Runtime update policy can be one of the following. 486*d5c09012SAndroid Build Coastguard Worker oneof runtime_update_policy { 487*d5c09012SAndroid Build Coastguard Worker // See the comment next to this message for more details. 488*d5c09012SAndroid Build Coastguard Worker AutomaticUpdatePolicy automatic_update_policy = 40; 489*d5c09012SAndroid Build Coastguard Worker 490*d5c09012SAndroid Build Coastguard Worker // See the comment next to this message for more details. 491*d5c09012SAndroid Build Coastguard Worker OnDeployUpdatePolicy on_deploy_update_policy = 41; 492*d5c09012SAndroid Build Coastguard Worker } 493*d5c09012SAndroid Build Coastguard Worker} 494*d5c09012SAndroid Build Coastguard Worker 495*d5c09012SAndroid Build Coastguard Worker// Describes SourceRepository, used to represent parameters related to 496*d5c09012SAndroid Build Coastguard Worker// source repository where a function is hosted. 497*d5c09012SAndroid Build Coastguard Workermessage SourceRepository { 498*d5c09012SAndroid Build Coastguard Worker // The URL pointing to the hosted repository where the function is defined. 499*d5c09012SAndroid Build Coastguard Worker // There are supported Cloud Source Repository URLs in the following 500*d5c09012SAndroid Build Coastguard Worker // formats: 501*d5c09012SAndroid Build Coastguard Worker // 502*d5c09012SAndroid Build Coastguard Worker // To refer to a specific commit: 503*d5c09012SAndroid Build Coastguard Worker // `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` 504*d5c09012SAndroid Build Coastguard Worker // To refer to a moveable alias (branch): 505*d5c09012SAndroid Build Coastguard Worker // `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` 506*d5c09012SAndroid Build Coastguard Worker // In particular, to refer to HEAD use `master` moveable alias. 507*d5c09012SAndroid Build Coastguard Worker // To refer to a specific fixed alias (tag): 508*d5c09012SAndroid Build Coastguard Worker // `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` 509*d5c09012SAndroid Build Coastguard Worker // 510*d5c09012SAndroid Build Coastguard Worker // You may omit `paths/*` if you want to use the main directory. 511*d5c09012SAndroid Build Coastguard Worker string url = 1; 512*d5c09012SAndroid Build Coastguard Worker 513*d5c09012SAndroid Build Coastguard Worker // Output only. The URL pointing to the hosted repository where the function 514*d5c09012SAndroid Build Coastguard Worker // were defined at the time of deployment. It always points to a specific 515*d5c09012SAndroid Build Coastguard Worker // commit in the format described above. 516*d5c09012SAndroid Build Coastguard Worker string deployed_url = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 517*d5c09012SAndroid Build Coastguard Worker} 518*d5c09012SAndroid Build Coastguard Worker 519*d5c09012SAndroid Build Coastguard Worker// Describes HttpsTrigger, could be used to connect web hooks to function. 520*d5c09012SAndroid Build Coastguard Workermessage HttpsTrigger { 521*d5c09012SAndroid Build Coastguard Worker // Available security level settings. 522*d5c09012SAndroid Build Coastguard Worker // 523*d5c09012SAndroid Build Coastguard Worker // This controls the methods to enforce security (HTTPS) on a URL. 524*d5c09012SAndroid Build Coastguard Worker // 525*d5c09012SAndroid Build Coastguard Worker // If unspecified, SECURE_OPTIONAL will be used. 526*d5c09012SAndroid Build Coastguard Worker enum SecurityLevel { 527*d5c09012SAndroid Build Coastguard Worker // Unspecified. 528*d5c09012SAndroid Build Coastguard Worker SECURITY_LEVEL_UNSPECIFIED = 0; 529*d5c09012SAndroid Build Coastguard Worker 530*d5c09012SAndroid Build Coastguard Worker // Requests for a URL that match this handler that do not use HTTPS are 531*d5c09012SAndroid Build Coastguard Worker // automatically redirected to the HTTPS URL with the same path. Query 532*d5c09012SAndroid Build Coastguard Worker // parameters are reserved for the redirect. 533*d5c09012SAndroid Build Coastguard Worker SECURE_ALWAYS = 1; 534*d5c09012SAndroid Build Coastguard Worker 535*d5c09012SAndroid Build Coastguard Worker // Both HTTP and HTTPS requests with URLs that match the handler succeed 536*d5c09012SAndroid Build Coastguard Worker // without redirects. The application can examine the request to determine 537*d5c09012SAndroid Build Coastguard Worker // which protocol was used and respond accordingly. 538*d5c09012SAndroid Build Coastguard Worker SECURE_OPTIONAL = 2; 539*d5c09012SAndroid Build Coastguard Worker } 540*d5c09012SAndroid Build Coastguard Worker 541*d5c09012SAndroid Build Coastguard Worker // Output only. The deployed URL for the function. 542*d5c09012SAndroid Build Coastguard Worker string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 543*d5c09012SAndroid Build Coastguard Worker 544*d5c09012SAndroid Build Coastguard Worker // The security level for the function. 545*d5c09012SAndroid Build Coastguard Worker SecurityLevel security_level = 2; 546*d5c09012SAndroid Build Coastguard Worker} 547*d5c09012SAndroid Build Coastguard Worker 548*d5c09012SAndroid Build Coastguard Worker// Describes EventTrigger, used to request events be sent from another 549*d5c09012SAndroid Build Coastguard Worker// service. 550*d5c09012SAndroid Build Coastguard Workermessage EventTrigger { 551*d5c09012SAndroid Build Coastguard Worker // Required. The type of event to observe. For example: 552*d5c09012SAndroid Build Coastguard Worker // `providers/cloud.storage/eventTypes/object.change` and 553*d5c09012SAndroid Build Coastguard Worker // `providers/cloud.pubsub/eventTypes/topic.publish`. 554*d5c09012SAndroid Build Coastguard Worker // 555*d5c09012SAndroid Build Coastguard Worker // Event types match pattern `providers/*/eventTypes/*.*`. 556*d5c09012SAndroid Build Coastguard Worker // The pattern contains: 557*d5c09012SAndroid Build Coastguard Worker // 558*d5c09012SAndroid Build Coastguard Worker // 1. namespace: For example, `cloud.storage` and 559*d5c09012SAndroid Build Coastguard Worker // `google.firebase.analytics`. 560*d5c09012SAndroid Build Coastguard Worker // 2. resource type: The type of resource on which event occurs. For 561*d5c09012SAndroid Build Coastguard Worker // example, the Google Cloud Storage API includes the type `object`. 562*d5c09012SAndroid Build Coastguard Worker // 3. action: The action that generates the event. For example, action for 563*d5c09012SAndroid Build Coastguard Worker // a Google Cloud Storage Object is 'change'. 564*d5c09012SAndroid Build Coastguard Worker // These parts are lower case. 565*d5c09012SAndroid Build Coastguard Worker string event_type = 1; 566*d5c09012SAndroid Build Coastguard Worker 567*d5c09012SAndroid Build Coastguard Worker // Required. The resource(s) from which to observe events, for example, 568*d5c09012SAndroid Build Coastguard Worker // `projects/_/buckets/myBucket`. 569*d5c09012SAndroid Build Coastguard Worker // 570*d5c09012SAndroid Build Coastguard Worker // Not all syntactically correct values are accepted by all services. For 571*d5c09012SAndroid Build Coastguard Worker // example: 572*d5c09012SAndroid Build Coastguard Worker // 573*d5c09012SAndroid Build Coastguard Worker // 1. The authorization model must support it. Google Cloud Functions 574*d5c09012SAndroid Build Coastguard Worker // only allows EventTriggers to be deployed that observe resources in the 575*d5c09012SAndroid Build Coastguard Worker // same project as the `CloudFunction`. 576*d5c09012SAndroid Build Coastguard Worker // 2. The resource type must match the pattern expected for an 577*d5c09012SAndroid Build Coastguard Worker // `event_type`. For example, an `EventTrigger` that has an 578*d5c09012SAndroid Build Coastguard Worker // `event_type` of "google.pubsub.topic.publish" should have a resource 579*d5c09012SAndroid Build Coastguard Worker // that matches Google Cloud Pub/Sub topics. 580*d5c09012SAndroid Build Coastguard Worker // 581*d5c09012SAndroid Build Coastguard Worker // Additionally, some services may support short names when creating an 582*d5c09012SAndroid Build Coastguard Worker // `EventTrigger`. These will always be returned in the normalized "long" 583*d5c09012SAndroid Build Coastguard Worker // format. 584*d5c09012SAndroid Build Coastguard Worker // 585*d5c09012SAndroid Build Coastguard Worker // See each *service's* documentation for supported formats. 586*d5c09012SAndroid Build Coastguard Worker string resource = 2; 587*d5c09012SAndroid Build Coastguard Worker 588*d5c09012SAndroid Build Coastguard Worker // The hostname of the service that should be observed. 589*d5c09012SAndroid Build Coastguard Worker // 590*d5c09012SAndroid Build Coastguard Worker // If no string is provided, the default service implementing the API will 591*d5c09012SAndroid Build Coastguard Worker // be used. For example, `storage.googleapis.com` is the default for all 592*d5c09012SAndroid Build Coastguard Worker // event types in the `google.storage` namespace. 593*d5c09012SAndroid Build Coastguard Worker string service = 3; 594*d5c09012SAndroid Build Coastguard Worker 595*d5c09012SAndroid Build Coastguard Worker // Specifies policy for failed executions. 596*d5c09012SAndroid Build Coastguard Worker FailurePolicy failure_policy = 5; 597*d5c09012SAndroid Build Coastguard Worker} 598*d5c09012SAndroid Build Coastguard Worker 599*d5c09012SAndroid Build Coastguard Worker// Describes the policy in case of function's execution failure. 600*d5c09012SAndroid Build Coastguard Worker// If empty, then defaults to ignoring failures (i.e. not retrying them). 601*d5c09012SAndroid Build Coastguard Workermessage FailurePolicy { 602*d5c09012SAndroid Build Coastguard Worker // Describes the retry policy in case of function's execution failure. 603*d5c09012SAndroid Build Coastguard Worker // A function execution will be retried on any failure. 604*d5c09012SAndroid Build Coastguard Worker // A failed execution will be retried up to 7 days with an exponential backoff 605*d5c09012SAndroid Build Coastguard Worker // (capped at 10 seconds). 606*d5c09012SAndroid Build Coastguard Worker // Retried execution is charged as any other execution. 607*d5c09012SAndroid Build Coastguard Worker message Retry {} 608*d5c09012SAndroid Build Coastguard Worker 609*d5c09012SAndroid Build Coastguard Worker // Defines the action taken in case of a function execution failure. 610*d5c09012SAndroid Build Coastguard Worker oneof action { 611*d5c09012SAndroid Build Coastguard Worker // If specified, then the function will be retried in case of a failure. 612*d5c09012SAndroid Build Coastguard Worker Retry retry = 1; 613*d5c09012SAndroid Build Coastguard Worker } 614*d5c09012SAndroid Build Coastguard Worker} 615*d5c09012SAndroid Build Coastguard Worker 616*d5c09012SAndroid Build Coastguard Worker// Describes the current stage of a deployment. 617*d5c09012SAndroid Build Coastguard Workerenum CloudFunctionStatus { 618*d5c09012SAndroid Build Coastguard Worker // Not specified. Invalid state. 619*d5c09012SAndroid Build Coastguard Worker CLOUD_FUNCTION_STATUS_UNSPECIFIED = 0; 620*d5c09012SAndroid Build Coastguard Worker 621*d5c09012SAndroid Build Coastguard Worker // Function has been successfully deployed and is serving. 622*d5c09012SAndroid Build Coastguard Worker ACTIVE = 1; 623*d5c09012SAndroid Build Coastguard Worker 624*d5c09012SAndroid Build Coastguard Worker // Function deployment failed and the function isn’t serving. 625*d5c09012SAndroid Build Coastguard Worker OFFLINE = 2; 626*d5c09012SAndroid Build Coastguard Worker 627*d5c09012SAndroid Build Coastguard Worker // Function is being created or updated. 628*d5c09012SAndroid Build Coastguard Worker DEPLOY_IN_PROGRESS = 3; 629*d5c09012SAndroid Build Coastguard Worker 630*d5c09012SAndroid Build Coastguard Worker // Function is being deleted. 631*d5c09012SAndroid Build Coastguard Worker DELETE_IN_PROGRESS = 4; 632*d5c09012SAndroid Build Coastguard Worker 633*d5c09012SAndroid Build Coastguard Worker // Function deployment failed and the function serving state is undefined. 634*d5c09012SAndroid Build Coastguard Worker // The function should be updated or deleted to move it out of this state. 635*d5c09012SAndroid Build Coastguard Worker UNKNOWN = 5; 636*d5c09012SAndroid Build Coastguard Worker} 637*d5c09012SAndroid Build Coastguard Worker 638*d5c09012SAndroid Build Coastguard Worker// Configuration for a secret environment variable. It has the information 639*d5c09012SAndroid Build Coastguard Worker// necessary to fetch the secret value from secret manager and expose it as an 640*d5c09012SAndroid Build Coastguard Worker// environment variable. 641*d5c09012SAndroid Build Coastguard Workermessage SecretEnvVar { 642*d5c09012SAndroid Build Coastguard Worker // Name of the environment variable. 643*d5c09012SAndroid Build Coastguard Worker string key = 1; 644*d5c09012SAndroid Build Coastguard Worker 645*d5c09012SAndroid Build Coastguard Worker // Project identifier (preferrably project number but can also be the project 646*d5c09012SAndroid Build Coastguard Worker // ID) of the project that contains the secret. If not set, it will be 647*d5c09012SAndroid Build Coastguard Worker // populated with the function's project assuming that the secret exists in 648*d5c09012SAndroid Build Coastguard Worker // the same project as of the function. 649*d5c09012SAndroid Build Coastguard Worker string project_id = 2; 650*d5c09012SAndroid Build Coastguard Worker 651*d5c09012SAndroid Build Coastguard Worker // Name of the secret in secret manager (not the full resource name). 652*d5c09012SAndroid Build Coastguard Worker string secret = 3; 653*d5c09012SAndroid Build Coastguard Worker 654*d5c09012SAndroid Build Coastguard Worker // Version of the secret (version number or the string 'latest'). It is 655*d5c09012SAndroid Build Coastguard Worker // recommended to use a numeric version for secret environment variables as 656*d5c09012SAndroid Build Coastguard Worker // any updates to the secret value is not reflected until new instances start. 657*d5c09012SAndroid Build Coastguard Worker string version = 4; 658*d5c09012SAndroid Build Coastguard Worker} 659*d5c09012SAndroid Build Coastguard Worker 660*d5c09012SAndroid Build Coastguard Worker// Configuration for a secret volume. It has the information necessary to fetch 661*d5c09012SAndroid Build Coastguard Worker// the secret value from secret manager and make it available as files mounted 662*d5c09012SAndroid Build Coastguard Worker// at the requested paths within the application container. Secret value is not 663*d5c09012SAndroid Build Coastguard Worker// a part of the configuration. Every filesystem read operation performs a 664*d5c09012SAndroid Build Coastguard Worker// lookup in secret manager to retrieve the secret value. 665*d5c09012SAndroid Build Coastguard Workermessage SecretVolume { 666*d5c09012SAndroid Build Coastguard Worker // Configuration for a single version. 667*d5c09012SAndroid Build Coastguard Worker message SecretVersion { 668*d5c09012SAndroid Build Coastguard Worker // Version of the secret (version number or the string 'latest'). It is 669*d5c09012SAndroid Build Coastguard Worker // preferable to use `latest` version with secret volumes as secret value 670*d5c09012SAndroid Build Coastguard Worker // changes are reflected immediately. 671*d5c09012SAndroid Build Coastguard Worker string version = 1; 672*d5c09012SAndroid Build Coastguard Worker 673*d5c09012SAndroid Build Coastguard Worker // Relative path of the file under the mount path where the secret value for 674*d5c09012SAndroid Build Coastguard Worker // this version will be fetched and made available. For example, setting the 675*d5c09012SAndroid Build Coastguard Worker // mount_path as '/etc/secrets' and path as `/secret_foo` would mount the 676*d5c09012SAndroid Build Coastguard Worker // secret value file at `/etc/secrets/secret_foo`. 677*d5c09012SAndroid Build Coastguard Worker string path = 2; 678*d5c09012SAndroid Build Coastguard Worker } 679*d5c09012SAndroid Build Coastguard Worker 680*d5c09012SAndroid Build Coastguard Worker // The path within the container to mount the secret volume. For example, 681*d5c09012SAndroid Build Coastguard Worker // setting the mount_path as `/etc/secrets` would mount the secret value files 682*d5c09012SAndroid Build Coastguard Worker // under the `/etc/secrets` directory. This directory will also be completely 683*d5c09012SAndroid Build Coastguard Worker // shadowed and unavailable to mount any other secrets. 684*d5c09012SAndroid Build Coastguard Worker // 685*d5c09012SAndroid Build Coastguard Worker // Recommended mount paths: /etc/secrets 686*d5c09012SAndroid Build Coastguard Worker // Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log 687*d5c09012SAndroid Build Coastguard Worker string mount_path = 1; 688*d5c09012SAndroid Build Coastguard Worker 689*d5c09012SAndroid Build Coastguard Worker // Project identifier (preferrably project number but can also be the project 690*d5c09012SAndroid Build Coastguard Worker // ID) of the project that contains the secret. If not set, it will be 691*d5c09012SAndroid Build Coastguard Worker // populated with the function's project assuming that the secret exists in 692*d5c09012SAndroid Build Coastguard Worker // the same project as of the function. 693*d5c09012SAndroid Build Coastguard Worker string project_id = 2; 694*d5c09012SAndroid Build Coastguard Worker 695*d5c09012SAndroid Build Coastguard Worker // Name of the secret in secret manager (not the full resource name). 696*d5c09012SAndroid Build Coastguard Worker string secret = 3; 697*d5c09012SAndroid Build Coastguard Worker 698*d5c09012SAndroid Build Coastguard Worker // List of secret versions to mount for this secret. If empty, the `latest` 699*d5c09012SAndroid Build Coastguard Worker // version of the secret will be made available in a file named after the 700*d5c09012SAndroid Build Coastguard Worker // secret under the mount point. 701*d5c09012SAndroid Build Coastguard Worker repeated SecretVersion versions = 4; 702*d5c09012SAndroid Build Coastguard Worker} 703*d5c09012SAndroid Build Coastguard Worker 704*d5c09012SAndroid Build Coastguard Worker// Request for the `CreateFunction` method. 705*d5c09012SAndroid Build Coastguard Workermessage CreateFunctionRequest { 706*d5c09012SAndroid Build Coastguard Worker // Required. The project and location in which the function should be created, 707*d5c09012SAndroid Build Coastguard Worker // specified in the format `projects/*/locations/*` 708*d5c09012SAndroid Build Coastguard Worker string location = 1 [ 709*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 710*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 711*d5c09012SAndroid Build Coastguard Worker type: "locations.googleapis.com/Location" 712*d5c09012SAndroid Build Coastguard Worker } 713*d5c09012SAndroid Build Coastguard Worker ]; 714*d5c09012SAndroid Build Coastguard Worker 715*d5c09012SAndroid Build Coastguard Worker // Required. Function to be created. 716*d5c09012SAndroid Build Coastguard Worker CloudFunction function = 2 [(google.api.field_behavior) = REQUIRED]; 717*d5c09012SAndroid Build Coastguard Worker} 718*d5c09012SAndroid Build Coastguard Worker 719*d5c09012SAndroid Build Coastguard Worker// Request for the `UpdateFunction` method. 720*d5c09012SAndroid Build Coastguard Workermessage UpdateFunctionRequest { 721*d5c09012SAndroid Build Coastguard Worker // Required. New version of the function. 722*d5c09012SAndroid Build Coastguard Worker CloudFunction function = 1 [(google.api.field_behavior) = REQUIRED]; 723*d5c09012SAndroid Build Coastguard Worker 724*d5c09012SAndroid Build Coastguard Worker // Required. The list of fields in `CloudFunction` that have to be updated. 725*d5c09012SAndroid Build Coastguard Worker google.protobuf.FieldMask update_mask = 2; 726*d5c09012SAndroid Build Coastguard Worker} 727*d5c09012SAndroid Build Coastguard Worker 728*d5c09012SAndroid Build Coastguard Worker// Request for the `GetFunction` method. 729*d5c09012SAndroid Build Coastguard Workermessage GetFunctionRequest { 730*d5c09012SAndroid Build Coastguard Worker // Required. The name of the function which details should be obtained. 731*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 732*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 733*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 734*d5c09012SAndroid Build Coastguard Worker type: "cloudfunctions.googleapis.com/CloudFunction" 735*d5c09012SAndroid Build Coastguard Worker } 736*d5c09012SAndroid Build Coastguard Worker ]; 737*d5c09012SAndroid Build Coastguard Worker 738*d5c09012SAndroid Build Coastguard Worker // Optional. The optional version of the function whose details should be 739*d5c09012SAndroid Build Coastguard Worker // obtained. The version of a 1st Gen function is an integer that starts from 740*d5c09012SAndroid Build Coastguard Worker // 1 and gets incremented on redeployments. Each deployment creates a config 741*d5c09012SAndroid Build Coastguard Worker // version of the underlying function. GCF may keep historical configs for old 742*d5c09012SAndroid Build Coastguard Worker // versions. This field can be specified to fetch the historical configs. 743*d5c09012SAndroid Build Coastguard Worker // Leave it blank or set to 0 to get the latest version of the function. 744*d5c09012SAndroid Build Coastguard Worker int64 version_id = 2 [(google.api.field_behavior) = OPTIONAL]; 745*d5c09012SAndroid Build Coastguard Worker} 746*d5c09012SAndroid Build Coastguard Worker 747*d5c09012SAndroid Build Coastguard Worker// Request for the `ListFunctions` method. 748*d5c09012SAndroid Build Coastguard Workermessage ListFunctionsRequest { 749*d5c09012SAndroid Build Coastguard Worker // The project and location from which the function should be listed, 750*d5c09012SAndroid Build Coastguard Worker // specified in the format `projects/*/locations/*` 751*d5c09012SAndroid Build Coastguard Worker // If you want to list functions in all locations, use "-" in place of a 752*d5c09012SAndroid Build Coastguard Worker // location. When listing functions in all locations, if one or more 753*d5c09012SAndroid Build Coastguard Worker // location(s) are unreachable, the response will contain functions from all 754*d5c09012SAndroid Build Coastguard Worker // reachable locations along with the names of any unreachable locations. 755*d5c09012SAndroid Build Coastguard Worker string parent = 1 [(google.api.resource_reference) = { 756*d5c09012SAndroid Build Coastguard Worker type: "locations.googleapis.com/Location" 757*d5c09012SAndroid Build Coastguard Worker }]; 758*d5c09012SAndroid Build Coastguard Worker 759*d5c09012SAndroid Build Coastguard Worker // Maximum number of functions to return per call. 760*d5c09012SAndroid Build Coastguard Worker int32 page_size = 2; 761*d5c09012SAndroid Build Coastguard Worker 762*d5c09012SAndroid Build Coastguard Worker // The value returned by the last 763*d5c09012SAndroid Build Coastguard Worker // `ListFunctionsResponse`; indicates that 764*d5c09012SAndroid Build Coastguard Worker // this is a continuation of a prior `ListFunctions` call, and that the 765*d5c09012SAndroid Build Coastguard Worker // system should return the next page of data. 766*d5c09012SAndroid Build Coastguard Worker string page_token = 3; 767*d5c09012SAndroid Build Coastguard Worker} 768*d5c09012SAndroid Build Coastguard Worker 769*d5c09012SAndroid Build Coastguard Worker// Response for the `ListFunctions` method. 770*d5c09012SAndroid Build Coastguard Workermessage ListFunctionsResponse { 771*d5c09012SAndroid Build Coastguard Worker // The functions that match the request. 772*d5c09012SAndroid Build Coastguard Worker repeated CloudFunction functions = 1; 773*d5c09012SAndroid Build Coastguard Worker 774*d5c09012SAndroid Build Coastguard Worker // If not empty, indicates that there may be more functions that match 775*d5c09012SAndroid Build Coastguard Worker // the request; this value should be passed in a new 776*d5c09012SAndroid Build Coastguard Worker // [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] 777*d5c09012SAndroid Build Coastguard Worker // to get more functions. 778*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 779*d5c09012SAndroid Build Coastguard Worker 780*d5c09012SAndroid Build Coastguard Worker // Locations that could not be reached. The response does not include any 781*d5c09012SAndroid Build Coastguard Worker // functions from these locations. 782*d5c09012SAndroid Build Coastguard Worker repeated string unreachable = 3; 783*d5c09012SAndroid Build Coastguard Worker} 784*d5c09012SAndroid Build Coastguard Worker 785*d5c09012SAndroid Build Coastguard Worker// Request for the `DeleteFunction` method. 786*d5c09012SAndroid Build Coastguard Workermessage DeleteFunctionRequest { 787*d5c09012SAndroid Build Coastguard Worker // Required. The name of the function which should be deleted. 788*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 789*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 790*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 791*d5c09012SAndroid Build Coastguard Worker type: "cloudfunctions.googleapis.com/CloudFunction" 792*d5c09012SAndroid Build Coastguard Worker } 793*d5c09012SAndroid Build Coastguard Worker ]; 794*d5c09012SAndroid Build Coastguard Worker} 795*d5c09012SAndroid Build Coastguard Worker 796*d5c09012SAndroid Build Coastguard Worker// Request for the `CallFunction` method. 797*d5c09012SAndroid Build Coastguard Workermessage CallFunctionRequest { 798*d5c09012SAndroid Build Coastguard Worker // Required. The name of the function to be called. 799*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 800*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 801*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 802*d5c09012SAndroid Build Coastguard Worker type: "cloudfunctions.googleapis.com/CloudFunction" 803*d5c09012SAndroid Build Coastguard Worker } 804*d5c09012SAndroid Build Coastguard Worker ]; 805*d5c09012SAndroid Build Coastguard Worker 806*d5c09012SAndroid Build Coastguard Worker // Required. Input to be passed to the function. 807*d5c09012SAndroid Build Coastguard Worker string data = 2 [(google.api.field_behavior) = REQUIRED]; 808*d5c09012SAndroid Build Coastguard Worker} 809*d5c09012SAndroid Build Coastguard Worker 810*d5c09012SAndroid Build Coastguard Worker// Response of `CallFunction` method. 811*d5c09012SAndroid Build Coastguard Workermessage CallFunctionResponse { 812*d5c09012SAndroid Build Coastguard Worker // Execution id of function invocation. 813*d5c09012SAndroid Build Coastguard Worker string execution_id = 1; 814*d5c09012SAndroid Build Coastguard Worker 815*d5c09012SAndroid Build Coastguard Worker // Result populated for successful execution of synchronous function. Will 816*d5c09012SAndroid Build Coastguard Worker // not be populated if function does not return a result through context. 817*d5c09012SAndroid Build Coastguard Worker string result = 2; 818*d5c09012SAndroid Build Coastguard Worker 819*d5c09012SAndroid Build Coastguard Worker // Either system or user-function generated error. Set if execution 820*d5c09012SAndroid Build Coastguard Worker // was not successful. 821*d5c09012SAndroid Build Coastguard Worker string error = 3; 822*d5c09012SAndroid Build Coastguard Worker} 823*d5c09012SAndroid Build Coastguard Worker 824*d5c09012SAndroid Build Coastguard Worker// Request of `GenerateSourceUploadUrl` method. 825*d5c09012SAndroid Build Coastguard Workermessage GenerateUploadUrlRequest { 826*d5c09012SAndroid Build Coastguard Worker // The project and location in which the Google Cloud Storage signed URL 827*d5c09012SAndroid Build Coastguard Worker // should be generated, specified in the format `projects/*/locations/*`. 828*d5c09012SAndroid Build Coastguard Worker string parent = 1; 829*d5c09012SAndroid Build Coastguard Worker 830*d5c09012SAndroid Build Coastguard Worker // Resource name of a KMS crypto key (managed by the user) used to 831*d5c09012SAndroid Build Coastguard Worker // encrypt/decrypt function source code objects in intermediate Cloud Storage 832*d5c09012SAndroid Build Coastguard Worker // buckets. When you generate an upload url and upload your source code, it 833*d5c09012SAndroid Build Coastguard Worker // gets copied to an intermediate Cloud Storage bucket. The source code is 834*d5c09012SAndroid Build Coastguard Worker // then copied to a versioned directory in the sources bucket in the consumer 835*d5c09012SAndroid Build Coastguard Worker // project during the function deployment. 836*d5c09012SAndroid Build Coastguard Worker // 837*d5c09012SAndroid Build Coastguard Worker // It must match the pattern 838*d5c09012SAndroid Build Coastguard Worker // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. 839*d5c09012SAndroid Build Coastguard Worker // 840*d5c09012SAndroid Build Coastguard Worker // The Google Cloud Functions service account 841*d5c09012SAndroid Build Coastguard Worker // (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be 842*d5c09012SAndroid Build Coastguard Worker // granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter 843*d5c09012SAndroid Build Coastguard Worker // (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the 844*d5c09012SAndroid Build Coastguard Worker // Key/KeyRing/Project/Organization (least access preferred). GCF will 845*d5c09012SAndroid Build Coastguard Worker // delegate access to the Google Storage service account in the internal 846*d5c09012SAndroid Build Coastguard Worker // project. 847*d5c09012SAndroid Build Coastguard Worker string kms_key_name = 2 [(google.api.resource_reference) = { 848*d5c09012SAndroid Build Coastguard Worker type: "cloudkms.googleapis.com/CryptoKey" 849*d5c09012SAndroid Build Coastguard Worker }]; 850*d5c09012SAndroid Build Coastguard Worker} 851*d5c09012SAndroid Build Coastguard Worker 852*d5c09012SAndroid Build Coastguard Worker// Response of `GenerateSourceUploadUrl` method. 853*d5c09012SAndroid Build Coastguard Workermessage GenerateUploadUrlResponse { 854*d5c09012SAndroid Build Coastguard Worker // The generated Google Cloud Storage signed URL that should be used for a 855*d5c09012SAndroid Build Coastguard Worker // function source code upload. The uploaded file should be a zip archive 856*d5c09012SAndroid Build Coastguard Worker // which contains a function. 857*d5c09012SAndroid Build Coastguard Worker string upload_url = 1; 858*d5c09012SAndroid Build Coastguard Worker} 859*d5c09012SAndroid Build Coastguard Worker 860*d5c09012SAndroid Build Coastguard Worker// Request of `GenerateDownloadUrl` method. 861*d5c09012SAndroid Build Coastguard Workermessage GenerateDownloadUrlRequest { 862*d5c09012SAndroid Build Coastguard Worker // The name of function for which source code Google Cloud Storage signed 863*d5c09012SAndroid Build Coastguard Worker // URL should be generated. 864*d5c09012SAndroid Build Coastguard Worker string name = 1; 865*d5c09012SAndroid Build Coastguard Worker 866*d5c09012SAndroid Build Coastguard Worker // The optional version of function. If not set, default, current version 867*d5c09012SAndroid Build Coastguard Worker // is used. 868*d5c09012SAndroid Build Coastguard Worker uint64 version_id = 2; 869*d5c09012SAndroid Build Coastguard Worker} 870*d5c09012SAndroid Build Coastguard Worker 871*d5c09012SAndroid Build Coastguard Worker// Response of `GenerateDownloadUrl` method. 872*d5c09012SAndroid Build Coastguard Workermessage GenerateDownloadUrlResponse { 873*d5c09012SAndroid Build Coastguard Worker // The generated Google Cloud Storage signed URL that should be used for 874*d5c09012SAndroid Build Coastguard Worker // function source code download. 875*d5c09012SAndroid Build Coastguard Worker string download_url = 1; 876*d5c09012SAndroid Build Coastguard Worker} 877