| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
package inventoriespb |
| 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 |
emptypb "google.golang.org/protobuf/types/known/emptypb" |
| 29 |
) |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
const _ = grpc.SupportPackageIsVersion7 |
| 35 |
|
| 36 |
const ( |
| 37 |
LocalInventoryService_ListLocalInventories_FullMethodName = "/google.shopping.merchant.inventories.v1beta.LocalInventoryService/ListLocalInventories" |
| 38 |
LocalInventoryService_InsertLocalInventory_FullMethodName = "/google.shopping.merchant.inventories.v1beta.LocalInventoryService/InsertLocalInventory" |
| 39 |
LocalInventoryService_DeleteLocalInventory_FullMethodName = "/google.shopping.merchant.inventories.v1beta.LocalInventoryService/DeleteLocalInventory" |
| 40 |
) |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
type LocalInventoryServiceClient interface { |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
ListLocalInventories(ctx context.Context, in *ListLocalInventoriesRequest, opts ...grpc.CallOption) (*ListLocalInventoriesResponse, error) |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
InsertLocalInventory(ctx context.Context, in *InsertLocalInventoryRequest, opts ...grpc.CallOption) (*LocalInventory, error) |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
DeleteLocalInventory(ctx context.Context, in *DeleteLocalInventoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 69 |
} |
| 70 |
|
| 71 |
type localInventoryServiceClient struct { |
| 72 |
cc grpc.ClientConnInterface |
| 73 |
} |
| 74 |
|
| 75 |
func NewLocalInventoryServiceClient(cc grpc.ClientConnInterface) LocalInventoryServiceClient { |
| 76 |
return &localInventoryServiceClient{cc} |
| 77 |
} |
| 78 |
|
| 79 |
func (c *localInventoryServiceClient) ListLocalInventories(ctx context.Context, in *ListLocalInventoriesRequest, opts ...grpc.CallOption) (*ListLocalInventoriesResponse, error) { |
| 80 |
out := new(ListLocalInventoriesResponse) |
| 81 |
err := c.cc.Invoke(ctx, LocalInventoryService_ListLocalInventories_FullMethodName, in, out, opts...) |
| 82 |
if err != nil { |
| 83 |
return nil, err |
| 84 |
} |
| 85 |
return out, nil |
| 86 |
} |
| 87 |
|
| 88 |
func (c *localInventoryServiceClient) InsertLocalInventory(ctx context.Context, in *InsertLocalInventoryRequest, opts ...grpc.CallOption) (*LocalInventory, error) { |
| 89 |
out := new(LocalInventory) |
| 90 |
err := c.cc.Invoke(ctx, LocalInventoryService_InsertLocalInventory_FullMethodName, in, out, opts...) |
| 91 |
if err != nil { |
| 92 |
return nil, err |
| 93 |
} |
| 94 |
return out, nil |
| 95 |
} |
| 96 |
|
| 97 |
func (c *localInventoryServiceClient) DeleteLocalInventory(ctx context.Context, in *DeleteLocalInventoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 98 |
out := new(emptypb.Empty) |
| 99 |
err := c.cc.Invoke(ctx, LocalInventoryService_DeleteLocalInventory_FullMethodName, in, out, opts...) |
| 100 |
if err != nil { |
| 101 |
return nil, err |
| 102 |
} |
| 103 |
return out, nil |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
type LocalInventoryServiceServer interface { |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
ListLocalInventories(context.Context, *ListLocalInventoriesRequest) (*ListLocalInventoriesResponse, error) |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
InsertLocalInventory(context.Context, *InsertLocalInventoryRequest) (*LocalInventory, error) |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
DeleteLocalInventory(context.Context, *DeleteLocalInventoryRequest) (*emptypb.Empty, error) |
| 133 |
} |
| 134 |
|
| 135 |
|
| 136 |
type UnimplementedLocalInventoryServiceServer struct { |
| 137 |
} |
| 138 |
|
| 139 |
func (UnimplementedLocalInventoryServiceServer) ListLocalInventories(context.Context, *ListLocalInventoriesRequest) (*ListLocalInventoriesResponse, error) { |
| 140 |
return nil, status.Errorf(codes.Unimplemented, "method ListLocalInventories not implemented") |
| 141 |
} |
| 142 |
func (UnimplementedLocalInventoryServiceServer) InsertLocalInventory(context.Context, *InsertLocalInventoryRequest) (*LocalInventory, error) { |
| 143 |
return nil, status.Errorf(codes.Unimplemented, "method InsertLocalInventory not implemented") |
| 144 |
} |
| 145 |
func (UnimplementedLocalInventoryServiceServer) DeleteLocalInventory(context.Context, *DeleteLocalInventoryRequest) (*emptypb.Empty, error) { |
| 146 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteLocalInventory not implemented") |
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
type UnsafeLocalInventoryServiceServer interface { |
| 153 |
mustEmbedUnimplementedLocalInventoryServiceServer() |
| 154 |
} |
| 155 |
|
| 156 |
func RegisterLocalInventoryServiceServer(s grpc.ServiceRegistrar, srv LocalInventoryServiceServer) { |
| 157 |
s.RegisterService(&LocalInventoryService_ServiceDesc, srv) |
| 158 |
} |
| 159 |
|
| 160 |
func _LocalInventoryService_ListLocalInventories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 161 |
in := new(ListLocalInventoriesRequest) |
| 162 |
if err := dec(in); err != nil { |
| 163 |
return nil, err |
| 164 |
} |
| 165 |
if interceptor == nil { |
| 166 |
return srv.(LocalInventoryServiceServer).ListLocalInventories(ctx, in) |
| 167 |
} |
| 168 |
info := &grpc.UnaryServerInfo{ |
| 169 |
Server: srv, |
| 170 |
FullMethod: LocalInventoryService_ListLocalInventories_FullMethodName, |
| 171 |
} |
| 172 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 173 |
return srv.(LocalInventoryServiceServer).ListLocalInventories(ctx, req.(*ListLocalInventoriesRequest)) |
| 174 |
} |
| 175 |
return interceptor(ctx, in, info, handler) |
| 176 |
} |
| 177 |
|
| 178 |
func _LocalInventoryService_InsertLocalInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 179 |
in := new(InsertLocalInventoryRequest) |
| 180 |
if err := dec(in); err != nil { |
| 181 |
return nil, err |
| 182 |
} |
| 183 |
if interceptor == nil { |
| 184 |
return srv.(LocalInventoryServiceServer).InsertLocalInventory(ctx, in) |
| 185 |
} |
| 186 |
info := &grpc.UnaryServerInfo{ |
| 187 |
Server: srv, |
| 188 |
FullMethod: LocalInventoryService_InsertLocalInventory_FullMethodName, |
| 189 |
} |
| 190 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 191 |
return srv.(LocalInventoryServiceServer).InsertLocalInventory(ctx, req.(*InsertLocalInventoryRequest)) |
| 192 |
} |
| 193 |
return interceptor(ctx, in, info, handler) |
| 194 |
} |
| 195 |
|
| 196 |
func _LocalInventoryService_DeleteLocalInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 197 |
in := new(DeleteLocalInventoryRequest) |
| 198 |
if err := dec(in); err != nil { |
| 199 |
return nil, err |
| 200 |
} |
| 201 |
if interceptor == nil { |
| 202 |
return srv.(LocalInventoryServiceServer).DeleteLocalInventory(ctx, in) |
| 203 |
} |
| 204 |
info := &grpc.UnaryServerInfo{ |
| 205 |
Server: srv, |
| 206 |
FullMethod: LocalInventoryService_DeleteLocalInventory_FullMethodName, |
| 207 |
} |
| 208 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 209 |
return srv.(LocalInventoryServiceServer).DeleteLocalInventory(ctx, req.(*DeleteLocalInventoryRequest)) |
| 210 |
} |
| 211 |
return interceptor(ctx, in, info, handler) |
| 212 |
} |
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
var LocalInventoryService_ServiceDesc = grpc.ServiceDesc{ |
| 218 |
ServiceName: "google.shopping.merchant.inventories.v1beta.LocalInventoryService", |
| 219 |
HandlerType: (*LocalInventoryServiceServer)(nil), |
| 220 |
Methods: []grpc.MethodDesc{ |
| 221 |
{ |
| 222 |
MethodName: "ListLocalInventories", |
| 223 |
Handler: _LocalInventoryService_ListLocalInventories_Handler, |
| 224 |
}, |
| 225 |
{ |
| 226 |
MethodName: "InsertLocalInventory", |
| 227 |
Handler: _LocalInventoryService_InsertLocalInventory_Handler, |
| 228 |
}, |
| 229 |
{ |
| 230 |
MethodName: "DeleteLocalInventory", |
| 231 |
Handler: _LocalInventoryService_DeleteLocalInventory_Handler, |
| 232 |
}, |
| 233 |
}, |
| 234 |
Streams: []grpc.StreamDesc{}, |
| 235 |
Metadata: "google/shopping/merchant/inventories/v1beta/localinventory.proto", |
| 236 |
} |