| 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 |
RegionalInventoryService_ListRegionalInventories_FullMethodName = "/google.shopping.merchant.inventories.v1beta.RegionalInventoryService/ListRegionalInventories" |
| 38 |
RegionalInventoryService_InsertRegionalInventory_FullMethodName = "/google.shopping.merchant.inventories.v1beta.RegionalInventoryService/InsertRegionalInventory" |
| 39 |
RegionalInventoryService_DeleteRegionalInventory_FullMethodName = "/google.shopping.merchant.inventories.v1beta.RegionalInventoryService/DeleteRegionalInventory" |
| 40 |
) |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
type RegionalInventoryServiceClient interface { |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
ListRegionalInventories(ctx context.Context, in *ListRegionalInventoriesRequest, opts ...grpc.CallOption) (*ListRegionalInventoriesResponse, error) |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
InsertRegionalInventory(ctx context.Context, in *InsertRegionalInventoryRequest, opts ...grpc.CallOption) (*RegionalInventory, error) |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
DeleteRegionalInventory(ctx context.Context, in *DeleteRegionalInventoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 69 |
} |
| 70 |
|
| 71 |
type regionalInventoryServiceClient struct { |
| 72 |
cc grpc.ClientConnInterface |
| 73 |
} |
| 74 |
|
| 75 |
func NewRegionalInventoryServiceClient(cc grpc.ClientConnInterface) RegionalInventoryServiceClient { |
| 76 |
return ®ionalInventoryServiceClient{cc} |
| 77 |
} |
| 78 |
|
| 79 |
func (c *regionalInventoryServiceClient) ListRegionalInventories(ctx context.Context, in *ListRegionalInventoriesRequest, opts ...grpc.CallOption) (*ListRegionalInventoriesResponse, error) { |
| 80 |
out := new(ListRegionalInventoriesResponse) |
| 81 |
err := c.cc.Invoke(ctx, RegionalInventoryService_ListRegionalInventories_FullMethodName, in, out, opts...) |
| 82 |
if err != nil { |
| 83 |
return nil, err |
| 84 |
} |
| 85 |
return out, nil |
| 86 |
} |
| 87 |
|
| 88 |
func (c *regionalInventoryServiceClient) InsertRegionalInventory(ctx context.Context, in *InsertRegionalInventoryRequest, opts ...grpc.CallOption) (*RegionalInventory, error) { |
| 89 |
out := new(RegionalInventory) |
| 90 |
err := c.cc.Invoke(ctx, RegionalInventoryService_InsertRegionalInventory_FullMethodName, in, out, opts...) |
| 91 |
if err != nil { |
| 92 |
return nil, err |
| 93 |
} |
| 94 |
return out, nil |
| 95 |
} |
| 96 |
|
| 97 |
func (c *regionalInventoryServiceClient) DeleteRegionalInventory(ctx context.Context, in *DeleteRegionalInventoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 98 |
out := new(emptypb.Empty) |
| 99 |
err := c.cc.Invoke(ctx, RegionalInventoryService_DeleteRegionalInventory_FullMethodName, in, out, opts...) |
| 100 |
if err != nil { |
| 101 |
return nil, err |
| 102 |
} |
| 103 |
return out, nil |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
type RegionalInventoryServiceServer interface { |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
ListRegionalInventories(context.Context, *ListRegionalInventoriesRequest) (*ListRegionalInventoriesResponse, error) |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
InsertRegionalInventory(context.Context, *InsertRegionalInventoryRequest) (*RegionalInventory, error) |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
DeleteRegionalInventory(context.Context, *DeleteRegionalInventoryRequest) (*emptypb.Empty, error) |
| 133 |
} |
| 134 |
|
| 135 |
|
| 136 |
type UnimplementedRegionalInventoryServiceServer struct { |
| 137 |
} |
| 138 |
|
| 139 |
func (UnimplementedRegionalInventoryServiceServer) ListRegionalInventories(context.Context, *ListRegionalInventoriesRequest) (*ListRegionalInventoriesResponse, error) { |
| 140 |
return nil, status.Errorf(codes.Unimplemented, "method ListRegionalInventories not implemented") |
| 141 |
} |
| 142 |
func (UnimplementedRegionalInventoryServiceServer) InsertRegionalInventory(context.Context, *InsertRegionalInventoryRequest) (*RegionalInventory, error) { |
| 143 |
return nil, status.Errorf(codes.Unimplemented, "method InsertRegionalInventory not implemented") |
| 144 |
} |
| 145 |
func (UnimplementedRegionalInventoryServiceServer) DeleteRegionalInventory(context.Context, *DeleteRegionalInventoryRequest) (*emptypb.Empty, error) { |
| 146 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteRegionalInventory not implemented") |
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
type UnsafeRegionalInventoryServiceServer interface { |
| 153 |
mustEmbedUnimplementedRegionalInventoryServiceServer() |
| 154 |
} |
| 155 |
|
| 156 |
func RegisterRegionalInventoryServiceServer(s grpc.ServiceRegistrar, srv RegionalInventoryServiceServer) { |
| 157 |
s.RegisterService(&RegionalInventoryService_ServiceDesc, srv) |
| 158 |
} |
| 159 |
|
| 160 |
func _RegionalInventoryService_ListRegionalInventories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 161 |
in := new(ListRegionalInventoriesRequest) |
| 162 |
if err := dec(in); err != nil { |
| 163 |
return nil, err |
| 164 |
} |
| 165 |
if interceptor == nil { |
| 166 |
return srv.(RegionalInventoryServiceServer).ListRegionalInventories(ctx, in) |
| 167 |
} |
| 168 |
info := &grpc.UnaryServerInfo{ |
| 169 |
Server: srv, |
| 170 |
FullMethod: RegionalInventoryService_ListRegionalInventories_FullMethodName, |
| 171 |
} |
| 172 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 173 |
return srv.(RegionalInventoryServiceServer).ListRegionalInventories(ctx, req.(*ListRegionalInventoriesRequest)) |
| 174 |
} |
| 175 |
return interceptor(ctx, in, info, handler) |
| 176 |
} |
| 177 |
|
| 178 |
func _RegionalInventoryService_InsertRegionalInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 179 |
in := new(InsertRegionalInventoryRequest) |
| 180 |
if err := dec(in); err != nil { |
| 181 |
return nil, err |
| 182 |
} |
| 183 |
if interceptor == nil { |
| 184 |
return srv.(RegionalInventoryServiceServer).InsertRegionalInventory(ctx, in) |
| 185 |
} |
| 186 |
info := &grpc.UnaryServerInfo{ |
| 187 |
Server: srv, |
| 188 |
FullMethod: RegionalInventoryService_InsertRegionalInventory_FullMethodName, |
| 189 |
} |
| 190 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 191 |
return srv.(RegionalInventoryServiceServer).InsertRegionalInventory(ctx, req.(*InsertRegionalInventoryRequest)) |
| 192 |
} |
| 193 |
return interceptor(ctx, in, info, handler) |
| 194 |
} |
| 195 |
|
| 196 |
func _RegionalInventoryService_DeleteRegionalInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 197 |
in := new(DeleteRegionalInventoryRequest) |
| 198 |
if err := dec(in); err != nil { |
| 199 |
return nil, err |
| 200 |
} |
| 201 |
if interceptor == nil { |
| 202 |
return srv.(RegionalInventoryServiceServer).DeleteRegionalInventory(ctx, in) |
| 203 |
} |
| 204 |
info := &grpc.UnaryServerInfo{ |
| 205 |
Server: srv, |
| 206 |
FullMethod: RegionalInventoryService_DeleteRegionalInventory_FullMethodName, |
| 207 |
} |
| 208 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 209 |
return srv.(RegionalInventoryServiceServer).DeleteRegionalInventory(ctx, req.(*DeleteRegionalInventoryRequest)) |
| 210 |
} |
| 211 |
return interceptor(ctx, in, info, handler) |
| 212 |
} |
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
var RegionalInventoryService_ServiceDesc = grpc.ServiceDesc{ |
| 218 |
ServiceName: "google.shopping.merchant.inventories.v1beta.RegionalInventoryService", |
| 219 |
HandlerType: (*RegionalInventoryServiceServer)(nil), |
| 220 |
Methods: []grpc.MethodDesc{ |
| 221 |
{ |
| 222 |
MethodName: "ListRegionalInventories", |
| 223 |
Handler: _RegionalInventoryService_ListRegionalInventories_Handler, |
| 224 |
}, |
| 225 |
{ |
| 226 |
MethodName: "InsertRegionalInventory", |
| 227 |
Handler: _RegionalInventoryService_InsertRegionalInventory_Handler, |
| 228 |
}, |
| 229 |
{ |
| 230 |
MethodName: "DeleteRegionalInventory", |
| 231 |
Handler: _RegionalInventoryService_DeleteRegionalInventory_Handler, |
| 232 |
}, |
| 233 |
}, |
| 234 |
Streams: []grpc.StreamDesc{}, |
| 235 |
Metadata: "google/shopping/merchant/inventories/v1beta/regionalinventory.proto", |
| 236 |
} |