Debian Codegraph @

privatecatalog/apiv1beta1/privatecatalogpb/private_catalog_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/cloud/privatecatalog/v1beta1/private_catalog.proto
20
21 package privatecatalogpb
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 PrivateCatalog_SearchCatalogs_FullMethodName = "/google.cloud.privatecatalog.v1beta1.PrivateCatalog/SearchCatalogs"
37 PrivateCatalog_SearchProducts_FullMethodName = "/google.cloud.privatecatalog.v1beta1.PrivateCatalog/SearchProducts"
38 PrivateCatalog_SearchVersions_FullMethodName = "/google.cloud.privatecatalog.v1beta1.PrivateCatalog/SearchVersions"
39 )
40
41 // PrivateCatalogClient is the client API for PrivateCatalog service.
42 //
43 // 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.
44 type PrivateCatalogClient interface {
45 // Search [Catalog][google.cloud.privatecatalog.v1beta1.Catalog] resources that consumers have access to, within the
46 // scope of the consumer cloud resource hierarchy context.
47 SearchCatalogs(ctx context.Context, in *SearchCatalogsRequest, opts ...grpc.CallOption) (*SearchCatalogsResponse, error)
48 // Search [Product][google.cloud.privatecatalog.v1beta1.Product] resources that consumers have access to, within the
49 // scope of the consumer cloud resource hierarchy context.
50 SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error)
51 // Search [Version][google.cloud.privatecatalog.v1beta1.Version] resources that consumers have access to, within the
52 // scope of the consumer cloud resource hierarchy context.
53 SearchVersions(ctx context.Context, in *SearchVersionsRequest, opts ...grpc.CallOption) (*SearchVersionsResponse, error)
54 }
55
56 type privateCatalogClient struct {
57 cc grpc.ClientConnInterface
58 }
59
60 func NewPrivateCatalogClient(cc grpc.ClientConnInterface) PrivateCatalogClient {
61 return &privateCatalogClient{cc}
62 }
63
64 func (c *privateCatalogClient) SearchCatalogs(ctx context.Context, in *SearchCatalogsRequest, opts ...grpc.CallOption) (*SearchCatalogsResponse, error) {
65 out := new(SearchCatalogsResponse)
66 err := c.cc.Invoke(ctx, PrivateCatalog_SearchCatalogs_FullMethodName, in, out, opts...)
67 if err != nil {
68 return nil, err
69 }
70 return out, nil
71 }
72
73 func (c *privateCatalogClient) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error) {
74 out := new(SearchProductsResponse)
75 err := c.cc.Invoke(ctx, PrivateCatalog_SearchProducts_FullMethodName, in, out, opts...)
76 if err != nil {
77 return nil, err
78 }
79 return out, nil
80 }
81
82 func (c *privateCatalogClient) SearchVersions(ctx context.Context, in *SearchVersionsRequest, opts ...grpc.CallOption) (*SearchVersionsResponse, error) {
83 out := new(SearchVersionsResponse)
84 err := c.cc.Invoke(ctx, PrivateCatalog_SearchVersions_FullMethodName, in, out, opts...)
85 if err != nil {
86 return nil, err
87 }
88 return out, nil
89 }
90
91 // PrivateCatalogServer is the server API for PrivateCatalog service.
92 // All implementations should embed UnimplementedPrivateCatalogServer
93 // for forward compatibility
94 type PrivateCatalogServer interface {
95 // Search [Catalog][google.cloud.privatecatalog.v1beta1.Catalog] resources that consumers have access to, within the
96 // scope of the consumer cloud resource hierarchy context.
97 SearchCatalogs(context.Context, *SearchCatalogsRequest) (*SearchCatalogsResponse, error)
98 // Search [Product][google.cloud.privatecatalog.v1beta1.Product] resources that consumers have access to, within the
99 // scope of the consumer cloud resource hierarchy context.
100 SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error)
101 // Search [Version][google.cloud.privatecatalog.v1beta1.Version] resources that consumers have access to, within the
102 // scope of the consumer cloud resource hierarchy context.
103 SearchVersions(context.Context, *SearchVersionsRequest) (*SearchVersionsResponse, error)
104 }
105
106 // UnimplementedPrivateCatalogServer should be embedded to have forward compatible implementations.
107 type UnimplementedPrivateCatalogServer struct {
108 }
109
110 func (UnimplementedPrivateCatalogServer) SearchCatalogs(context.Context, *SearchCatalogsRequest) (*SearchCatalogsResponse, error) {
111 return nil, status.Errorf(codes.Unimplemented, "method SearchCatalogs not implemented")
112 }
113 func (UnimplementedPrivateCatalogServer) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error) {
114 return nil, status.Errorf(codes.Unimplemented, "method SearchProducts not implemented")
115 }
116 func (UnimplementedPrivateCatalogServer) SearchVersions(context.Context, *SearchVersionsRequest) (*SearchVersionsResponse, error) {
117 return nil, status.Errorf(codes.Unimplemented, "method SearchVersions not implemented")
118 }
119
120 // UnsafePrivateCatalogServer may be embedded to opt out of forward compatibility for this service.
121 // Use of this interface is not recommended, as added methods to PrivateCatalogServer will
122 // result in compilation errors.
123 type UnsafePrivateCatalogServer interface {
124 mustEmbedUnimplementedPrivateCatalogServer()
125 }
126
127 func RegisterPrivateCatalogServer(s grpc.ServiceRegistrar, srv PrivateCatalogServer) {
128 s.RegisterService(&PrivateCatalog_ServiceDesc, srv)
129 }
130
131 func _PrivateCatalog_SearchCatalogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
132 in := new(SearchCatalogsRequest)
133 if err := dec(in); err != nil {
134 return nil, err
135 }
136 if interceptor == nil {
137 return srv.(PrivateCatalogServer).SearchCatalogs(ctx, in)
138 }
139 info := &grpc.UnaryServerInfo{
140 Server: srv,
141 FullMethod: PrivateCatalog_SearchCatalogs_FullMethodName,
142 }
143 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
144 return srv.(PrivateCatalogServer).SearchCatalogs(ctx, req.(*SearchCatalogsRequest))
145 }
146 return interceptor(ctx, in, info, handler)
147 }
148
149 func _PrivateCatalog_SearchProducts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
150 in := new(SearchProductsRequest)
151 if err := dec(in); err != nil {
152 return nil, err
153 }
154 if interceptor == nil {
155 return srv.(PrivateCatalogServer).SearchProducts(ctx, in)
156 }
157 info := &grpc.UnaryServerInfo{
158 Server: srv,
159 FullMethod: PrivateCatalog_SearchProducts_FullMethodName,
160 }
161 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
162 return srv.(PrivateCatalogServer).SearchProducts(ctx, req.(*SearchProductsRequest))
163 }
164 return interceptor(ctx, in, info, handler)
165 }
166
167 func _PrivateCatalog_SearchVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
168 in := new(SearchVersionsRequest)
169 if err := dec(in); err != nil {
170 return nil, err
171 }
172 if interceptor == nil {
173 return srv.(PrivateCatalogServer).SearchVersions(ctx, in)
174 }
175 info := &grpc.UnaryServerInfo{
176 Server: srv,
177 FullMethod: PrivateCatalog_SearchVersions_FullMethodName,
178 }
179 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
180 return srv.(PrivateCatalogServer).SearchVersions(ctx, req.(*SearchVersionsRequest))
181 }
182 return interceptor(ctx, in, info, handler)
183 }
184
185 // PrivateCatalog_ServiceDesc is the grpc.ServiceDesc for PrivateCatalog service.
186 // It's only intended for direct use with grpc.RegisterService,
187 // and not to be introspected or modified (even as a copy)
188 var PrivateCatalog_ServiceDesc = grpc.ServiceDesc{
189 ServiceName: "google.cloud.privatecatalog.v1beta1.PrivateCatalog",
190 HandlerType: (*PrivateCatalogServer)(nil),
191 Methods: []grpc.MethodDesc{
192 {
193 MethodName: "SearchCatalogs",
194 Handler: _PrivateCatalog_SearchCatalogs_Handler,
195 },
196 {
197 MethodName: "SearchProducts",
198 Handler: _PrivateCatalog_SearchProducts_Handler,
199 },
200 {
201 MethodName: "SearchVersions",
202 Handler: _PrivateCatalog_SearchVersions_Handler,
203 },
204 },
205 Streams: []grpc.StreamDesc{},
206 Metadata: "google/cloud/privatecatalog/v1beta1/private_catalog.proto",
207 }