Debian Codegraph @

shopping/merchant/reports/apiv1beta/reportspb/reports_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/reports/v1beta/reports.proto
20
21 package reportspb
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 )
29
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the grpc package it is being compiled against.
32 // Requires gRPC-Go v1.32.0 or later.
33 const _ = grpc.SupportPackageIsVersion7
34
35 const (
36 ReportService_Search_FullMethodName = "/google.shopping.merchant.reports.v1beta.ReportService/Search"
37 )
38
39 // ReportServiceClient is the client API for ReportService service.
40 //
41 // 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.
42 type ReportServiceClient interface {
43 // Retrieves a report defined by a search query. The response might contain
44 // fewer rows than specified by `page_size`. Rely on `next_page_token` to
45 // determine if there are more rows to be requested.
46 Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
47 }
48
49 type reportServiceClient struct {
50 cc grpc.ClientConnInterface
51 }
52
53 func NewReportServiceClient(cc grpc.ClientConnInterface) ReportServiceClient {
54 return &reportServiceClient{cc}
55 }
56
57 func (c *reportServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
58 out := new(SearchResponse)
59 err := c.cc.Invoke(ctx, ReportService_Search_FullMethodName, in, out, opts...)
60 if err != nil {
61 return nil, err
62 }
63 return out, nil
64 }
65
66 // ReportServiceServer is the server API for ReportService service.
67 // All implementations should embed UnimplementedReportServiceServer
68 // for forward compatibility
69 type ReportServiceServer interface {
70 // Retrieves a report defined by a search query. The response might contain
71 // fewer rows than specified by `page_size`. Rely on `next_page_token` to
72 // determine if there are more rows to be requested.
73 Search(context.Context, *SearchRequest) (*SearchResponse, error)
74 }
75
76 // UnimplementedReportServiceServer should be embedded to have forward compatible implementations.
77 type UnimplementedReportServiceServer struct {
78 }
79
80 func (UnimplementedReportServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) {
81 return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
82 }
83
84 // UnsafeReportServiceServer may be embedded to opt out of forward compatibility for this service.
85 // Use of this interface is not recommended, as added methods to ReportServiceServer will
86 // result in compilation errors.
87 type UnsafeReportServiceServer interface {
88 mustEmbedUnimplementedReportServiceServer()
89 }
90
91 func RegisterReportServiceServer(s grpc.ServiceRegistrar, srv ReportServiceServer) {
92 s.RegisterService(&ReportService_ServiceDesc, srv)
93 }
94
95 func _ReportService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
96 in := new(SearchRequest)
97 if err := dec(in); err != nil {
98 return nil, err
99 }
100 if interceptor == nil {
101 return srv.(ReportServiceServer).Search(ctx, in)
102 }
103 info := &grpc.UnaryServerInfo{
104 Server: srv,
105 FullMethod: ReportService_Search_FullMethodName,
106 }
107 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
108 return srv.(ReportServiceServer).Search(ctx, req.(*SearchRequest))
109 }
110 return interceptor(ctx, in, info, handler)
111 }
112
113 // ReportService_ServiceDesc is the grpc.ServiceDesc for ReportService service.
114 // It's only intended for direct use with grpc.RegisterService,
115 // and not to be introspected or modified (even as a copy)
116 var ReportService_ServiceDesc = grpc.ServiceDesc{
117 ServiceName: "google.shopping.merchant.reports.v1beta.ReportService",
118 HandlerType: (*ReportServiceServer)(nil),
119 Methods: []grpc.MethodDesc{
120 {
121 MethodName: "Search",
122 Handler: _ReportService_Search_Handler,
123 },
124 },
125 Streams: []grpc.StreamDesc{},
126 Metadata: "google/shopping/merchant/reports/v1beta/reports.proto",
127 }