Debian Codegraph @

lustre/apiv1/lustrepb/lustre_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/lustre/v1/lustre.proto
20
21 package lustrepb
22
23 import (
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 context "context"
26 grpc "google.golang.org/grpc"
27 codes "google.golang.org/grpc/codes"
28 status "google.golang.org/grpc/status"
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 Lustre_ListInstances_FullMethodName = "/google.cloud.lustre.v1.Lustre/ListInstances"
38 Lustre_GetInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/GetInstance"
39 Lustre_CreateInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/CreateInstance"
40 Lustre_UpdateInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/UpdateInstance"
41 Lustre_DeleteInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/DeleteInstance"
42 Lustre_ImportData_FullMethodName = "/google.cloud.lustre.v1.Lustre/ImportData"
43 Lustre_ExportData_FullMethodName = "/google.cloud.lustre.v1.Lustre/ExportData"
44 )
45
46 // LustreClient is the client API for Lustre service.
47 //
48 // 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.
49 type LustreClient interface {
50 // Lists instances in a given project and location.
51 ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error)
52 // Gets details of a single instance.
53 GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
54 // Creates a new instance in a given project and location.
55 CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
56 // Updates the parameters of a single instance.
57 UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
58 // Deletes a single instance.
59 DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
60 // Imports data from Cloud Storage to a Managed Lustre instance.
61 ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
62 // Exports data from a Managed Lustre instance to Cloud Storage.
63 ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
64 }
65
66 type lustreClient struct {
67 cc grpc.ClientConnInterface
68 }
69
70 func NewLustreClient(cc grpc.ClientConnInterface) LustreClient {
71 return &lustreClient{cc}
72 }
73
74 func (c *lustreClient) ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) {
75 out := new(ListInstancesResponse)
76 err := c.cc.Invoke(ctx, Lustre_ListInstances_FullMethodName, in, out, opts...)
77 if err != nil {
78 return nil, err
79 }
80 return out, nil
81 }
82
83 func (c *lustreClient) GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) {
84 out := new(Instance)
85 err := c.cc.Invoke(ctx, Lustre_GetInstance_FullMethodName, in, out, opts...)
86 if err != nil {
87 return nil, err
88 }
89 return out, nil
90 }
91
92 func (c *lustreClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
93 out := new(longrunningpb.Operation)
94 err := c.cc.Invoke(ctx, Lustre_CreateInstance_FullMethodName, in, out, opts...)
95 if err != nil {
96 return nil, err
97 }
98 return out, nil
99 }
100
101 func (c *lustreClient) UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
102 out := new(longrunningpb.Operation)
103 err := c.cc.Invoke(ctx, Lustre_UpdateInstance_FullMethodName, in, out, opts...)
104 if err != nil {
105 return nil, err
106 }
107 return out, nil
108 }
109
110 func (c *lustreClient) DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
111 out := new(longrunningpb.Operation)
112 err := c.cc.Invoke(ctx, Lustre_DeleteInstance_FullMethodName, in, out, opts...)
113 if err != nil {
114 return nil, err
115 }
116 return out, nil
117 }
118
119 func (c *lustreClient) ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
120 out := new(longrunningpb.Operation)
121 err := c.cc.Invoke(ctx, Lustre_ImportData_FullMethodName, in, out, opts...)
122 if err != nil {
123 return nil, err
124 }
125 return out, nil
126 }
127
128 func (c *lustreClient) ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
129 out := new(longrunningpb.Operation)
130 err := c.cc.Invoke(ctx, Lustre_ExportData_FullMethodName, in, out, opts...)
131 if err != nil {
132 return nil, err
133 }
134 return out, nil
135 }
136
137 // LustreServer is the server API for Lustre service.
138 // All implementations should embed UnimplementedLustreServer
139 // for forward compatibility
140 type LustreServer interface {
141 // Lists instances in a given project and location.
142 ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error)
143 // Gets details of a single instance.
144 GetInstance(context.Context, *GetInstanceRequest) (*Instance, error)
145 // Creates a new instance in a given project and location.
146 CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error)
147 // Updates the parameters of a single instance.
148 UpdateInstance(context.Context, *UpdateInstanceRequest) (*longrunningpb.Operation, error)
149 // Deletes a single instance.
150 DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error)
151 // Imports data from Cloud Storage to a Managed Lustre instance.
152 ImportData(context.Context, *ImportDataRequest) (*longrunningpb.Operation, error)
153 // Exports data from a Managed Lustre instance to Cloud Storage.
154 ExportData(context.Context, *ExportDataRequest) (*longrunningpb.Operation, error)
155 }
156
157 // UnimplementedLustreServer should be embedded to have forward compatible implementations.
158 type UnimplementedLustreServer struct {
159 }
160
161 func (UnimplementedLustreServer) ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) {
162 return nil, status.Errorf(codes.Unimplemented, "method ListInstances not implemented")
163 }
164 func (UnimplementedLustreServer) GetInstance(context.Context, *GetInstanceRequest) (*Instance, error) {
165 return nil, status.Errorf(codes.Unimplemented, "method GetInstance not implemented")
166 }
167 func (UnimplementedLustreServer) CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error) {
168 return nil, status.Errorf(codes.Unimplemented, "method CreateInstance not implemented")
169 }
170 func (UnimplementedLustreServer) UpdateInstance(context.Context, *UpdateInstanceRequest) (*longrunningpb.Operation, error) {
171 return nil, status.Errorf(codes.Unimplemented, "method UpdateInstance not implemented")
172 }
173 func (UnimplementedLustreServer) DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error) {
174 return nil, status.Errorf(codes.Unimplemented, "method DeleteInstance not implemented")
175 }
176 func (UnimplementedLustreServer) ImportData(context.Context, *ImportDataRequest) (*longrunningpb.Operation, error) {
177 return nil, status.Errorf(codes.Unimplemented, "method ImportData not implemented")
178 }
179 func (UnimplementedLustreServer) ExportData(context.Context, *ExportDataRequest) (*longrunningpb.Operation, error) {
180 return nil, status.Errorf(codes.Unimplemented, "method ExportData not implemented")
181 }
182
183 // UnsafeLustreServer may be embedded to opt out of forward compatibility for this service.
184 // Use of this interface is not recommended, as added methods to LustreServer will
185 // result in compilation errors.
186 type UnsafeLustreServer interface {
187 mustEmbedUnimplementedLustreServer()
188 }
189
190 func RegisterLustreServer(s grpc.ServiceRegistrar, srv LustreServer) {
191 s.RegisterService(&Lustre_ServiceDesc, srv)
192 }
193
194 func _Lustre_ListInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
195 in := new(ListInstancesRequest)
196 if err := dec(in); err != nil {
197 return nil, err
198 }
199 if interceptor == nil {
200 return srv.(LustreServer).ListInstances(ctx, in)
201 }
202 info := &grpc.UnaryServerInfo{
203 Server: srv,
204 FullMethod: Lustre_ListInstances_FullMethodName,
205 }
206 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
207 return srv.(LustreServer).ListInstances(ctx, req.(*ListInstancesRequest))
208 }
209 return interceptor(ctx, in, info, handler)
210 }
211
212 func _Lustre_GetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
213 in := new(GetInstanceRequest)
214 if err := dec(in); err != nil {
215 return nil, err
216 }
217 if interceptor == nil {
218 return srv.(LustreServer).GetInstance(ctx, in)
219 }
220 info := &grpc.UnaryServerInfo{
221 Server: srv,
222 FullMethod: Lustre_GetInstance_FullMethodName,
223 }
224 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
225 return srv.(LustreServer).GetInstance(ctx, req.(*GetInstanceRequest))
226 }
227 return interceptor(ctx, in, info, handler)
228 }
229
230 func _Lustre_CreateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
231 in := new(CreateInstanceRequest)
232 if err := dec(in); err != nil {
233 return nil, err
234 }
235 if interceptor == nil {
236 return srv.(LustreServer).CreateInstance(ctx, in)
237 }
238 info := &grpc.UnaryServerInfo{
239 Server: srv,
240 FullMethod: Lustre_CreateInstance_FullMethodName,
241 }
242 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
243 return srv.(LustreServer).CreateInstance(ctx, req.(*CreateInstanceRequest))
244 }
245 return interceptor(ctx, in, info, handler)
246 }
247
248 func _Lustre_UpdateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
249 in := new(UpdateInstanceRequest)
250 if err := dec(in); err != nil {
251 return nil, err
252 }
253 if interceptor == nil {
254 return srv.(LustreServer).UpdateInstance(ctx, in)
255 }
256 info := &grpc.UnaryServerInfo{
257 Server: srv,
258 FullMethod: Lustre_UpdateInstance_FullMethodName,
259 }
260 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
261 return srv.(LustreServer).UpdateInstance(ctx, req.(*UpdateInstanceRequest))
262 }
263 return interceptor(ctx, in, info, handler)
264 }
265
266 func _Lustre_DeleteInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
267 in := new(DeleteInstanceRequest)
268 if err := dec(in); err != nil {
269 return nil, err
270 }
271 if interceptor == nil {
272 return srv.(LustreServer).DeleteInstance(ctx, in)
273 }
274 info := &grpc.UnaryServerInfo{
275 Server: srv,
276 FullMethod: Lustre_DeleteInstance_FullMethodName,
277 }
278 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
279 return srv.(LustreServer).DeleteInstance(ctx, req.(*DeleteInstanceRequest))
280 }
281 return interceptor(ctx, in, info, handler)
282 }
283
284 func _Lustre_ImportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
285 in := new(ImportDataRequest)
286 if err := dec(in); err != nil {
287 return nil, err
288 }
289 if interceptor == nil {
290 return srv.(LustreServer).ImportData(ctx, in)
291 }
292 info := &grpc.UnaryServerInfo{
293 Server: srv,
294 FullMethod: Lustre_ImportData_FullMethodName,
295 }
296 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
297 return srv.(LustreServer).ImportData(ctx, req.(*ImportDataRequest))
298 }
299 return interceptor(ctx, in, info, handler)
300 }
301
302 func _Lustre_ExportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
303 in := new(ExportDataRequest)
304 if err := dec(in); err != nil {
305 return nil, err
306 }
307 if interceptor == nil {
308 return srv.(LustreServer).ExportData(ctx, in)
309 }
310 info := &grpc.UnaryServerInfo{
311 Server: srv,
312 FullMethod: Lustre_ExportData_FullMethodName,
313 }
314 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
315 return srv.(LustreServer).ExportData(ctx, req.(*ExportDataRequest))
316 }
317 return interceptor(ctx, in, info, handler)
318 }
319
320 // Lustre_ServiceDesc is the grpc.ServiceDesc for Lustre service.
321 // It's only intended for direct use with grpc.RegisterService,
322 // and not to be introspected or modified (even as a copy)
323 var Lustre_ServiceDesc = grpc.ServiceDesc{
324 ServiceName: "google.cloud.lustre.v1.Lustre",
325 HandlerType: (*LustreServer)(nil),
326 Methods: []grpc.MethodDesc{
327 {
328 MethodName: "ListInstances",
329 Handler: _Lustre_ListInstances_Handler,
330 },
331 {
332 MethodName: "GetInstance",
333 Handler: _Lustre_GetInstance_Handler,
334 },
335 {
336 MethodName: "CreateInstance",
337 Handler: _Lustre_CreateInstance_Handler,
338 },
339 {
340 MethodName: "UpdateInstance",
341 Handler: _Lustre_UpdateInstance_Handler,
342 },
343 {
344 MethodName: "DeleteInstance",
345 Handler: _Lustre_DeleteInstance_Handler,
346 },
347 {
348 MethodName: "ImportData",
349 Handler: _Lustre_ImportData_Handler,
350 },
351 {
352 MethodName: "ExportData",
353 Handler: _Lustre_ExportData_Handler,
354 },
355 },
356 Streams: []grpc.StreamDesc{},
357 Metadata: "google/cloud/lustre/v1/lustre.proto",
358 }