Debian Codegraph @

shopping/merchant/lfp/apiv1beta/lfppb/lfpsale_grpc.pb.go

raw
1 // Copyright 2025 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
15 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
16 // versions:
17 // - protoc-gen-go-grpc v1.3.0
18 // - protoc v4.25.7
19 // source: google/shopping/merchant/lfp/v1beta/lfpsale.proto
20
21 package lfppb
22
23 import (
24 context "context"
25 grpc "google.golang.org/grpc"
26 codes "google.golang.org/grpc/codes"
27 status "google.golang.org/grpc/status"
28 )
29
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the grpc package it is being compiled against.
32 // Requires gRPC-Go v1.32.0 or later.
33 const _ = grpc.SupportPackageIsVersion7
34
35 const (
36 LfpSaleService_InsertLfpSale_FullMethodName = "/google.shopping.merchant.lfp.v1beta.LfpSaleService/InsertLfpSale"
37 )
38
39 // LfpSaleServiceClient is the client API for LfpSaleService service.
40 //
41 // 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.
42 type LfpSaleServiceClient interface {
43 // Inserts a `LfpSale` for the given merchant.
44 InsertLfpSale(ctx context.Context, in *InsertLfpSaleRequest, opts ...grpc.CallOption) (*LfpSale, error)
45 }
46
47 type lfpSaleServiceClient struct {
48 cc grpc.ClientConnInterface
49 }
50
51 func NewLfpSaleServiceClient(cc grpc.ClientConnInterface) LfpSaleServiceClient {
52 return &lfpSaleServiceClient{cc}
53 }
54
55 func (c *lfpSaleServiceClient) InsertLfpSale(ctx context.Context, in *InsertLfpSaleRequest, opts ...grpc.CallOption) (*LfpSale, error) {
56 out := new(LfpSale)
57 err := c.cc.Invoke(ctx, LfpSaleService_InsertLfpSale_FullMethodName, in, out, opts...)
58 if err != nil {
59 return nil, err
60 }
61 return out, nil
62 }
63
64 // LfpSaleServiceServer is the server API for LfpSaleService service.
65 // All implementations should embed UnimplementedLfpSaleServiceServer
66 // for forward compatibility
67 type LfpSaleServiceServer interface {
68 // Inserts a `LfpSale` for the given merchant.
69 InsertLfpSale(context.Context, *InsertLfpSaleRequest) (*LfpSale, error)
70 }
71
72 // UnimplementedLfpSaleServiceServer should be embedded to have forward compatible implementations.
73 type UnimplementedLfpSaleServiceServer struct {
74 }
75
76 func (UnimplementedLfpSaleServiceServer) InsertLfpSale(context.Context, *InsertLfpSaleRequest) (*LfpSale, error) {
77 return nil, status.Errorf(codes.Unimplemented, "method InsertLfpSale not implemented")
78 }
79
80 // UnsafeLfpSaleServiceServer may be embedded to opt out of forward compatibility for this service.
81 // Use of this interface is not recommended, as added methods to LfpSaleServiceServer will
82 // result in compilation errors.
83 type UnsafeLfpSaleServiceServer interface {
84 mustEmbedUnimplementedLfpSaleServiceServer()
85 }
86
87 func RegisterLfpSaleServiceServer(s grpc.ServiceRegistrar, srv LfpSaleServiceServer) {
88 s.RegisterService(&LfpSaleService_ServiceDesc, srv)
89 }
90
91 func _LfpSaleService_InsertLfpSale_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
92 in := new(InsertLfpSaleRequest)
93 if err := dec(in); err != nil {
94 return nil, err
95 }
96 if interceptor == nil {
97 return srv.(LfpSaleServiceServer).InsertLfpSale(ctx, in)
98 }
99 info := &grpc.UnaryServerInfo{
100 Server: srv,
101 FullMethod: LfpSaleService_InsertLfpSale_FullMethodName,
102 }
103 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
104 return srv.(LfpSaleServiceServer).InsertLfpSale(ctx, req.(*InsertLfpSaleRequest))
105 }
106 return interceptor(ctx, in, info, handler)
107 }
108
109 // LfpSaleService_ServiceDesc is the grpc.ServiceDesc for LfpSaleService service.
110 // It's only intended for direct use with grpc.RegisterService,
111 // and not to be introspected or modified (even as a copy)
112 var LfpSaleService_ServiceDesc = grpc.ServiceDesc{
113 ServiceName: "google.shopping.merchant.lfp.v1beta.LfpSaleService",
114 HandlerType: (*LfpSaleServiceServer)(nil),
115 Methods: []grpc.MethodDesc{
116 {
117 MethodName: "InsertLfpSale",
118 Handler: _LfpSaleService_InsertLfpSale_Handler,
119 },
120 },
121 Streams: []grpc.StreamDesc{},
122 Metadata: "google/shopping/merchant/lfp/v1beta/lfpsale.proto",
123 }