| 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/locationfinder/v1/service.proto |
| 20 |
|
| 21 |
package locationfinderpb |
| 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 |
CloudLocationFinder_ListCloudLocations_FullMethodName = "/google.cloud.locationfinder.v1.CloudLocationFinder/ListCloudLocations" |
| 37 |
CloudLocationFinder_GetCloudLocation_FullMethodName = "/google.cloud.locationfinder.v1.CloudLocationFinder/GetCloudLocation" |
| 38 |
CloudLocationFinder_SearchCloudLocations_FullMethodName = "/google.cloud.locationfinder.v1.CloudLocationFinder/SearchCloudLocations" |
| 39 |
) |
| 40 |
|
| 41 |
// CloudLocationFinderClient is the client API for CloudLocationFinder 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 CloudLocationFinderClient interface { |
| 45 |
// Lists cloud locations under a given project and location. |
| 46 |
ListCloudLocations(ctx context.Context, in *ListCloudLocationsRequest, opts ...grpc.CallOption) (*ListCloudLocationsResponse, error) |
| 47 |
// Retrieves a resource containing information about a cloud location. |
| 48 |
GetCloudLocation(ctx context.Context, in *GetCloudLocationRequest, opts ...grpc.CallOption) (*CloudLocation, error) |
| 49 |
// Searches for cloud locations from a given source location. |
| 50 |
SearchCloudLocations(ctx context.Context, in *SearchCloudLocationsRequest, opts ...grpc.CallOption) (*SearchCloudLocationsResponse, error) |
| 51 |
} |
| 52 |
|
| 53 |
type cloudLocationFinderClient struct { |
| 54 |
cc grpc.ClientConnInterface |
| 55 |
} |
| 56 |
|
| 57 |
func NewCloudLocationFinderClient(cc grpc.ClientConnInterface) CloudLocationFinderClient { |
| 58 |
return &cloudLocationFinderClient{cc} |
| 59 |
} |
| 60 |
|
| 61 |
func (c *cloudLocationFinderClient) ListCloudLocations(ctx context.Context, in *ListCloudLocationsRequest, opts ...grpc.CallOption) (*ListCloudLocationsResponse, error) { |
| 62 |
out := new(ListCloudLocationsResponse) |
| 63 |
err := c.cc.Invoke(ctx, CloudLocationFinder_ListCloudLocations_FullMethodName, in, out, opts...) |
| 64 |
if err != nil { |
| 65 |
return nil, err |
| 66 |
} |
| 67 |
return out, nil |
| 68 |
} |
| 69 |
|
| 70 |
func (c *cloudLocationFinderClient) GetCloudLocation(ctx context.Context, in *GetCloudLocationRequest, opts ...grpc.CallOption) (*CloudLocation, error) { |
| 71 |
out := new(CloudLocation) |
| 72 |
err := c.cc.Invoke(ctx, CloudLocationFinder_GetCloudLocation_FullMethodName, in, out, opts...) |
| 73 |
if err != nil { |
| 74 |
return nil, err |
| 75 |
} |
| 76 |
return out, nil |
| 77 |
} |
| 78 |
|
| 79 |
func (c *cloudLocationFinderClient) SearchCloudLocations(ctx context.Context, in *SearchCloudLocationsRequest, opts ...grpc.CallOption) (*SearchCloudLocationsResponse, error) { |
| 80 |
out := new(SearchCloudLocationsResponse) |
| 81 |
err := c.cc.Invoke(ctx, CloudLocationFinder_SearchCloudLocations_FullMethodName, in, out, opts...) |
| 82 |
if err != nil { |
| 83 |
return nil, err |
| 84 |
} |
| 85 |
return out, nil |
| 86 |
} |
| 87 |
|
| 88 |
// CloudLocationFinderServer is the server API for CloudLocationFinder service. |
| 89 |
// All implementations should embed UnimplementedCloudLocationFinderServer |
| 90 |
// for forward compatibility |
| 91 |
type CloudLocationFinderServer interface { |
| 92 |
// Lists cloud locations under a given project and location. |
| 93 |
ListCloudLocations(context.Context, *ListCloudLocationsRequest) (*ListCloudLocationsResponse, error) |
| 94 |
// Retrieves a resource containing information about a cloud location. |
| 95 |
GetCloudLocation(context.Context, *GetCloudLocationRequest) (*CloudLocation, error) |
| 96 |
// Searches for cloud locations from a given source location. |
| 97 |
SearchCloudLocations(context.Context, *SearchCloudLocationsRequest) (*SearchCloudLocationsResponse, error) |
| 98 |
} |
| 99 |
|
| 100 |
// UnimplementedCloudLocationFinderServer should be embedded to have forward compatible implementations. |
| 101 |
type UnimplementedCloudLocationFinderServer struct { |
| 102 |
} |
| 103 |
|
| 104 |
func (UnimplementedCloudLocationFinderServer) ListCloudLocations(context.Context, *ListCloudLocationsRequest) (*ListCloudLocationsResponse, error) { |
| 105 |
return nil, status.Errorf(codes.Unimplemented, "method ListCloudLocations not implemented") |
| 106 |
} |
| 107 |
func (UnimplementedCloudLocationFinderServer) GetCloudLocation(context.Context, *GetCloudLocationRequest) (*CloudLocation, error) { |
| 108 |
return nil, status.Errorf(codes.Unimplemented, "method GetCloudLocation not implemented") |
| 109 |
} |
| 110 |
func (UnimplementedCloudLocationFinderServer) SearchCloudLocations(context.Context, *SearchCloudLocationsRequest) (*SearchCloudLocationsResponse, error) { |
| 111 |
return nil, status.Errorf(codes.Unimplemented, "method SearchCloudLocations not implemented") |
| 112 |
} |
| 113 |
|
| 114 |
// UnsafeCloudLocationFinderServer may be embedded to opt out of forward compatibility for this service. |
| 115 |
// Use of this interface is not recommended, as added methods to CloudLocationFinderServer will |
| 116 |
// result in compilation errors. |
| 117 |
type UnsafeCloudLocationFinderServer interface { |
| 118 |
mustEmbedUnimplementedCloudLocationFinderServer() |
| 119 |
} |
| 120 |
|
| 121 |
func RegisterCloudLocationFinderServer(s grpc.ServiceRegistrar, srv CloudLocationFinderServer) { |
| 122 |
s.RegisterService(&CloudLocationFinder_ServiceDesc, srv) |
| 123 |
} |
| 124 |
|
| 125 |
func _CloudLocationFinder_ListCloudLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 126 |
in := new(ListCloudLocationsRequest) |
| 127 |
if err := dec(in); err != nil { |
| 128 |
return nil, err |
| 129 |
} |
| 130 |
if interceptor == nil { |
| 131 |
return srv.(CloudLocationFinderServer).ListCloudLocations(ctx, in) |
| 132 |
} |
| 133 |
info := &grpc.UnaryServerInfo{ |
| 134 |
Server: srv, |
| 135 |
FullMethod: CloudLocationFinder_ListCloudLocations_FullMethodName, |
| 136 |
} |
| 137 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 138 |
return srv.(CloudLocationFinderServer).ListCloudLocations(ctx, req.(*ListCloudLocationsRequest)) |
| 139 |
} |
| 140 |
return interceptor(ctx, in, info, handler) |
| 141 |
} |
| 142 |
|
| 143 |
func _CloudLocationFinder_GetCloudLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 144 |
in := new(GetCloudLocationRequest) |
| 145 |
if err := dec(in); err != nil { |
| 146 |
return nil, err |
| 147 |
} |
| 148 |
if interceptor == nil { |
| 149 |
return srv.(CloudLocationFinderServer).GetCloudLocation(ctx, in) |
| 150 |
} |
| 151 |
info := &grpc.UnaryServerInfo{ |
| 152 |
Server: srv, |
| 153 |
FullMethod: CloudLocationFinder_GetCloudLocation_FullMethodName, |
| 154 |
} |
| 155 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 156 |
return srv.(CloudLocationFinderServer).GetCloudLocation(ctx, req.(*GetCloudLocationRequest)) |
| 157 |
} |
| 158 |
return interceptor(ctx, in, info, handler) |
| 159 |
} |
| 160 |
|
| 161 |
func _CloudLocationFinder_SearchCloudLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 162 |
in := new(SearchCloudLocationsRequest) |
| 163 |
if err := dec(in); err != nil { |
| 164 |
return nil, err |
| 165 |
} |
| 166 |
if interceptor == nil { |
| 167 |
return srv.(CloudLocationFinderServer).SearchCloudLocations(ctx, in) |
| 168 |
} |
| 169 |
info := &grpc.UnaryServerInfo{ |
| 170 |
Server: srv, |
| 171 |
FullMethod: CloudLocationFinder_SearchCloudLocations_FullMethodName, |
| 172 |
} |
| 173 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 174 |
return srv.(CloudLocationFinderServer).SearchCloudLocations(ctx, req.(*SearchCloudLocationsRequest)) |
| 175 |
} |
| 176 |
return interceptor(ctx, in, info, handler) |
| 177 |
} |
| 178 |
|
| 179 |
// CloudLocationFinder_ServiceDesc is the grpc.ServiceDesc for CloudLocationFinder service. |
| 180 |
// It's only intended for direct use with grpc.RegisterService, |
| 181 |
// and not to be introspected or modified (even as a copy) |
| 182 |
var CloudLocationFinder_ServiceDesc = grpc.ServiceDesc{ |
| 183 |
ServiceName: "google.cloud.locationfinder.v1.CloudLocationFinder", |
| 184 |
HandlerType: (*CloudLocationFinderServer)(nil), |
| 185 |
Methods: []grpc.MethodDesc{ |
| 186 |
{ |
| 187 |
MethodName: "ListCloudLocations", |
| 188 |
Handler: _CloudLocationFinder_ListCloudLocations_Handler, |
| 189 |
}, |
| 190 |
{ |
| 191 |
MethodName: "GetCloudLocation", |
| 192 |
Handler: _CloudLocationFinder_GetCloudLocation_Handler, |
| 193 |
}, |
| 194 |
{ |
| 195 |
MethodName: "SearchCloudLocations", |
| 196 |
Handler: _CloudLocationFinder_SearchCloudLocations_Handler, |
| 197 |
}, |
| 198 |
}, |
| 199 |
Streams: []grpc.StreamDesc{}, |
| 200 |
Metadata: "google/cloud/locationfinder/v1/service.proto", |
| 201 |
} |