Debian Codegraph @

apihub/apiv1/apihubpb/provisioning_service_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/apihub/v1/provisioning_service.proto
20
21 package apihubpb
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 Provisioning_CreateApiHubInstance_FullMethodName = "/google.cloud.apihub.v1.Provisioning/CreateApiHubInstance"
38 Provisioning_DeleteApiHubInstance_FullMethodName = "/google.cloud.apihub.v1.Provisioning/DeleteApiHubInstance"
39 Provisioning_GetApiHubInstance_FullMethodName = "/google.cloud.apihub.v1.Provisioning/GetApiHubInstance"
40 Provisioning_LookupApiHubInstance_FullMethodName = "/google.cloud.apihub.v1.Provisioning/LookupApiHubInstance"
41 )
42
43 // ProvisioningClient is the client API for Provisioning service.
44 //
45 // 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.
46 type ProvisioningClient interface {
47 // Provisions instance resources for the API Hub.
48 CreateApiHubInstance(ctx context.Context, in *CreateApiHubInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
49 // Deletes the API hub instance.
50 DeleteApiHubInstance(ctx context.Context, in *DeleteApiHubInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
51 // Gets details of a single API Hub instance.
52 GetApiHubInstance(ctx context.Context, in *GetApiHubInstanceRequest, opts ...grpc.CallOption) (*ApiHubInstance, error)
53 // Looks up an Api Hub instance in a given GCP project. There will always be
54 // only one Api Hub instance for a GCP project across all locations.
55 LookupApiHubInstance(ctx context.Context, in *LookupApiHubInstanceRequest, opts ...grpc.CallOption) (*LookupApiHubInstanceResponse, error)
56 }
57
58 type provisioningClient struct {
59 cc grpc.ClientConnInterface
60 }
61
62 func NewProvisioningClient(cc grpc.ClientConnInterface) ProvisioningClient {
63 return &provisioningClient{cc}
64 }
65
66 func (c *provisioningClient) CreateApiHubInstance(ctx context.Context, in *CreateApiHubInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
67 out := new(longrunningpb.Operation)
68 err := c.cc.Invoke(ctx, Provisioning_CreateApiHubInstance_FullMethodName, in, out, opts...)
69 if err != nil {
70 return nil, err
71 }
72 return out, nil
73 }
74
75 func (c *provisioningClient) DeleteApiHubInstance(ctx context.Context, in *DeleteApiHubInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
76 out := new(longrunningpb.Operation)
77 err := c.cc.Invoke(ctx, Provisioning_DeleteApiHubInstance_FullMethodName, in, out, opts...)
78 if err != nil {
79 return nil, err
80 }
81 return out, nil
82 }
83
84 func (c *provisioningClient) GetApiHubInstance(ctx context.Context, in *GetApiHubInstanceRequest, opts ...grpc.CallOption) (*ApiHubInstance, error) {
85 out := new(ApiHubInstance)
86 err := c.cc.Invoke(ctx, Provisioning_GetApiHubInstance_FullMethodName, in, out, opts...)
87 if err != nil {
88 return nil, err
89 }
90 return out, nil
91 }
92
93 func (c *provisioningClient) LookupApiHubInstance(ctx context.Context, in *LookupApiHubInstanceRequest, opts ...grpc.CallOption) (*LookupApiHubInstanceResponse, error) {
94 out := new(LookupApiHubInstanceResponse)
95 err := c.cc.Invoke(ctx, Provisioning_LookupApiHubInstance_FullMethodName, in, out, opts...)
96 if err != nil {
97 return nil, err
98 }
99 return out, nil
100 }
101
102 // ProvisioningServer is the server API for Provisioning service.
103 // All implementations should embed UnimplementedProvisioningServer
104 // for forward compatibility
105 type ProvisioningServer interface {
106 // Provisions instance resources for the API Hub.
107 CreateApiHubInstance(context.Context, *CreateApiHubInstanceRequest) (*longrunningpb.Operation, error)
108 // Deletes the API hub instance.
109 DeleteApiHubInstance(context.Context, *DeleteApiHubInstanceRequest) (*longrunningpb.Operation, error)
110 // Gets details of a single API Hub instance.
111 GetApiHubInstance(context.Context, *GetApiHubInstanceRequest) (*ApiHubInstance, error)
112 // Looks up an Api Hub instance in a given GCP project. There will always be
113 // only one Api Hub instance for a GCP project across all locations.
114 LookupApiHubInstance(context.Context, *LookupApiHubInstanceRequest) (*LookupApiHubInstanceResponse, error)
115 }
116
117 // UnimplementedProvisioningServer should be embedded to have forward compatible implementations.
118 type UnimplementedProvisioningServer struct {
119 }
120
121 func (UnimplementedProvisioningServer) CreateApiHubInstance(context.Context, *CreateApiHubInstanceRequest) (*longrunningpb.Operation, error) {
122 return nil, status.Errorf(codes.Unimplemented, "method CreateApiHubInstance not implemented")
123 }
124 func (UnimplementedProvisioningServer) DeleteApiHubInstance(context.Context, *DeleteApiHubInstanceRequest) (*longrunningpb.Operation, error) {
125 return nil, status.Errorf(codes.Unimplemented, "method DeleteApiHubInstance not implemented")
126 }
127 func (UnimplementedProvisioningServer) GetApiHubInstance(context.Context, *GetApiHubInstanceRequest) (*ApiHubInstance, error) {
128 return nil, status.Errorf(codes.Unimplemented, "method GetApiHubInstance not implemented")
129 }
130 func (UnimplementedProvisioningServer) LookupApiHubInstance(context.Context, *LookupApiHubInstanceRequest) (*LookupApiHubInstanceResponse, error) {
131 return nil, status.Errorf(codes.Unimplemented, "method LookupApiHubInstance not implemented")
132 }
133
134 // UnsafeProvisioningServer may be embedded to opt out of forward compatibility for this service.
135 // Use of this interface is not recommended, as added methods to ProvisioningServer will
136 // result in compilation errors.
137 type UnsafeProvisioningServer interface {
138 mustEmbedUnimplementedProvisioningServer()
139 }
140
141 func RegisterProvisioningServer(s grpc.ServiceRegistrar, srv ProvisioningServer) {
142 s.RegisterService(&Provisioning_ServiceDesc, srv)
143 }
144
145 func _Provisioning_CreateApiHubInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
146 in := new(CreateApiHubInstanceRequest)
147 if err := dec(in); err != nil {
148 return nil, err
149 }
150 if interceptor == nil {
151 return srv.(ProvisioningServer).CreateApiHubInstance(ctx, in)
152 }
153 info := &grpc.UnaryServerInfo{
154 Server: srv,
155 FullMethod: Provisioning_CreateApiHubInstance_FullMethodName,
156 }
157 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
158 return srv.(ProvisioningServer).CreateApiHubInstance(ctx, req.(*CreateApiHubInstanceRequest))
159 }
160 return interceptor(ctx, in, info, handler)
161 }
162
163 func _Provisioning_DeleteApiHubInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
164 in := new(DeleteApiHubInstanceRequest)
165 if err := dec(in); err != nil {
166 return nil, err
167 }
168 if interceptor == nil {
169 return srv.(ProvisioningServer).DeleteApiHubInstance(ctx, in)
170 }
171 info := &grpc.UnaryServerInfo{
172 Server: srv,
173 FullMethod: Provisioning_DeleteApiHubInstance_FullMethodName,
174 }
175 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
176 return srv.(ProvisioningServer).DeleteApiHubInstance(ctx, req.(*DeleteApiHubInstanceRequest))
177 }
178 return interceptor(ctx, in, info, handler)
179 }
180
181 func _Provisioning_GetApiHubInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
182 in := new(GetApiHubInstanceRequest)
183 if err := dec(in); err != nil {
184 return nil, err
185 }
186 if interceptor == nil {
187 return srv.(ProvisioningServer).GetApiHubInstance(ctx, in)
188 }
189 info := &grpc.UnaryServerInfo{
190 Server: srv,
191 FullMethod: Provisioning_GetApiHubInstance_FullMethodName,
192 }
193 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
194 return srv.(ProvisioningServer).GetApiHubInstance(ctx, req.(*GetApiHubInstanceRequest))
195 }
196 return interceptor(ctx, in, info, handler)
197 }
198
199 func _Provisioning_LookupApiHubInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
200 in := new(LookupApiHubInstanceRequest)
201 if err := dec(in); err != nil {
202 return nil, err
203 }
204 if interceptor == nil {
205 return srv.(ProvisioningServer).LookupApiHubInstance(ctx, in)
206 }
207 info := &grpc.UnaryServerInfo{
208 Server: srv,
209 FullMethod: Provisioning_LookupApiHubInstance_FullMethodName,
210 }
211 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
212 return srv.(ProvisioningServer).LookupApiHubInstance(ctx, req.(*LookupApiHubInstanceRequest))
213 }
214 return interceptor(ctx, in, info, handler)
215 }
216
217 // Provisioning_ServiceDesc is the grpc.ServiceDesc for Provisioning service.
218 // It's only intended for direct use with grpc.RegisterService,
219 // and not to be introspected or modified (even as a copy)
220 var Provisioning_ServiceDesc = grpc.ServiceDesc{
221 ServiceName: "google.cloud.apihub.v1.Provisioning",
222 HandlerType: (*ProvisioningServer)(nil),
223 Methods: []grpc.MethodDesc{
224 {
225 MethodName: "CreateApiHubInstance",
226 Handler: _Provisioning_CreateApiHubInstance_Handler,
227 },
228 {
229 MethodName: "DeleteApiHubInstance",
230 Handler: _Provisioning_DeleteApiHubInstance_Handler,
231 },
232 {
233 MethodName: "GetApiHubInstance",
234 Handler: _Provisioning_GetApiHubInstance_Handler,
235 },
236 {
237 MethodName: "LookupApiHubInstance",
238 Handler: _Provisioning_LookupApiHubInstance_Handler,
239 },
240 },
241 Streams: []grpc.StreamDesc{},
242 Metadata: "google/cloud/apihub/v1/provisioning_service.proto",
243 }