Debian Codegraph @

shopping/merchant/conversions/apiv1beta/conversionspb/conversionsources_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/conversions/v1beta/conversionsources.proto
20
21 package conversionspb
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 ConversionSourcesService_CreateConversionSource_FullMethodName = "/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/CreateConversionSource"
38 ConversionSourcesService_UpdateConversionSource_FullMethodName = "/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/UpdateConversionSource"
39 ConversionSourcesService_DeleteConversionSource_FullMethodName = "/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/DeleteConversionSource"
40 ConversionSourcesService_UndeleteConversionSource_FullMethodName = "/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/UndeleteConversionSource"
41 ConversionSourcesService_GetConversionSource_FullMethodName = "/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/GetConversionSource"
42 ConversionSourcesService_ListConversionSources_FullMethodName = "/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/ListConversionSources"
43 )
44
45 // ConversionSourcesServiceClient is the client API for ConversionSourcesService 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 ConversionSourcesServiceClient interface {
49 // Creates a new conversion source.
50 CreateConversionSource(ctx context.Context, in *CreateConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error)
51 // Updates information of an existing conversion source. Available only for
52 // Merchant Center Destination conversion sources.
53 UpdateConversionSource(ctx context.Context, in *UpdateConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error)
54 // Archives an existing conversion source. If the conversion source is a
55 // Merchant Center Destination, it will be recoverable for 30 days. If the
56 // conversion source is a Google Analytics Link, it will be deleted
57 // immediately and can be restored by creating a new one.
58 DeleteConversionSource(ctx context.Context, in *DeleteConversionSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
59 // Re-enables an archived conversion source. Only Available for Merchant
60 // Center Destination conversion sources.
61 UndeleteConversionSource(ctx context.Context, in *UndeleteConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error)
62 // Fetches a conversion source.
63 GetConversionSource(ctx context.Context, in *GetConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error)
64 // Retrieves the list of conversion sources the caller has access to.
65 ListConversionSources(ctx context.Context, in *ListConversionSourcesRequest, opts ...grpc.CallOption) (*ListConversionSourcesResponse, error)
66 }
67
68 type conversionSourcesServiceClient struct {
69 cc grpc.ClientConnInterface
70 }
71
72 func NewConversionSourcesServiceClient(cc grpc.ClientConnInterface) ConversionSourcesServiceClient {
73 return &conversionSourcesServiceClient{cc}
74 }
75
76 func (c *conversionSourcesServiceClient) CreateConversionSource(ctx context.Context, in *CreateConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error) {
77 out := new(ConversionSource)
78 err := c.cc.Invoke(ctx, ConversionSourcesService_CreateConversionSource_FullMethodName, in, out, opts...)
79 if err != nil {
80 return nil, err
81 }
82 return out, nil
83 }
84
85 func (c *conversionSourcesServiceClient) UpdateConversionSource(ctx context.Context, in *UpdateConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error) {
86 out := new(ConversionSource)
87 err := c.cc.Invoke(ctx, ConversionSourcesService_UpdateConversionSource_FullMethodName, in, out, opts...)
88 if err != nil {
89 return nil, err
90 }
91 return out, nil
92 }
93
94 func (c *conversionSourcesServiceClient) DeleteConversionSource(ctx context.Context, in *DeleteConversionSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
95 out := new(emptypb.Empty)
96 err := c.cc.Invoke(ctx, ConversionSourcesService_DeleteConversionSource_FullMethodName, in, out, opts...)
97 if err != nil {
98 return nil, err
99 }
100 return out, nil
101 }
102
103 func (c *conversionSourcesServiceClient) UndeleteConversionSource(ctx context.Context, in *UndeleteConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error) {
104 out := new(ConversionSource)
105 err := c.cc.Invoke(ctx, ConversionSourcesService_UndeleteConversionSource_FullMethodName, in, out, opts...)
106 if err != nil {
107 return nil, err
108 }
109 return out, nil
110 }
111
112 func (c *conversionSourcesServiceClient) GetConversionSource(ctx context.Context, in *GetConversionSourceRequest, opts ...grpc.CallOption) (*ConversionSource, error) {
113 out := new(ConversionSource)
114 err := c.cc.Invoke(ctx, ConversionSourcesService_GetConversionSource_FullMethodName, in, out, opts...)
115 if err != nil {
116 return nil, err
117 }
118 return out, nil
119 }
120
121 func (c *conversionSourcesServiceClient) ListConversionSources(ctx context.Context, in *ListConversionSourcesRequest, opts ...grpc.CallOption) (*ListConversionSourcesResponse, error) {
122 out := new(ListConversionSourcesResponse)
123 err := c.cc.Invoke(ctx, ConversionSourcesService_ListConversionSources_FullMethodName, in, out, opts...)
124 if err != nil {
125 return nil, err
126 }
127 return out, nil
128 }
129
130 // ConversionSourcesServiceServer is the server API for ConversionSourcesService service.
131 // All implementations should embed UnimplementedConversionSourcesServiceServer
132 // for forward compatibility
133 type ConversionSourcesServiceServer interface {
134 // Creates a new conversion source.
135 CreateConversionSource(context.Context, *CreateConversionSourceRequest) (*ConversionSource, error)
136 // Updates information of an existing conversion source. Available only for
137 // Merchant Center Destination conversion sources.
138 UpdateConversionSource(context.Context, *UpdateConversionSourceRequest) (*ConversionSource, error)
139 // Archives an existing conversion source. If the conversion source is a
140 // Merchant Center Destination, it will be recoverable for 30 days. If the
141 // conversion source is a Google Analytics Link, it will be deleted
142 // immediately and can be restored by creating a new one.
143 DeleteConversionSource(context.Context, *DeleteConversionSourceRequest) (*emptypb.Empty, error)
144 // Re-enables an archived conversion source. Only Available for Merchant
145 // Center Destination conversion sources.
146 UndeleteConversionSource(context.Context, *UndeleteConversionSourceRequest) (*ConversionSource, error)
147 // Fetches a conversion source.
148 GetConversionSource(context.Context, *GetConversionSourceRequest) (*ConversionSource, error)
149 // Retrieves the list of conversion sources the caller has access to.
150 ListConversionSources(context.Context, *ListConversionSourcesRequest) (*ListConversionSourcesResponse, error)
151 }
152
153 // UnimplementedConversionSourcesServiceServer should be embedded to have forward compatible implementations.
154 type UnimplementedConversionSourcesServiceServer struct {
155 }
156
157 func (UnimplementedConversionSourcesServiceServer) CreateConversionSource(context.Context, *CreateConversionSourceRequest) (*ConversionSource, error) {
158 return nil, status.Errorf(codes.Unimplemented, "method CreateConversionSource not implemented")
159 }
160 func (UnimplementedConversionSourcesServiceServer) UpdateConversionSource(context.Context, *UpdateConversionSourceRequest) (*ConversionSource, error) {
161 return nil, status.Errorf(codes.Unimplemented, "method UpdateConversionSource not implemented")
162 }
163 func (UnimplementedConversionSourcesServiceServer) DeleteConversionSource(context.Context, *DeleteConversionSourceRequest) (*emptypb.Empty, error) {
164 return nil, status.Errorf(codes.Unimplemented, "method DeleteConversionSource not implemented")
165 }
166 func (UnimplementedConversionSourcesServiceServer) UndeleteConversionSource(context.Context, *UndeleteConversionSourceRequest) (*ConversionSource, error) {
167 return nil, status.Errorf(codes.Unimplemented, "method UndeleteConversionSource not implemented")
168 }
169 func (UnimplementedConversionSourcesServiceServer) GetConversionSource(context.Context, *GetConversionSourceRequest) (*ConversionSource, error) {
170 return nil, status.Errorf(codes.Unimplemented, "method GetConversionSource not implemented")
171 }
172 func (UnimplementedConversionSourcesServiceServer) ListConversionSources(context.Context, *ListConversionSourcesRequest) (*ListConversionSourcesResponse, error) {
173 return nil, status.Errorf(codes.Unimplemented, "method ListConversionSources not implemented")
174 }
175
176 // UnsafeConversionSourcesServiceServer may be embedded to opt out of forward compatibility for this service.
177 // Use of this interface is not recommended, as added methods to ConversionSourcesServiceServer will
178 // result in compilation errors.
179 type UnsafeConversionSourcesServiceServer interface {
180 mustEmbedUnimplementedConversionSourcesServiceServer()
181 }
182
183 func RegisterConversionSourcesServiceServer(s grpc.ServiceRegistrar, srv ConversionSourcesServiceServer) {
184 s.RegisterService(&ConversionSourcesService_ServiceDesc, srv)
185 }
186
187 func _ConversionSourcesService_CreateConversionSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
188 in := new(CreateConversionSourceRequest)
189 if err := dec(in); err != nil {
190 return nil, err
191 }
192 if interceptor == nil {
193 return srv.(ConversionSourcesServiceServer).CreateConversionSource(ctx, in)
194 }
195 info := &grpc.UnaryServerInfo{
196 Server: srv,
197 FullMethod: ConversionSourcesService_CreateConversionSource_FullMethodName,
198 }
199 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
200 return srv.(ConversionSourcesServiceServer).CreateConversionSource(ctx, req.(*CreateConversionSourceRequest))
201 }
202 return interceptor(ctx, in, info, handler)
203 }
204
205 func _ConversionSourcesService_UpdateConversionSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
206 in := new(UpdateConversionSourceRequest)
207 if err := dec(in); err != nil {
208 return nil, err
209 }
210 if interceptor == nil {
211 return srv.(ConversionSourcesServiceServer).UpdateConversionSource(ctx, in)
212 }
213 info := &grpc.UnaryServerInfo{
214 Server: srv,
215 FullMethod: ConversionSourcesService_UpdateConversionSource_FullMethodName,
216 }
217 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
218 return srv.(ConversionSourcesServiceServer).UpdateConversionSource(ctx, req.(*UpdateConversionSourceRequest))
219 }
220 return interceptor(ctx, in, info, handler)
221 }
222
223 func _ConversionSourcesService_DeleteConversionSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
224 in := new(DeleteConversionSourceRequest)
225 if err := dec(in); err != nil {
226 return nil, err
227 }
228 if interceptor == nil {
229 return srv.(ConversionSourcesServiceServer).DeleteConversionSource(ctx, in)
230 }
231 info := &grpc.UnaryServerInfo{
232 Server: srv,
233 FullMethod: ConversionSourcesService_DeleteConversionSource_FullMethodName,
234 }
235 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
236 return srv.(ConversionSourcesServiceServer).DeleteConversionSource(ctx, req.(*DeleteConversionSourceRequest))
237 }
238 return interceptor(ctx, in, info, handler)
239 }
240
241 func _ConversionSourcesService_UndeleteConversionSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
242 in := new(UndeleteConversionSourceRequest)
243 if err := dec(in); err != nil {
244 return nil, err
245 }
246 if interceptor == nil {
247 return srv.(ConversionSourcesServiceServer).UndeleteConversionSource(ctx, in)
248 }
249 info := &grpc.UnaryServerInfo{
250 Server: srv,
251 FullMethod: ConversionSourcesService_UndeleteConversionSource_FullMethodName,
252 }
253 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
254 return srv.(ConversionSourcesServiceServer).UndeleteConversionSource(ctx, req.(*UndeleteConversionSourceRequest))
255 }
256 return interceptor(ctx, in, info, handler)
257 }
258
259 func _ConversionSourcesService_GetConversionSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
260 in := new(GetConversionSourceRequest)
261 if err := dec(in); err != nil {
262 return nil, err
263 }
264 if interceptor == nil {
265 return srv.(ConversionSourcesServiceServer).GetConversionSource(ctx, in)
266 }
267 info := &grpc.UnaryServerInfo{
268 Server: srv,
269 FullMethod: ConversionSourcesService_GetConversionSource_FullMethodName,
270 }
271 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
272 return srv.(ConversionSourcesServiceServer).GetConversionSource(ctx, req.(*GetConversionSourceRequest))
273 }
274 return interceptor(ctx, in, info, handler)
275 }
276
277 func _ConversionSourcesService_ListConversionSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
278 in := new(ListConversionSourcesRequest)
279 if err := dec(in); err != nil {
280 return nil, err
281 }
282 if interceptor == nil {
283 return srv.(ConversionSourcesServiceServer).ListConversionSources(ctx, in)
284 }
285 info := &grpc.UnaryServerInfo{
286 Server: srv,
287 FullMethod: ConversionSourcesService_ListConversionSources_FullMethodName,
288 }
289 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
290 return srv.(ConversionSourcesServiceServer).ListConversionSources(ctx, req.(*ListConversionSourcesRequest))
291 }
292 return interceptor(ctx, in, info, handler)
293 }
294
295 // ConversionSourcesService_ServiceDesc is the grpc.ServiceDesc for ConversionSourcesService 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 ConversionSourcesService_ServiceDesc = grpc.ServiceDesc{
299 ServiceName: "google.shopping.merchant.conversions.v1beta.ConversionSourcesService",
300 HandlerType: (*ConversionSourcesServiceServer)(nil),
301 Methods: []grpc.MethodDesc{
302 {
303 MethodName: "CreateConversionSource",
304 Handler: _ConversionSourcesService_CreateConversionSource_Handler,
305 },
306 {
307 MethodName: "UpdateConversionSource",
308 Handler: _ConversionSourcesService_UpdateConversionSource_Handler,
309 },
310 {
311 MethodName: "DeleteConversionSource",
312 Handler: _ConversionSourcesService_DeleteConversionSource_Handler,
313 },
314 {
315 MethodName: "UndeleteConversionSource",
316 Handler: _ConversionSourcesService_UndeleteConversionSource_Handler,
317 },
318 {
319 MethodName: "GetConversionSource",
320 Handler: _ConversionSourcesService_GetConversionSource_Handler,
321 },
322 {
323 MethodName: "ListConversionSources",
324 Handler: _ConversionSourcesService_ListConversionSources_Handler,
325 },
326 },
327 Streams: []grpc.StreamDesc{},
328 Metadata: "google/shopping/merchant/conversions/v1beta/conversionsources.proto",
329 }