| 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/apihub/v1/discovery_service.proto |
| 20 |
|
| 21 |
package apihubpb |
| 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 |
ApiHubDiscovery_ListDiscoveredApiObservations_FullMethodName = "/google.cloud.apihub.v1.ApiHubDiscovery/ListDiscoveredApiObservations" |
| 37 |
ApiHubDiscovery_GetDiscoveredApiObservation_FullMethodName = "/google.cloud.apihub.v1.ApiHubDiscovery/GetDiscoveredApiObservation" |
| 38 |
ApiHubDiscovery_ListDiscoveredApiOperations_FullMethodName = "/google.cloud.apihub.v1.ApiHubDiscovery/ListDiscoveredApiOperations" |
| 39 |
ApiHubDiscovery_GetDiscoveredApiOperation_FullMethodName = "/google.cloud.apihub.v1.ApiHubDiscovery/GetDiscoveredApiOperation" |
| 40 |
) |
| 41 |
|
| 42 |
// ApiHubDiscoveryClient is the client API for ApiHubDiscovery service. |
| 43 |
// |
| 44 |
// 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. |
| 45 |
type ApiHubDiscoveryClient interface { |
| 46 |
// Lists all the DiscoveredAPIObservations in a given project and location. |
| 47 |
ListDiscoveredApiObservations(ctx context.Context, in *ListDiscoveredApiObservationsRequest, opts ...grpc.CallOption) (*ListDiscoveredApiObservationsResponse, error) |
| 48 |
// Gets a DiscoveredAPIObservation in a given project, location and |
| 49 |
// ApiObservation. |
| 50 |
GetDiscoveredApiObservation(ctx context.Context, in *GetDiscoveredApiObservationRequest, opts ...grpc.CallOption) (*DiscoveredApiObservation, error) |
| 51 |
// Lists all the DiscoveredAPIOperations in a given project, location and |
| 52 |
// ApiObservation. |
| 53 |
ListDiscoveredApiOperations(ctx context.Context, in *ListDiscoveredApiOperationsRequest, opts ...grpc.CallOption) (*ListDiscoveredApiOperationsResponse, error) |
| 54 |
// Gets a DiscoveredAPIOperation in a given project, location, |
| 55 |
// ApiObservation and ApiOperation. |
| 56 |
GetDiscoveredApiOperation(ctx context.Context, in *GetDiscoveredApiOperationRequest, opts ...grpc.CallOption) (*DiscoveredApiOperation, error) |
| 57 |
} |
| 58 |
|
| 59 |
type apiHubDiscoveryClient struct { |
| 60 |
cc grpc.ClientConnInterface |
| 61 |
} |
| 62 |
|
| 63 |
func NewApiHubDiscoveryClient(cc grpc.ClientConnInterface) ApiHubDiscoveryClient { |
| 64 |
return &apiHubDiscoveryClient{cc} |
| 65 |
} |
| 66 |
|
| 67 |
func (c *apiHubDiscoveryClient) ListDiscoveredApiObservations(ctx context.Context, in *ListDiscoveredApiObservationsRequest, opts ...grpc.CallOption) (*ListDiscoveredApiObservationsResponse, error) { |
| 68 |
out := new(ListDiscoveredApiObservationsResponse) |
| 69 |
err := c.cc.Invoke(ctx, ApiHubDiscovery_ListDiscoveredApiObservations_FullMethodName, in, out, opts...) |
| 70 |
if err != nil { |
| 71 |
return nil, err |
| 72 |
} |
| 73 |
return out, nil |
| 74 |
} |
| 75 |
|
| 76 |
func (c *apiHubDiscoveryClient) GetDiscoveredApiObservation(ctx context.Context, in *GetDiscoveredApiObservationRequest, opts ...grpc.CallOption) (*DiscoveredApiObservation, error) { |
| 77 |
out := new(DiscoveredApiObservation) |
| 78 |
err := c.cc.Invoke(ctx, ApiHubDiscovery_GetDiscoveredApiObservation_FullMethodName, in, out, opts...) |
| 79 |
if err != nil { |
| 80 |
return nil, err |
| 81 |
} |
| 82 |
return out, nil |
| 83 |
} |
| 84 |
|
| 85 |
func (c *apiHubDiscoveryClient) ListDiscoveredApiOperations(ctx context.Context, in *ListDiscoveredApiOperationsRequest, opts ...grpc.CallOption) (*ListDiscoveredApiOperationsResponse, error) { |
| 86 |
out := new(ListDiscoveredApiOperationsResponse) |
| 87 |
err := c.cc.Invoke(ctx, ApiHubDiscovery_ListDiscoveredApiOperations_FullMethodName, in, out, opts...) |
| 88 |
if err != nil { |
| 89 |
return nil, err |
| 90 |
} |
| 91 |
return out, nil |
| 92 |
} |
| 93 |
|
| 94 |
func (c *apiHubDiscoveryClient) GetDiscoveredApiOperation(ctx context.Context, in *GetDiscoveredApiOperationRequest, opts ...grpc.CallOption) (*DiscoveredApiOperation, error) { |
| 95 |
out := new(DiscoveredApiOperation) |
| 96 |
err := c.cc.Invoke(ctx, ApiHubDiscovery_GetDiscoveredApiOperation_FullMethodName, in, out, opts...) |
| 97 |
if err != nil { |
| 98 |
return nil, err |
| 99 |
} |
| 100 |
return out, nil |
| 101 |
} |
| 102 |
|
| 103 |
// ApiHubDiscoveryServer is the server API for ApiHubDiscovery service. |
| 104 |
// All implementations should embed UnimplementedApiHubDiscoveryServer |
| 105 |
// for forward compatibility |
| 106 |
type ApiHubDiscoveryServer interface { |
| 107 |
// Lists all the DiscoveredAPIObservations in a given project and location. |
| 108 |
ListDiscoveredApiObservations(context.Context, *ListDiscoveredApiObservationsRequest) (*ListDiscoveredApiObservationsResponse, error) |
| 109 |
// Gets a DiscoveredAPIObservation in a given project, location and |
| 110 |
// ApiObservation. |
| 111 |
GetDiscoveredApiObservation(context.Context, *GetDiscoveredApiObservationRequest) (*DiscoveredApiObservation, error) |
| 112 |
// Lists all the DiscoveredAPIOperations in a given project, location and |
| 113 |
// ApiObservation. |
| 114 |
ListDiscoveredApiOperations(context.Context, *ListDiscoveredApiOperationsRequest) (*ListDiscoveredApiOperationsResponse, error) |
| 115 |
// Gets a DiscoveredAPIOperation in a given project, location, |
| 116 |
// ApiObservation and ApiOperation. |
| 117 |
GetDiscoveredApiOperation(context.Context, *GetDiscoveredApiOperationRequest) (*DiscoveredApiOperation, error) |
| 118 |
} |
| 119 |
|
| 120 |
// UnimplementedApiHubDiscoveryServer should be embedded to have forward compatible implementations. |
| 121 |
type UnimplementedApiHubDiscoveryServer struct { |
| 122 |
} |
| 123 |
|
| 124 |
func (UnimplementedApiHubDiscoveryServer) ListDiscoveredApiObservations(context.Context, *ListDiscoveredApiObservationsRequest) (*ListDiscoveredApiObservationsResponse, error) { |
| 125 |
return nil, status.Errorf(codes.Unimplemented, "method ListDiscoveredApiObservations not implemented") |
| 126 |
} |
| 127 |
func (UnimplementedApiHubDiscoveryServer) GetDiscoveredApiObservation(context.Context, *GetDiscoveredApiObservationRequest) (*DiscoveredApiObservation, error) { |
| 128 |
return nil, status.Errorf(codes.Unimplemented, "method GetDiscoveredApiObservation not implemented") |
| 129 |
} |
| 130 |
func (UnimplementedApiHubDiscoveryServer) ListDiscoveredApiOperations(context.Context, *ListDiscoveredApiOperationsRequest) (*ListDiscoveredApiOperationsResponse, error) { |
| 131 |
return nil, status.Errorf(codes.Unimplemented, "method ListDiscoveredApiOperations not implemented") |
| 132 |
} |
| 133 |
func (UnimplementedApiHubDiscoveryServer) GetDiscoveredApiOperation(context.Context, *GetDiscoveredApiOperationRequest) (*DiscoveredApiOperation, error) { |
| 134 |
return nil, status.Errorf(codes.Unimplemented, "method GetDiscoveredApiOperation not implemented") |
| 135 |
} |
| 136 |
|
| 137 |
// UnsafeApiHubDiscoveryServer may be embedded to opt out of forward compatibility for this service. |
| 138 |
// Use of this interface is not recommended, as added methods to ApiHubDiscoveryServer will |
| 139 |
// result in compilation errors. |
| 140 |
type UnsafeApiHubDiscoveryServer interface { |
| 141 |
mustEmbedUnimplementedApiHubDiscoveryServer() |
| 142 |
} |
| 143 |
|
| 144 |
func RegisterApiHubDiscoveryServer(s grpc.ServiceRegistrar, srv ApiHubDiscoveryServer) { |
| 145 |
s.RegisterService(&ApiHubDiscovery_ServiceDesc, srv) |
| 146 |
} |
| 147 |
|
| 148 |
func _ApiHubDiscovery_ListDiscoveredApiObservations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 149 |
in := new(ListDiscoveredApiObservationsRequest) |
| 150 |
if err := dec(in); err != nil { |
| 151 |
return nil, err |
| 152 |
} |
| 153 |
if interceptor == nil { |
| 154 |
return srv.(ApiHubDiscoveryServer).ListDiscoveredApiObservations(ctx, in) |
| 155 |
} |
| 156 |
info := &grpc.UnaryServerInfo{ |
| 157 |
Server: srv, |
| 158 |
FullMethod: ApiHubDiscovery_ListDiscoveredApiObservations_FullMethodName, |
| 159 |
} |
| 160 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 161 |
return srv.(ApiHubDiscoveryServer).ListDiscoveredApiObservations(ctx, req.(*ListDiscoveredApiObservationsRequest)) |
| 162 |
} |
| 163 |
return interceptor(ctx, in, info, handler) |
| 164 |
} |
| 165 |
|
| 166 |
func _ApiHubDiscovery_GetDiscoveredApiObservation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 167 |
in := new(GetDiscoveredApiObservationRequest) |
| 168 |
if err := dec(in); err != nil { |
| 169 |
return nil, err |
| 170 |
} |
| 171 |
if interceptor == nil { |
| 172 |
return srv.(ApiHubDiscoveryServer).GetDiscoveredApiObservation(ctx, in) |
| 173 |
} |
| 174 |
info := &grpc.UnaryServerInfo{ |
| 175 |
Server: srv, |
| 176 |
FullMethod: ApiHubDiscovery_GetDiscoveredApiObservation_FullMethodName, |
| 177 |
} |
| 178 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 179 |
return srv.(ApiHubDiscoveryServer).GetDiscoveredApiObservation(ctx, req.(*GetDiscoveredApiObservationRequest)) |
| 180 |
} |
| 181 |
return interceptor(ctx, in, info, handler) |
| 182 |
} |
| 183 |
|
| 184 |
func _ApiHubDiscovery_ListDiscoveredApiOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 185 |
in := new(ListDiscoveredApiOperationsRequest) |
| 186 |
if err := dec(in); err != nil { |
| 187 |
return nil, err |
| 188 |
} |
| 189 |
if interceptor == nil { |
| 190 |
return srv.(ApiHubDiscoveryServer).ListDiscoveredApiOperations(ctx, in) |
| 191 |
} |
| 192 |
info := &grpc.UnaryServerInfo{ |
| 193 |
Server: srv, |
| 194 |
FullMethod: ApiHubDiscovery_ListDiscoveredApiOperations_FullMethodName, |
| 195 |
} |
| 196 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 197 |
return srv.(ApiHubDiscoveryServer).ListDiscoveredApiOperations(ctx, req.(*ListDiscoveredApiOperationsRequest)) |
| 198 |
} |
| 199 |
return interceptor(ctx, in, info, handler) |
| 200 |
} |
| 201 |
|
| 202 |
func _ApiHubDiscovery_GetDiscoveredApiOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 203 |
in := new(GetDiscoveredApiOperationRequest) |
| 204 |
if err := dec(in); err != nil { |
| 205 |
return nil, err |
| 206 |
} |
| 207 |
if interceptor == nil { |
| 208 |
return srv.(ApiHubDiscoveryServer).GetDiscoveredApiOperation(ctx, in) |
| 209 |
} |
| 210 |
info := &grpc.UnaryServerInfo{ |
| 211 |
Server: srv, |
| 212 |
FullMethod: ApiHubDiscovery_GetDiscoveredApiOperation_FullMethodName, |
| 213 |
} |
| 214 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 215 |
return srv.(ApiHubDiscoveryServer).GetDiscoveredApiOperation(ctx, req.(*GetDiscoveredApiOperationRequest)) |
| 216 |
} |
| 217 |
return interceptor(ctx, in, info, handler) |
| 218 |
} |
| 219 |
|
| 220 |
// ApiHubDiscovery_ServiceDesc is the grpc.ServiceDesc for ApiHubDiscovery service. |
| 221 |
// It's only intended for direct use with grpc.RegisterService, |
| 222 |
// and not to be introspected or modified (even as a copy) |
| 223 |
var ApiHubDiscovery_ServiceDesc = grpc.ServiceDesc{ |
| 224 |
ServiceName: "google.cloud.apihub.v1.ApiHubDiscovery", |
| 225 |
HandlerType: (*ApiHubDiscoveryServer)(nil), |
| 226 |
Methods: []grpc.MethodDesc{ |
| 227 |
{ |
| 228 |
MethodName: "ListDiscoveredApiObservations", |
| 229 |
Handler: _ApiHubDiscovery_ListDiscoveredApiObservations_Handler, |
| 230 |
}, |
| 231 |
{ |
| 232 |
MethodName: "GetDiscoveredApiObservation", |
| 233 |
Handler: _ApiHubDiscovery_GetDiscoveredApiObservation_Handler, |
| 234 |
}, |
| 235 |
{ |
| 236 |
MethodName: "ListDiscoveredApiOperations", |
| 237 |
Handler: _ApiHubDiscovery_ListDiscoveredApiOperations_Handler, |
| 238 |
}, |
| 239 |
{ |
| 240 |
MethodName: "GetDiscoveredApiOperation", |
| 241 |
Handler: _ApiHubDiscovery_GetDiscoveredApiOperation_Handler, |
| 242 |
}, |
| 243 |
}, |
| 244 |
Streams: []grpc.StreamDesc{}, |
| 245 |
Metadata: "google/cloud/apihub/v1/discovery_service.proto", |
| 246 |
} |