Debian Codegraph @

asset/apiv1p2beta1/assetpb/asset_service_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/asset/v1p2beta1/asset_service.proto
20
21 package assetpb
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 AssetService_CreateFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/CreateFeed"
38 AssetService_GetFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/GetFeed"
39 AssetService_ListFeeds_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/ListFeeds"
40 AssetService_UpdateFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/UpdateFeed"
41 AssetService_DeleteFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/DeleteFeed"
42 )
43
44 // AssetServiceClient is the client API for AssetService service.
45 //
46 // 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.
47 type AssetServiceClient interface {
48 // Creates a feed in a parent project/folder/organization to listen to its
49 // asset updates.
50 CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error)
51 // Gets details about an asset feed.
52 GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error)
53 // Lists all asset feeds in a parent project/folder/organization.
54 ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error)
55 // Updates an asset feed configuration.
56 UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error)
57 // Deletes an asset feed.
58 DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
59 }
60
61 type assetServiceClient struct {
62 cc grpc.ClientConnInterface
63 }
64
65 func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient {
66 return &assetServiceClient{cc}
67 }
68
69 func (c *assetServiceClient) CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error) {
70 out := new(Feed)
71 err := c.cc.Invoke(ctx, AssetService_CreateFeed_FullMethodName, in, out, opts...)
72 if err != nil {
73 return nil, err
74 }
75 return out, nil
76 }
77
78 func (c *assetServiceClient) GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error) {
79 out := new(Feed)
80 err := c.cc.Invoke(ctx, AssetService_GetFeed_FullMethodName, in, out, opts...)
81 if err != nil {
82 return nil, err
83 }
84 return out, nil
85 }
86
87 func (c *assetServiceClient) ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error) {
88 out := new(ListFeedsResponse)
89 err := c.cc.Invoke(ctx, AssetService_ListFeeds_FullMethodName, in, out, opts...)
90 if err != nil {
91 return nil, err
92 }
93 return out, nil
94 }
95
96 func (c *assetServiceClient) UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error) {
97 out := new(Feed)
98 err := c.cc.Invoke(ctx, AssetService_UpdateFeed_FullMethodName, in, out, opts...)
99 if err != nil {
100 return nil, err
101 }
102 return out, nil
103 }
104
105 func (c *assetServiceClient) DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
106 out := new(emptypb.Empty)
107 err := c.cc.Invoke(ctx, AssetService_DeleteFeed_FullMethodName, in, out, opts...)
108 if err != nil {
109 return nil, err
110 }
111 return out, nil
112 }
113
114 // AssetServiceServer is the server API for AssetService service.
115 // All implementations should embed UnimplementedAssetServiceServer
116 // for forward compatibility
117 type AssetServiceServer interface {
118 // Creates a feed in a parent project/folder/organization to listen to its
119 // asset updates.
120 CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error)
121 // Gets details about an asset feed.
122 GetFeed(context.Context, *GetFeedRequest) (*Feed, error)
123 // Lists all asset feeds in a parent project/folder/organization.
124 ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error)
125 // Updates an asset feed configuration.
126 UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error)
127 // Deletes an asset feed.
128 DeleteFeed(context.Context, *DeleteFeedRequest) (*emptypb.Empty, error)
129 }
130
131 // UnimplementedAssetServiceServer should be embedded to have forward compatible implementations.
132 type UnimplementedAssetServiceServer struct {
133 }
134
135 func (UnimplementedAssetServiceServer) CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error) {
136 return nil, status.Errorf(codes.Unimplemented, "method CreateFeed not implemented")
137 }
138 func (UnimplementedAssetServiceServer) GetFeed(context.Context, *GetFeedRequest) (*Feed, error) {
139 return nil, status.Errorf(codes.Unimplemented, "method GetFeed not implemented")
140 }
141 func (UnimplementedAssetServiceServer) ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error) {
142 return nil, status.Errorf(codes.Unimplemented, "method ListFeeds not implemented")
143 }
144 func (UnimplementedAssetServiceServer) UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error) {
145 return nil, status.Errorf(codes.Unimplemented, "method UpdateFeed not implemented")
146 }
147 func (UnimplementedAssetServiceServer) DeleteFeed(context.Context, *DeleteFeedRequest) (*emptypb.Empty, error) {
148 return nil, status.Errorf(codes.Unimplemented, "method DeleteFeed not implemented")
149 }
150
151 // UnsafeAssetServiceServer may be embedded to opt out of forward compatibility for this service.
152 // Use of this interface is not recommended, as added methods to AssetServiceServer will
153 // result in compilation errors.
154 type UnsafeAssetServiceServer interface {
155 mustEmbedUnimplementedAssetServiceServer()
156 }
157
158 func RegisterAssetServiceServer(s grpc.ServiceRegistrar, srv AssetServiceServer) {
159 s.RegisterService(&AssetService_ServiceDesc, srv)
160 }
161
162 func _AssetService_CreateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
163 in := new(CreateFeedRequest)
164 if err := dec(in); err != nil {
165 return nil, err
166 }
167 if interceptor == nil {
168 return srv.(AssetServiceServer).CreateFeed(ctx, in)
169 }
170 info := &grpc.UnaryServerInfo{
171 Server: srv,
172 FullMethod: AssetService_CreateFeed_FullMethodName,
173 }
174 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
175 return srv.(AssetServiceServer).CreateFeed(ctx, req.(*CreateFeedRequest))
176 }
177 return interceptor(ctx, in, info, handler)
178 }
179
180 func _AssetService_GetFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
181 in := new(GetFeedRequest)
182 if err := dec(in); err != nil {
183 return nil, err
184 }
185 if interceptor == nil {
186 return srv.(AssetServiceServer).GetFeed(ctx, in)
187 }
188 info := &grpc.UnaryServerInfo{
189 Server: srv,
190 FullMethod: AssetService_GetFeed_FullMethodName,
191 }
192 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
193 return srv.(AssetServiceServer).GetFeed(ctx, req.(*GetFeedRequest))
194 }
195 return interceptor(ctx, in, info, handler)
196 }
197
198 func _AssetService_ListFeeds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
199 in := new(ListFeedsRequest)
200 if err := dec(in); err != nil {
201 return nil, err
202 }
203 if interceptor == nil {
204 return srv.(AssetServiceServer).ListFeeds(ctx, in)
205 }
206 info := &grpc.UnaryServerInfo{
207 Server: srv,
208 FullMethod: AssetService_ListFeeds_FullMethodName,
209 }
210 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
211 return srv.(AssetServiceServer).ListFeeds(ctx, req.(*ListFeedsRequest))
212 }
213 return interceptor(ctx, in, info, handler)
214 }
215
216 func _AssetService_UpdateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
217 in := new(UpdateFeedRequest)
218 if err := dec(in); err != nil {
219 return nil, err
220 }
221 if interceptor == nil {
222 return srv.(AssetServiceServer).UpdateFeed(ctx, in)
223 }
224 info := &grpc.UnaryServerInfo{
225 Server: srv,
226 FullMethod: AssetService_UpdateFeed_FullMethodName,
227 }
228 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
229 return srv.(AssetServiceServer).UpdateFeed(ctx, req.(*UpdateFeedRequest))
230 }
231 return interceptor(ctx, in, info, handler)
232 }
233
234 func _AssetService_DeleteFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
235 in := new(DeleteFeedRequest)
236 if err := dec(in); err != nil {
237 return nil, err
238 }
239 if interceptor == nil {
240 return srv.(AssetServiceServer).DeleteFeed(ctx, in)
241 }
242 info := &grpc.UnaryServerInfo{
243 Server: srv,
244 FullMethod: AssetService_DeleteFeed_FullMethodName,
245 }
246 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
247 return srv.(AssetServiceServer).DeleteFeed(ctx, req.(*DeleteFeedRequest))
248 }
249 return interceptor(ctx, in, info, handler)
250 }
251
252 // AssetService_ServiceDesc is the grpc.ServiceDesc for AssetService service.
253 // It's only intended for direct use with grpc.RegisterService,
254 // and not to be introspected or modified (even as a copy)
255 var AssetService_ServiceDesc = grpc.ServiceDesc{
256 ServiceName: "google.cloud.asset.v1p2beta1.AssetService",
257 HandlerType: (*AssetServiceServer)(nil),
258 Methods: []grpc.MethodDesc{
259 {
260 MethodName: "CreateFeed",
261 Handler: _AssetService_CreateFeed_Handler,
262 },
263 {
264 MethodName: "GetFeed",
265 Handler: _AssetService_GetFeed_Handler,
266 },
267 {
268 MethodName: "ListFeeds",
269 Handler: _AssetService_ListFeeds_Handler,
270 },
271 {
272 MethodName: "UpdateFeed",
273 Handler: _AssetService_UpdateFeed_Handler,
274 },
275 {
276 MethodName: "DeleteFeed",
277 Handler: _AssetService_DeleteFeed_Handler,
278 },
279 },
280 Streams: []grpc.StreamDesc{},
281 Metadata: "google/cloud/asset/v1p2beta1/asset_service.proto",
282 }