// 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/locationfinder/v1/service.proto package locationfinderpb import ( 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 ( CloudLocationFinder_ListCloudLocations_FullMethodName = "/google.cloud.locationfinder.v1.CloudLocationFinder/ListCloudLocations" CloudLocationFinder_GetCloudLocation_FullMethodName = "/google.cloud.locationfinder.v1.CloudLocationFinder/GetCloudLocation" CloudLocationFinder_SearchCloudLocations_FullMethodName = "/google.cloud.locationfinder.v1.CloudLocationFinder/SearchCloudLocations" ) // CloudLocationFinderClient is the client API for CloudLocationFinder 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 CloudLocationFinderClient interface { // Lists cloud locations under a given project and location. ListCloudLocations(ctx context.Context, in *ListCloudLocationsRequest, opts ...grpc.CallOption) (*ListCloudLocationsResponse, error) // Retrieves a resource containing information about a cloud location. GetCloudLocation(ctx context.Context, in *GetCloudLocationRequest, opts ...grpc.CallOption) (*CloudLocation, error) // Searches for cloud locations from a given source location. SearchCloudLocations(ctx context.Context, in *SearchCloudLocationsRequest, opts ...grpc.CallOption) (*SearchCloudLocationsResponse, error) } type cloudLocationFinderClient struct { cc grpc.ClientConnInterface } func NewCloudLocationFinderClient(cc grpc.ClientConnInterface) CloudLocationFinderClient { return &cloudLocationFinderClient{cc} } func (c *cloudLocationFinderClient) ListCloudLocations(ctx context.Context, in *ListCloudLocationsRequest, opts ...grpc.CallOption) (*ListCloudLocationsResponse, error) { out := new(ListCloudLocationsResponse) err := c.cc.Invoke(ctx, CloudLocationFinder_ListCloudLocations_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cloudLocationFinderClient) GetCloudLocation(ctx context.Context, in *GetCloudLocationRequest, opts ...grpc.CallOption) (*CloudLocation, error) { out := new(CloudLocation) err := c.cc.Invoke(ctx, CloudLocationFinder_GetCloudLocation_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cloudLocationFinderClient) SearchCloudLocations(ctx context.Context, in *SearchCloudLocationsRequest, opts ...grpc.CallOption) (*SearchCloudLocationsResponse, error) { out := new(SearchCloudLocationsResponse) err := c.cc.Invoke(ctx, CloudLocationFinder_SearchCloudLocations_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // CloudLocationFinderServer is the server API for CloudLocationFinder service. // All implementations should embed UnimplementedCloudLocationFinderServer // for forward compatibility type CloudLocationFinderServer interface { // Lists cloud locations under a given project and location. ListCloudLocations(context.Context, *ListCloudLocationsRequest) (*ListCloudLocationsResponse, error) // Retrieves a resource containing information about a cloud location. GetCloudLocation(context.Context, *GetCloudLocationRequest) (*CloudLocation, error) // Searches for cloud locations from a given source location. SearchCloudLocations(context.Context, *SearchCloudLocationsRequest) (*SearchCloudLocationsResponse, error) } // UnimplementedCloudLocationFinderServer should be embedded to have forward compatible implementations. type UnimplementedCloudLocationFinderServer struct { } func (UnimplementedCloudLocationFinderServer) ListCloudLocations(context.Context, *ListCloudLocationsRequest) (*ListCloudLocationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListCloudLocations not implemented") } func (UnimplementedCloudLocationFinderServer) GetCloudLocation(context.Context, *GetCloudLocationRequest) (*CloudLocation, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCloudLocation not implemented") } func (UnimplementedCloudLocationFinderServer) SearchCloudLocations(context.Context, *SearchCloudLocationsRequest) (*SearchCloudLocationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchCloudLocations not implemented") } // UnsafeCloudLocationFinderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CloudLocationFinderServer will // result in compilation errors. type UnsafeCloudLocationFinderServer interface { mustEmbedUnimplementedCloudLocationFinderServer() } func RegisterCloudLocationFinderServer(s grpc.ServiceRegistrar, srv CloudLocationFinderServer) { s.RegisterService(&CloudLocationFinder_ServiceDesc, srv) } func _CloudLocationFinder_ListCloudLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListCloudLocationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudLocationFinderServer).ListCloudLocations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudLocationFinder_ListCloudLocations_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudLocationFinderServer).ListCloudLocations(ctx, req.(*ListCloudLocationsRequest)) } return interceptor(ctx, in, info, handler) } func _CloudLocationFinder_GetCloudLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCloudLocationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudLocationFinderServer).GetCloudLocation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudLocationFinder_GetCloudLocation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudLocationFinderServer).GetCloudLocation(ctx, req.(*GetCloudLocationRequest)) } return interceptor(ctx, in, info, handler) } func _CloudLocationFinder_SearchCloudLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SearchCloudLocationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudLocationFinderServer).SearchCloudLocations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudLocationFinder_SearchCloudLocations_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudLocationFinderServer).SearchCloudLocations(ctx, req.(*SearchCloudLocationsRequest)) } return interceptor(ctx, in, info, handler) } // CloudLocationFinder_ServiceDesc is the grpc.ServiceDesc for CloudLocationFinder service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CloudLocationFinder_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.locationfinder.v1.CloudLocationFinder", HandlerType: (*CloudLocationFinderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListCloudLocations", Handler: _CloudLocationFinder_ListCloudLocations_Handler, }, { MethodName: "GetCloudLocation", Handler: _CloudLocationFinder_GetCloudLocation_Handler, }, { MethodName: "SearchCloudLocations", Handler: _CloudLocationFinder_SearchCloudLocations_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/locationfinder/v1/service.proto", }