| 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/lfpinventory.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 |
LfpInventoryService_InsertLfpInventory_FullMethodName = "/google.shopping.merchant.lfp.v1beta.LfpInventoryService/InsertLfpInventory" |
| 37 |
) |
| 38 |
|
| 39 |
// LfpInventoryServiceClient is the client API for LfpInventoryService 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 LfpInventoryServiceClient interface { |
| 43 |
// Inserts a `LfpInventory` resource for the given target merchant account. If |
| 44 |
// the resource already exists, it will be replaced. The inventory |
| 45 |
// automatically expires after 30 days. |
| 46 |
InsertLfpInventory(ctx context.Context, in *InsertLfpInventoryRequest, opts ...grpc.CallOption) (*LfpInventory, error) |
| 47 |
} |
| 48 |
|
| 49 |
type lfpInventoryServiceClient struct { |
| 50 |
cc grpc.ClientConnInterface |
| 51 |
} |
| 52 |
|
| 53 |
func NewLfpInventoryServiceClient(cc grpc.ClientConnInterface) LfpInventoryServiceClient { |
| 54 |
return &lfpInventoryServiceClient{cc} |
| 55 |
} |
| 56 |
|
| 57 |
func (c *lfpInventoryServiceClient) InsertLfpInventory(ctx context.Context, in *InsertLfpInventoryRequest, opts ...grpc.CallOption) (*LfpInventory, error) { |
| 58 |
out := new(LfpInventory) |
| 59 |
err := c.cc.Invoke(ctx, LfpInventoryService_InsertLfpInventory_FullMethodName, in, out, opts...) |
| 60 |
if err != nil { |
| 61 |
return nil, err |
| 62 |
} |
| 63 |
return out, nil |
| 64 |
} |
| 65 |
|
| 66 |
// LfpInventoryServiceServer is the server API for LfpInventoryService service. |
| 67 |
// All implementations should embed UnimplementedLfpInventoryServiceServer |
| 68 |
// for forward compatibility |
| 69 |
type LfpInventoryServiceServer interface { |
| 70 |
// Inserts a `LfpInventory` resource for the given target merchant account. If |
| 71 |
// the resource already exists, it will be replaced. The inventory |
| 72 |
// automatically expires after 30 days. |
| 73 |
InsertLfpInventory(context.Context, *InsertLfpInventoryRequest) (*LfpInventory, error) |
| 74 |
} |
| 75 |
|
| 76 |
// UnimplementedLfpInventoryServiceServer should be embedded to have forward compatible implementations. |
| 77 |
type UnimplementedLfpInventoryServiceServer struct { |
| 78 |
} |
| 79 |
|
| 80 |
func (UnimplementedLfpInventoryServiceServer) InsertLfpInventory(context.Context, *InsertLfpInventoryRequest) (*LfpInventory, error) { |
| 81 |
return nil, status.Errorf(codes.Unimplemented, "method InsertLfpInventory not implemented") |
| 82 |
} |
| 83 |
|
| 84 |
// UnsafeLfpInventoryServiceServer may be embedded to opt out of forward compatibility for this service. |
| 85 |
// Use of this interface is not recommended, as added methods to LfpInventoryServiceServer will |
| 86 |
// result in compilation errors. |
| 87 |
type UnsafeLfpInventoryServiceServer interface { |
| 88 |
mustEmbedUnimplementedLfpInventoryServiceServer() |
| 89 |
} |
| 90 |
|
| 91 |
func RegisterLfpInventoryServiceServer(s grpc.ServiceRegistrar, srv LfpInventoryServiceServer) { |
| 92 |
s.RegisterService(&LfpInventoryService_ServiceDesc, srv) |
| 93 |
} |
| 94 |
|
| 95 |
func _LfpInventoryService_InsertLfpInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 96 |
in := new(InsertLfpInventoryRequest) |
| 97 |
if err := dec(in); err != nil { |
| 98 |
return nil, err |
| 99 |
} |
| 100 |
if interceptor == nil { |
| 101 |
return srv.(LfpInventoryServiceServer).InsertLfpInventory(ctx, in) |
| 102 |
} |
| 103 |
info := &grpc.UnaryServerInfo{ |
| 104 |
Server: srv, |
| 105 |
FullMethod: LfpInventoryService_InsertLfpInventory_FullMethodName, |
| 106 |
} |
| 107 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 108 |
return srv.(LfpInventoryServiceServer).InsertLfpInventory(ctx, req.(*InsertLfpInventoryRequest)) |
| 109 |
} |
| 110 |
return interceptor(ctx, in, info, handler) |
| 111 |
} |
| 112 |
|
| 113 |
// LfpInventoryService_ServiceDesc is the grpc.ServiceDesc for LfpInventoryService service. |
| 114 |
// It's only intended for direct use with grpc.RegisterService, |
| 115 |
// and not to be introspected or modified (even as a copy) |
| 116 |
var LfpInventoryService_ServiceDesc = grpc.ServiceDesc{ |
| 117 |
ServiceName: "google.shopping.merchant.lfp.v1beta.LfpInventoryService", |
| 118 |
HandlerType: (*LfpInventoryServiceServer)(nil), |
| 119 |
Methods: []grpc.MethodDesc{ |
| 120 |
{ |
| 121 |
MethodName: "InsertLfpInventory", |
| 122 |
Handler: _LfpInventoryService_InsertLfpInventory_Handler, |
| 123 |
}, |
| 124 |
}, |
| 125 |
Streams: []grpc.StreamDesc{}, |
| 126 |
Metadata: "google/shopping/merchant/lfp/v1beta/lfpinventory.proto", |
| 127 |
} |