Debian Codegraph @

shopping/merchant/datasources/apiv1beta/datasourcespb/datasources_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/datasources/v1beta/datasources.proto
20
21 package datasourcespb
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 DataSourcesService_GetDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/GetDataSource"
38 DataSourcesService_ListDataSources_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/ListDataSources"
39 DataSourcesService_CreateDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/CreateDataSource"
40 DataSourcesService_UpdateDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/UpdateDataSource"
41 DataSourcesService_DeleteDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/DeleteDataSource"
42 DataSourcesService_FetchDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/FetchDataSource"
43 )
44
45 // DataSourcesServiceClient is the client API for DataSourcesService service.
46 //
47 // 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.
48 type DataSourcesServiceClient interface {
49 // Retrieves the data source configuration for the given account.
50 GetDataSource(ctx context.Context, in *GetDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error)
51 // Lists the configurations for data sources for the given account.
52 ListDataSources(ctx context.Context, in *ListDataSourcesRequest, opts ...grpc.CallOption) (*ListDataSourcesResponse, error)
53 // Creates the new data source configuration for the given account.
54 CreateDataSource(ctx context.Context, in *CreateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error)
55 // Updates the existing data source configuration. The fields that are
56 // set in the update mask but not provided in the resource will be deleted.
57 UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error)
58 // Deletes a data source from your Merchant Center account.
59 DeleteDataSource(ctx context.Context, in *DeleteDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
60 // Performs the data fetch immediately (even outside fetch schedule) on a
61 // data source from your Merchant Center Account. If you need to call
62 // this method more than once per day, you should use the Products service to
63 // update your product data instead.
64 // This method only works on data sources with a file input set.
65 FetchDataSource(ctx context.Context, in *FetchDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
66 }
67
68 type dataSourcesServiceClient struct {
69 cc grpc.ClientConnInterface
70 }
71
72 func NewDataSourcesServiceClient(cc grpc.ClientConnInterface) DataSourcesServiceClient {
73 return &dataSourcesServiceClient{cc}
74 }
75
76 func (c *dataSourcesServiceClient) GetDataSource(ctx context.Context, in *GetDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) {
77 out := new(DataSource)
78 err := c.cc.Invoke(ctx, DataSourcesService_GetDataSource_FullMethodName, in, out, opts...)
79 if err != nil {
80 return nil, err
81 }
82 return out, nil
83 }
84
85 func (c *dataSourcesServiceClient) ListDataSources(ctx context.Context, in *ListDataSourcesRequest, opts ...grpc.CallOption) (*ListDataSourcesResponse, error) {
86 out := new(ListDataSourcesResponse)
87 err := c.cc.Invoke(ctx, DataSourcesService_ListDataSources_FullMethodName, in, out, opts...)
88 if err != nil {
89 return nil, err
90 }
91 return out, nil
92 }
93
94 func (c *dataSourcesServiceClient) CreateDataSource(ctx context.Context, in *CreateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) {
95 out := new(DataSource)
96 err := c.cc.Invoke(ctx, DataSourcesService_CreateDataSource_FullMethodName, in, out, opts...)
97 if err != nil {
98 return nil, err
99 }
100 return out, nil
101 }
102
103 func (c *dataSourcesServiceClient) UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) {
104 out := new(DataSource)
105 err := c.cc.Invoke(ctx, DataSourcesService_UpdateDataSource_FullMethodName, in, out, opts...)
106 if err != nil {
107 return nil, err
108 }
109 return out, nil
110 }
111
112 func (c *dataSourcesServiceClient) DeleteDataSource(ctx context.Context, in *DeleteDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
113 out := new(emptypb.Empty)
114 err := c.cc.Invoke(ctx, DataSourcesService_DeleteDataSource_FullMethodName, in, out, opts...)
115 if err != nil {
116 return nil, err
117 }
118 return out, nil
119 }
120
121 func (c *dataSourcesServiceClient) FetchDataSource(ctx context.Context, in *FetchDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
122 out := new(emptypb.Empty)
123 err := c.cc.Invoke(ctx, DataSourcesService_FetchDataSource_FullMethodName, in, out, opts...)
124 if err != nil {
125 return nil, err
126 }
127 return out, nil
128 }
129
130 // DataSourcesServiceServer is the server API for DataSourcesService service.
131 // All implementations should embed UnimplementedDataSourcesServiceServer
132 // for forward compatibility
133 type DataSourcesServiceServer interface {
134 // Retrieves the data source configuration for the given account.
135 GetDataSource(context.Context, *GetDataSourceRequest) (*DataSource, error)
136 // Lists the configurations for data sources for the given account.
137 ListDataSources(context.Context, *ListDataSourcesRequest) (*ListDataSourcesResponse, error)
138 // Creates the new data source configuration for the given account.
139 CreateDataSource(context.Context, *CreateDataSourceRequest) (*DataSource, error)
140 // Updates the existing data source configuration. The fields that are
141 // set in the update mask but not provided in the resource will be deleted.
142 UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*DataSource, error)
143 // Deletes a data source from your Merchant Center account.
144 DeleteDataSource(context.Context, *DeleteDataSourceRequest) (*emptypb.Empty, error)
145 // Performs the data fetch immediately (even outside fetch schedule) on a
146 // data source from your Merchant Center Account. If you need to call
147 // this method more than once per day, you should use the Products service to
148 // update your product data instead.
149 // This method only works on data sources with a file input set.
150 FetchDataSource(context.Context, *FetchDataSourceRequest) (*emptypb.Empty, error)
151 }
152
153 // UnimplementedDataSourcesServiceServer should be embedded to have forward compatible implementations.
154 type UnimplementedDataSourcesServiceServer struct {
155 }
156
157 func (UnimplementedDataSourcesServiceServer) GetDataSource(context.Context, *GetDataSourceRequest) (*DataSource, error) {
158 return nil, status.Errorf(codes.Unimplemented, "method GetDataSource not implemented")
159 }
160 func (UnimplementedDataSourcesServiceServer) ListDataSources(context.Context, *ListDataSourcesRequest) (*ListDataSourcesResponse, error) {
161 return nil, status.Errorf(codes.Unimplemented, "method ListDataSources not implemented")
162 }
163 func (UnimplementedDataSourcesServiceServer) CreateDataSource(context.Context, *CreateDataSourceRequest) (*DataSource, error) {
164 return nil, status.Errorf(codes.Unimplemented, "method CreateDataSource not implemented")
165 }
166 func (UnimplementedDataSourcesServiceServer) UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*DataSource, error) {
167 return nil, status.Errorf(codes.Unimplemented, "method UpdateDataSource not implemented")
168 }
169 func (UnimplementedDataSourcesServiceServer) DeleteDataSource(context.Context, *DeleteDataSourceRequest) (*emptypb.Empty, error) {
170 return nil, status.Errorf(codes.Unimplemented, "method DeleteDataSource not implemented")
171 }
172 func (UnimplementedDataSourcesServiceServer) FetchDataSource(context.Context, *FetchDataSourceRequest) (*emptypb.Empty, error) {
173 return nil, status.Errorf(codes.Unimplemented, "method FetchDataSource not implemented")
174 }
175
176 // UnsafeDataSourcesServiceServer may be embedded to opt out of forward compatibility for this service.
177 // Use of this interface is not recommended, as added methods to DataSourcesServiceServer will
178 // result in compilation errors.
179 type UnsafeDataSourcesServiceServer interface {
180 mustEmbedUnimplementedDataSourcesServiceServer()
181 }
182
183 func RegisterDataSourcesServiceServer(s grpc.ServiceRegistrar, srv DataSourcesServiceServer) {
184 s.RegisterService(&DataSourcesService_ServiceDesc, srv)
185 }
186
187 func _DataSourcesService_GetDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
188 in := new(GetDataSourceRequest)
189 if err := dec(in); err != nil {
190 return nil, err
191 }
192 if interceptor == nil {
193 return srv.(DataSourcesServiceServer).GetDataSource(ctx, in)
194 }
195 info := &grpc.UnaryServerInfo{
196 Server: srv,
197 FullMethod: DataSourcesService_GetDataSource_FullMethodName,
198 }
199 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
200 return srv.(DataSourcesServiceServer).GetDataSource(ctx, req.(*GetDataSourceRequest))
201 }
202 return interceptor(ctx, in, info, handler)
203 }
204
205 func _DataSourcesService_ListDataSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
206 in := new(ListDataSourcesRequest)
207 if err := dec(in); err != nil {
208 return nil, err
209 }
210 if interceptor == nil {
211 return srv.(DataSourcesServiceServer).ListDataSources(ctx, in)
212 }
213 info := &grpc.UnaryServerInfo{
214 Server: srv,
215 FullMethod: DataSourcesService_ListDataSources_FullMethodName,
216 }
217 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
218 return srv.(DataSourcesServiceServer).ListDataSources(ctx, req.(*ListDataSourcesRequest))
219 }
220 return interceptor(ctx, in, info, handler)
221 }
222
223 func _DataSourcesService_CreateDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
224 in := new(CreateDataSourceRequest)
225 if err := dec(in); err != nil {
226 return nil, err
227 }
228 if interceptor == nil {
229 return srv.(DataSourcesServiceServer).CreateDataSource(ctx, in)
230 }
231 info := &grpc.UnaryServerInfo{
232 Server: srv,
233 FullMethod: DataSourcesService_CreateDataSource_FullMethodName,
234 }
235 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
236 return srv.(DataSourcesServiceServer).CreateDataSource(ctx, req.(*CreateDataSourceRequest))
237 }
238 return interceptor(ctx, in, info, handler)
239 }
240
241 func _DataSourcesService_UpdateDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
242 in := new(UpdateDataSourceRequest)
243 if err := dec(in); err != nil {
244 return nil, err
245 }
246 if interceptor == nil {
247 return srv.(DataSourcesServiceServer).UpdateDataSource(ctx, in)
248 }
249 info := &grpc.UnaryServerInfo{
250 Server: srv,
251 FullMethod: DataSourcesService_UpdateDataSource_FullMethodName,
252 }
253 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
254 return srv.(DataSourcesServiceServer).UpdateDataSource(ctx, req.(*UpdateDataSourceRequest))
255 }
256 return interceptor(ctx, in, info, handler)
257 }
258
259 func _DataSourcesService_DeleteDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
260 in := new(DeleteDataSourceRequest)
261 if err := dec(in); err != nil {
262 return nil, err
263 }
264 if interceptor == nil {
265 return srv.(DataSourcesServiceServer).DeleteDataSource(ctx, in)
266 }
267 info := &grpc.UnaryServerInfo{
268 Server: srv,
269 FullMethod: DataSourcesService_DeleteDataSource_FullMethodName,
270 }
271 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
272 return srv.(DataSourcesServiceServer).DeleteDataSource(ctx, req.(*DeleteDataSourceRequest))
273 }
274 return interceptor(ctx, in, info, handler)
275 }
276
277 func _DataSourcesService_FetchDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
278 in := new(FetchDataSourceRequest)
279 if err := dec(in); err != nil {
280 return nil, err
281 }
282 if interceptor == nil {
283 return srv.(DataSourcesServiceServer).FetchDataSource(ctx, in)
284 }
285 info := &grpc.UnaryServerInfo{
286 Server: srv,
287 FullMethod: DataSourcesService_FetchDataSource_FullMethodName,
288 }
289 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
290 return srv.(DataSourcesServiceServer).FetchDataSource(ctx, req.(*FetchDataSourceRequest))
291 }
292 return interceptor(ctx, in, info, handler)
293 }
294
295 // DataSourcesService_ServiceDesc is the grpc.ServiceDesc for DataSourcesService service.
296 // It's only intended for direct use with grpc.RegisterService,
297 // and not to be introspected or modified (even as a copy)
298 var DataSourcesService_ServiceDesc = grpc.ServiceDesc{
299 ServiceName: "google.shopping.merchant.datasources.v1beta.DataSourcesService",
300 HandlerType: (*DataSourcesServiceServer)(nil),
301 Methods: []grpc.MethodDesc{
302 {
303 MethodName: "GetDataSource",
304 Handler: _DataSourcesService_GetDataSource_Handler,
305 },
306 {
307 MethodName: "ListDataSources",
308 Handler: _DataSourcesService_ListDataSources_Handler,
309 },
310 {
311 MethodName: "CreateDataSource",
312 Handler: _DataSourcesService_CreateDataSource_Handler,
313 },
314 {
315 MethodName: "UpdateDataSource",
316 Handler: _DataSourcesService_UpdateDataSource_Handler,
317 },
318 {
319 MethodName: "DeleteDataSource",
320 Handler: _DataSourcesService_DeleteDataSource_Handler,
321 },
322 {
323 MethodName: "FetchDataSource",
324 Handler: _DataSourcesService_FetchDataSource_Handler,
325 },
326 },
327 Streams: []grpc.StreamDesc{},
328 Metadata: "google/shopping/merchant/datasources/v1beta/datasources.proto",
329 }