// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/cloud/lustre/v1/lustre.proto package lustrepb import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( Lustre_ListInstances_FullMethodName = "/google.cloud.lustre.v1.Lustre/ListInstances" Lustre_GetInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/GetInstance" Lustre_CreateInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/CreateInstance" Lustre_UpdateInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/UpdateInstance" Lustre_DeleteInstance_FullMethodName = "/google.cloud.lustre.v1.Lustre/DeleteInstance" Lustre_ImportData_FullMethodName = "/google.cloud.lustre.v1.Lustre/ImportData" Lustre_ExportData_FullMethodName = "/google.cloud.lustre.v1.Lustre/ExportData" ) // LustreClient is the client API for Lustre service. // // 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. type LustreClient interface { // Lists instances in a given project and location. ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) // Gets details of a single instance. GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) // Creates a new instance in a given project and location. CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Updates the parameters of a single instance. UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Deletes a single instance. DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Imports data from Cloud Storage to a Managed Lustre instance. ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Exports data from a Managed Lustre instance to Cloud Storage. ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) } type lustreClient struct { cc grpc.ClientConnInterface } func NewLustreClient(cc grpc.ClientConnInterface) LustreClient { return &lustreClient{cc} } func (c *lustreClient) ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) { out := new(ListInstancesResponse) err := c.cc.Invoke(ctx, Lustre_ListInstances_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lustreClient) GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) { out := new(Instance) err := c.cc.Invoke(ctx, Lustre_GetInstance_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lustreClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, Lustre_CreateInstance_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lustreClient) UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, Lustre_UpdateInstance_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lustreClient) DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, Lustre_DeleteInstance_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lustreClient) ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, Lustre_ImportData_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lustreClient) ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, Lustre_ExportData_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // LustreServer is the server API for Lustre service. // All implementations should embed UnimplementedLustreServer // for forward compatibility type LustreServer interface { // Lists instances in a given project and location. ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) // Gets details of a single instance. GetInstance(context.Context, *GetInstanceRequest) (*Instance, error) // Creates a new instance in a given project and location. CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error) // Updates the parameters of a single instance. UpdateInstance(context.Context, *UpdateInstanceRequest) (*longrunningpb.Operation, error) // Deletes a single instance. DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error) // Imports data from Cloud Storage to a Managed Lustre instance. ImportData(context.Context, *ImportDataRequest) (*longrunningpb.Operation, error) // Exports data from a Managed Lustre instance to Cloud Storage. ExportData(context.Context, *ExportDataRequest) (*longrunningpb.Operation, error) } // UnimplementedLustreServer should be embedded to have forward compatible implementations. type UnimplementedLustreServer struct { } func (UnimplementedLustreServer) ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListInstances not implemented") } func (UnimplementedLustreServer) GetInstance(context.Context, *GetInstanceRequest) (*Instance, error) { return nil, status.Errorf(codes.Unimplemented, "method GetInstance not implemented") } func (UnimplementedLustreServer) CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateInstance not implemented") } func (UnimplementedLustreServer) UpdateInstance(context.Context, *UpdateInstanceRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateInstance not implemented") } func (UnimplementedLustreServer) DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteInstance not implemented") } func (UnimplementedLustreServer) ImportData(context.Context, *ImportDataRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method ImportData not implemented") } func (UnimplementedLustreServer) ExportData(context.Context, *ExportDataRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method ExportData not implemented") } // UnsafeLustreServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LustreServer will // result in compilation errors. type UnsafeLustreServer interface { mustEmbedUnimplementedLustreServer() } func RegisterLustreServer(s grpc.ServiceRegistrar, srv LustreServer) { s.RegisterService(&Lustre_ServiceDesc, srv) } func _Lustre_ListInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListInstancesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LustreServer).ListInstances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Lustre_ListInstances_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LustreServer).ListInstances(ctx, req.(*ListInstancesRequest)) } return interceptor(ctx, in, info, handler) } func _Lustre_GetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetInstanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LustreServer).GetInstance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Lustre_GetInstance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LustreServer).GetInstance(ctx, req.(*GetInstanceRequest)) } return interceptor(ctx, in, info, handler) } func _Lustre_CreateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateInstanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LustreServer).CreateInstance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Lustre_CreateInstance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LustreServer).CreateInstance(ctx, req.(*CreateInstanceRequest)) } return interceptor(ctx, in, info, handler) } func _Lustre_UpdateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateInstanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LustreServer).UpdateInstance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Lustre_UpdateInstance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LustreServer).UpdateInstance(ctx, req.(*UpdateInstanceRequest)) } return interceptor(ctx, in, info, handler) } func _Lustre_DeleteInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteInstanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LustreServer).DeleteInstance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Lustre_DeleteInstance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LustreServer).DeleteInstance(ctx, req.(*DeleteInstanceRequest)) } return interceptor(ctx, in, info, handler) } func _Lustre_ImportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ImportDataRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LustreServer).ImportData(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Lustre_ImportData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LustreServer).ImportData(ctx, req.(*ImportDataRequest)) } return interceptor(ctx, in, info, handler) } func _Lustre_ExportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ExportDataRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LustreServer).ExportData(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Lustre_ExportData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LustreServer).ExportData(ctx, req.(*ExportDataRequest)) } return interceptor(ctx, in, info, handler) } // Lustre_ServiceDesc is the grpc.ServiceDesc for Lustre service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Lustre_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.lustre.v1.Lustre", HandlerType: (*LustreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListInstances", Handler: _Lustre_ListInstances_Handler, }, { MethodName: "GetInstance", Handler: _Lustre_GetInstance_Handler, }, { MethodName: "CreateInstance", Handler: _Lustre_CreateInstance_Handler, }, { MethodName: "UpdateInstance", Handler: _Lustre_UpdateInstance_Handler, }, { MethodName: "DeleteInstance", Handler: _Lustre_DeleteInstance_Handler, }, { MethodName: "ImportData", Handler: _Lustre_ImportData_Handler, }, { MethodName: "ExportData", Handler: _Lustre_ExportData_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/lustre/v1/lustre.proto", }