Debian Codegraph @

shopping/merchant/inventories/apiv1beta/inventoriespb/regionalinventory_grpc.pb.go

raw symbols SCIP
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/inventories/v1beta/regionalinventory.proto
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 // This is a compile-time assertion to ensure that this generated file
32 // is compatible with the grpc package it is being compiled against.
33 // Requires gRPC-Go v1.32.0 or later.
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 // RegionalInventoryServiceClient is the client API for RegionalInventoryService service.
43 //
44 // 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.
45 type RegionalInventoryServiceClient interface {
46 // Lists the `RegionalInventory` resources for the given product in your
47 // merchant account. The response might contain fewer items than specified by
48 // `pageSize`. If `pageToken` was returned in previous request, it can be
49 // used to obtain additional results.
50 //
51 // `RegionalInventory` resources are listed per product for a given account.
52 ListRegionalInventories(ctx context.Context, in *ListRegionalInventoriesRequest, opts ...grpc.CallOption) (*ListRegionalInventoriesResponse, error)
53 // Inserts a `RegionalInventory` to a given product in your
54 // merchant account.
55 //
56 // Replaces the full `RegionalInventory` resource if an entry with the same
57 // [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region]
58 // already exists for the product.
59 //
60 // It might take up to 30 minutes for the new or updated `RegionalInventory`
61 // resource to appear in products.
62 InsertRegionalInventory(ctx context.Context, in *InsertRegionalInventoryRequest, opts ...grpc.CallOption) (*RegionalInventory, error)
63 // Deletes the specified `RegionalInventory` resource from the given product
64 // in your merchant account. It might take up to an hour for the
65 // `RegionalInventory` to be deleted from the specific product.
66 // Once you have received a successful delete response, wait for that
67 // period before attempting a delete again.
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 &regionalInventoryServiceClient{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 // RegionalInventoryServiceServer is the server API for RegionalInventoryService service.
107 // All implementations should embed UnimplementedRegionalInventoryServiceServer
108 // for forward compatibility
109 type RegionalInventoryServiceServer interface {
110 // Lists the `RegionalInventory` resources for the given product in your
111 // merchant account. The response might contain fewer items than specified by
112 // `pageSize`. If `pageToken` was returned in previous request, it can be
113 // used to obtain additional results.
114 //
115 // `RegionalInventory` resources are listed per product for a given account.
116 ListRegionalInventories(context.Context, *ListRegionalInventoriesRequest) (*ListRegionalInventoriesResponse, error)
117 // Inserts a `RegionalInventory` to a given product in your
118 // merchant account.
119 //
120 // Replaces the full `RegionalInventory` resource if an entry with the same
121 // [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region]
122 // already exists for the product.
123 //
124 // It might take up to 30 minutes for the new or updated `RegionalInventory`
125 // resource to appear in products.
126 InsertRegionalInventory(context.Context, *InsertRegionalInventoryRequest) (*RegionalInventory, error)
127 // Deletes the specified `RegionalInventory` resource from the given product
128 // in your merchant account. It might take up to an hour for the
129 // `RegionalInventory` to be deleted from the specific product.
130 // Once you have received a successful delete response, wait for that
131 // period before attempting a delete again.
132 DeleteRegionalInventory(context.Context, *DeleteRegionalInventoryRequest) (*emptypb.Empty, error)
133 }
134
135 // UnimplementedRegionalInventoryServiceServer should be embedded to have forward compatible implementations.
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 // UnsafeRegionalInventoryServiceServer may be embedded to opt out of forward compatibility for this service.
150 // Use of this interface is not recommended, as added methods to RegionalInventoryServiceServer will
151 // result in compilation errors.
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 // RegionalInventoryService_ServiceDesc is the grpc.ServiceDesc for RegionalInventoryService service.
215 // It's only intended for direct use with grpc.RegisterService,
216 // and not to be introspected or modified (even as a copy)
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 }