// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/cloud/functions/v2beta/functions.proto package functionspb import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( FunctionService_GetFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/GetFunction" FunctionService_ListFunctions_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/ListFunctions" FunctionService_CreateFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/CreateFunction" FunctionService_UpdateFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/UpdateFunction" FunctionService_DeleteFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/DeleteFunction" FunctionService_GenerateUploadUrl_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/GenerateUploadUrl" FunctionService_GenerateDownloadUrl_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/GenerateDownloadUrl" FunctionService_ListRuntimes_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/ListRuntimes" ) // FunctionServiceClient is the client API for FunctionService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type FunctionServiceClient interface { // Returns a function with the given name from the requested project. GetFunction(ctx context.Context, in *GetFunctionRequest, opts ...grpc.CallOption) (*Function, error) // Returns a list of functions that belong to the requested project. ListFunctions(ctx context.Context, in *ListFunctionsRequest, opts ...grpc.CallOption) (*ListFunctionsResponse, error) // Creates a new function. If a function with the given name already exists in // the specified project, the long running operation will return // `ALREADY_EXISTS` error. CreateFunction(ctx context.Context, in *CreateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Updates existing function. UpdateFunction(ctx context.Context, in *UpdateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Deletes a function with the given name from the specified project. If the // given function is used by some trigger, the trigger will be updated to // remove this function. DeleteFunction(ctx context.Context, in *DeleteFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Returns a signed URL for uploading a function source code. // For more information about the signed URL usage see: // https://cloud.google.com/storage/docs/access-control/signed-urls. // Once the function source code upload is complete, the used signed // URL should be provided in CreateFunction or UpdateFunction request // as a reference to the function source code. // // When uploading source code to the generated signed URL, please follow // these restrictions: // // - Source file type should be a zip file. // - No credentials should be attached - the signed URLs provide access to the // target bucket using internal service identity; if credentials were // attached, the identity from the credentials would be used, but that // identity does not have permissions to upload files to the URL. // // When making a HTTP PUT request, specify this header: // // * `content-type: application/zip` // // Do not specify this header: // // * `Authorization: Bearer YOUR_TOKEN` GenerateUploadUrl(ctx context.Context, in *GenerateUploadUrlRequest, opts ...grpc.CallOption) (*GenerateUploadUrlResponse, error) // Returns a signed URL for downloading deployed function source code. // The URL is only valid for a limited period and should be used within // 30 minutes of generation. // For more information about the signed URL usage see: // https://cloud.google.com/storage/docs/access-control/signed-urls GenerateDownloadUrl(ctx context.Context, in *GenerateDownloadUrlRequest, opts ...grpc.CallOption) (*GenerateDownloadUrlResponse, error) // Returns a list of runtimes that are supported for the requested project. ListRuntimes(ctx context.Context, in *ListRuntimesRequest, opts ...grpc.CallOption) (*ListRuntimesResponse, error) } type functionServiceClient struct { cc grpc.ClientConnInterface } func NewFunctionServiceClient(cc grpc.ClientConnInterface) FunctionServiceClient { return &functionServiceClient{cc} } func (c *functionServiceClient) GetFunction(ctx context.Context, in *GetFunctionRequest, opts ...grpc.CallOption) (*Function, error) { out := new(Function) err := c.cc.Invoke(ctx, FunctionService_GetFunction_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *functionServiceClient) ListFunctions(ctx context.Context, in *ListFunctionsRequest, opts ...grpc.CallOption) (*ListFunctionsResponse, error) { out := new(ListFunctionsResponse) err := c.cc.Invoke(ctx, FunctionService_ListFunctions_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *functionServiceClient) CreateFunction(ctx context.Context, in *CreateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, FunctionService_CreateFunction_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *functionServiceClient) UpdateFunction(ctx context.Context, in *UpdateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, FunctionService_UpdateFunction_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *functionServiceClient) DeleteFunction(ctx context.Context, in *DeleteFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, FunctionService_DeleteFunction_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *functionServiceClient) GenerateUploadUrl(ctx context.Context, in *GenerateUploadUrlRequest, opts ...grpc.CallOption) (*GenerateUploadUrlResponse, error) { out := new(GenerateUploadUrlResponse) err := c.cc.Invoke(ctx, FunctionService_GenerateUploadUrl_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *functionServiceClient) GenerateDownloadUrl(ctx context.Context, in *GenerateDownloadUrlRequest, opts ...grpc.CallOption) (*GenerateDownloadUrlResponse, error) { out := new(GenerateDownloadUrlResponse) err := c.cc.Invoke(ctx, FunctionService_GenerateDownloadUrl_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *functionServiceClient) ListRuntimes(ctx context.Context, in *ListRuntimesRequest, opts ...grpc.CallOption) (*ListRuntimesResponse, error) { out := new(ListRuntimesResponse) err := c.cc.Invoke(ctx, FunctionService_ListRuntimes_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // FunctionServiceServer is the server API for FunctionService service. // All implementations should embed UnimplementedFunctionServiceServer // for forward compatibility type FunctionServiceServer interface { // Returns a function with the given name from the requested project. GetFunction(context.Context, *GetFunctionRequest) (*Function, error) // Returns a list of functions that belong to the requested project. ListFunctions(context.Context, *ListFunctionsRequest) (*ListFunctionsResponse, error) // Creates a new function. If a function with the given name already exists in // the specified project, the long running operation will return // `ALREADY_EXISTS` error. CreateFunction(context.Context, *CreateFunctionRequest) (*longrunningpb.Operation, error) // Updates existing function. UpdateFunction(context.Context, *UpdateFunctionRequest) (*longrunningpb.Operation, error) // Deletes a function with the given name from the specified project. If the // given function is used by some trigger, the trigger will be updated to // remove this function. DeleteFunction(context.Context, *DeleteFunctionRequest) (*longrunningpb.Operation, error) // Returns a signed URL for uploading a function source code. // For more information about the signed URL usage see: // https://cloud.google.com/storage/docs/access-control/signed-urls. // Once the function source code upload is complete, the used signed // URL should be provided in CreateFunction or UpdateFunction request // as a reference to the function source code. // // When uploading source code to the generated signed URL, please follow // these restrictions: // // - Source file type should be a zip file. // - No credentials should be attached - the signed URLs provide access to the // target bucket using internal service identity; if credentials were // attached, the identity from the credentials would be used, but that // identity does not have permissions to upload files to the URL. // // When making a HTTP PUT request, specify this header: // // * `content-type: application/zip` // // Do not specify this header: // // * `Authorization: Bearer YOUR_TOKEN` GenerateUploadUrl(context.Context, *GenerateUploadUrlRequest) (*GenerateUploadUrlResponse, error) // Returns a signed URL for downloading deployed function source code. // The URL is only valid for a limited period and should be used within // 30 minutes of generation. // For more information about the signed URL usage see: // https://cloud.google.com/storage/docs/access-control/signed-urls GenerateDownloadUrl(context.Context, *GenerateDownloadUrlRequest) (*GenerateDownloadUrlResponse, error) // Returns a list of runtimes that are supported for the requested project. ListRuntimes(context.Context, *ListRuntimesRequest) (*ListRuntimesResponse, error) } // UnimplementedFunctionServiceServer should be embedded to have forward compatible implementations. type UnimplementedFunctionServiceServer struct { } func (UnimplementedFunctionServiceServer) GetFunction(context.Context, *GetFunctionRequest) (*Function, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFunction not implemented") } func (UnimplementedFunctionServiceServer) ListFunctions(context.Context, *ListFunctionsRequest) (*ListFunctionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFunctions not implemented") } func (UnimplementedFunctionServiceServer) CreateFunction(context.Context, *CreateFunctionRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateFunction not implemented") } func (UnimplementedFunctionServiceServer) UpdateFunction(context.Context, *UpdateFunctionRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateFunction not implemented") } func (UnimplementedFunctionServiceServer) DeleteFunction(context.Context, *DeleteFunctionRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteFunction not implemented") } func (UnimplementedFunctionServiceServer) GenerateUploadUrl(context.Context, *GenerateUploadUrlRequest) (*GenerateUploadUrlResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateUploadUrl not implemented") } func (UnimplementedFunctionServiceServer) GenerateDownloadUrl(context.Context, *GenerateDownloadUrlRequest) (*GenerateDownloadUrlResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateDownloadUrl not implemented") } func (UnimplementedFunctionServiceServer) ListRuntimes(context.Context, *ListRuntimesRequest) (*ListRuntimesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRuntimes not implemented") } // UnsafeFunctionServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FunctionServiceServer will // result in compilation errors. type UnsafeFunctionServiceServer interface { mustEmbedUnimplementedFunctionServiceServer() } func RegisterFunctionServiceServer(s grpc.ServiceRegistrar, srv FunctionServiceServer) { s.RegisterService(&FunctionService_ServiceDesc, srv) } func _FunctionService_GetFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetFunctionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).GetFunction(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_GetFunction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).GetFunction(ctx, req.(*GetFunctionRequest)) } return interceptor(ctx, in, info, handler) } func _FunctionService_ListFunctions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListFunctionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).ListFunctions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_ListFunctions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).ListFunctions(ctx, req.(*ListFunctionsRequest)) } return interceptor(ctx, in, info, handler) } func _FunctionService_CreateFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateFunctionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).CreateFunction(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_CreateFunction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).CreateFunction(ctx, req.(*CreateFunctionRequest)) } return interceptor(ctx, in, info, handler) } func _FunctionService_UpdateFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateFunctionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).UpdateFunction(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_UpdateFunction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).UpdateFunction(ctx, req.(*UpdateFunctionRequest)) } return interceptor(ctx, in, info, handler) } func _FunctionService_DeleteFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteFunctionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).DeleteFunction(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_DeleteFunction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).DeleteFunction(ctx, req.(*DeleteFunctionRequest)) } return interceptor(ctx, in, info, handler) } func _FunctionService_GenerateUploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GenerateUploadUrlRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).GenerateUploadUrl(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_GenerateUploadUrl_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).GenerateUploadUrl(ctx, req.(*GenerateUploadUrlRequest)) } return interceptor(ctx, in, info, handler) } func _FunctionService_GenerateDownloadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GenerateDownloadUrlRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).GenerateDownloadUrl(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_GenerateDownloadUrl_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).GenerateDownloadUrl(ctx, req.(*GenerateDownloadUrlRequest)) } return interceptor(ctx, in, info, handler) } func _FunctionService_ListRuntimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRuntimesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FunctionServiceServer).ListRuntimes(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FunctionService_ListRuntimes_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FunctionServiceServer).ListRuntimes(ctx, req.(*ListRuntimesRequest)) } return interceptor(ctx, in, info, handler) } // FunctionService_ServiceDesc is the grpc.ServiceDesc for FunctionService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var FunctionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.functions.v2beta.FunctionService", HandlerType: (*FunctionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFunction", Handler: _FunctionService_GetFunction_Handler, }, { MethodName: "ListFunctions", Handler: _FunctionService_ListFunctions_Handler, }, { MethodName: "CreateFunction", Handler: _FunctionService_CreateFunction_Handler, }, { MethodName: "UpdateFunction", Handler: _FunctionService_UpdateFunction_Handler, }, { MethodName: "DeleteFunction", Handler: _FunctionService_DeleteFunction_Handler, }, { MethodName: "GenerateUploadUrl", Handler: _FunctionService_GenerateUploadUrl_Handler, }, { MethodName: "GenerateDownloadUrl", Handler: _FunctionService_GenerateDownloadUrl_Handler, }, { MethodName: "ListRuntimes", Handler: _FunctionService_ListRuntimes_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/functions/v2beta/functions.proto", }