Debian Codegraph @

apigeeregistry/apiv1/apigeeregistrypb/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/apigeeregistry/v1/provisioning_service.proto
20
21 package apigeeregistrypb
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_CreateInstance_FullMethodName = "/google.cloud.apigeeregistry.v1.Provisioning/CreateInstance"
38 Provisioning_DeleteInstance_FullMethodName = "/google.cloud.apigeeregistry.v1.Provisioning/DeleteInstance"
39 Provisioning_GetInstance_FullMethodName = "/google.cloud.apigeeregistry.v1.Provisioning/GetInstance"
40 )
41
42 // ProvisioningClient is the client API for Provisioning 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 ProvisioningClient interface {
46 // Provisions instance resources for the Registry.
47 CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
48 // Deletes the Registry instance.
49 DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
50 // Gets details of a single Instance.
51 GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
52 }
53
54 type provisioningClient struct {
55 cc grpc.ClientConnInterface
56 }
57
58 func NewProvisioningClient(cc grpc.ClientConnInterface) ProvisioningClient {
59 return &provisioningClient{cc}
60 }
61
62 func (c *provisioningClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
63 out := new(longrunningpb.Operation)
64 err := c.cc.Invoke(ctx, Provisioning_CreateInstance_FullMethodName, in, out, opts...)
65 if err != nil {
66 return nil, err
67 }
68 return out, nil
69 }
70
71 func (c *provisioningClient) DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
72 out := new(longrunningpb.Operation)
73 err := c.cc.Invoke(ctx, Provisioning_DeleteInstance_FullMethodName, in, out, opts...)
74 if err != nil {
75 return nil, err
76 }
77 return out, nil
78 }
79
80 func (c *provisioningClient) GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) {
81 out := new(Instance)
82 err := c.cc.Invoke(ctx, Provisioning_GetInstance_FullMethodName, in, out, opts...)
83 if err != nil {
84 return nil, err
85 }
86 return out, nil
87 }
88
89 // ProvisioningServer is the server API for Provisioning service.
90 // All implementations should embed UnimplementedProvisioningServer
91 // for forward compatibility
92 type ProvisioningServer interface {
93 // Provisions instance resources for the Registry.
94 CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error)
95 // Deletes the Registry instance.
96 DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error)
97 // Gets details of a single Instance.
98 GetInstance(context.Context, *GetInstanceRequest) (*Instance, error)
99 }
100
101 // UnimplementedProvisioningServer should be embedded to have forward compatible implementations.
102 type UnimplementedProvisioningServer struct {
103 }
104
105 func (UnimplementedProvisioningServer) CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error) {
106 return nil, status.Errorf(codes.Unimplemented, "method CreateInstance not implemented")
107 }
108 func (UnimplementedProvisioningServer) DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error) {
109 return nil, status.Errorf(codes.Unimplemented, "method DeleteInstance not implemented")
110 }
111 func (UnimplementedProvisioningServer) GetInstance(context.Context, *GetInstanceRequest) (*Instance, error) {
112 return nil, status.Errorf(codes.Unimplemented, "method GetInstance not implemented")
113 }
114
115 // UnsafeProvisioningServer may be embedded to opt out of forward compatibility for this service.
116 // Use of this interface is not recommended, as added methods to ProvisioningServer will
117 // result in compilation errors.
118 type UnsafeProvisioningServer interface {
119 mustEmbedUnimplementedProvisioningServer()
120 }
121
122 func RegisterProvisioningServer(s grpc.ServiceRegistrar, srv ProvisioningServer) {
123 s.RegisterService(&Provisioning_ServiceDesc, srv)
124 }
125
126 func _Provisioning_CreateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
127 in := new(CreateInstanceRequest)
128 if err := dec(in); err != nil {
129 return nil, err
130 }
131 if interceptor == nil {
132 return srv.(ProvisioningServer).CreateInstance(ctx, in)
133 }
134 info := &grpc.UnaryServerInfo{
135 Server: srv,
136 FullMethod: Provisioning_CreateInstance_FullMethodName,
137 }
138 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
139 return srv.(ProvisioningServer).CreateInstance(ctx, req.(*CreateInstanceRequest))
140 }
141 return interceptor(ctx, in, info, handler)
142 }
143
144 func _Provisioning_DeleteInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
145 in := new(DeleteInstanceRequest)
146 if err := dec(in); err != nil {
147 return nil, err
148 }
149 if interceptor == nil {
150 return srv.(ProvisioningServer).DeleteInstance(ctx, in)
151 }
152 info := &grpc.UnaryServerInfo{
153 Server: srv,
154 FullMethod: Provisioning_DeleteInstance_FullMethodName,
155 }
156 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
157 return srv.(ProvisioningServer).DeleteInstance(ctx, req.(*DeleteInstanceRequest))
158 }
159 return interceptor(ctx, in, info, handler)
160 }
161
162 func _Provisioning_GetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
163 in := new(GetInstanceRequest)
164 if err := dec(in); err != nil {
165 return nil, err
166 }
167 if interceptor == nil {
168 return srv.(ProvisioningServer).GetInstance(ctx, in)
169 }
170 info := &grpc.UnaryServerInfo{
171 Server: srv,
172 FullMethod: Provisioning_GetInstance_FullMethodName,
173 }
174 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
175 return srv.(ProvisioningServer).GetInstance(ctx, req.(*GetInstanceRequest))
176 }
177 return interceptor(ctx, in, info, handler)
178 }
179
180 // Provisioning_ServiceDesc is the grpc.ServiceDesc for Provisioning service.
181 // It's only intended for direct use with grpc.RegisterService,
182 // and not to be introspected or modified (even as a copy)
183 var Provisioning_ServiceDesc = grpc.ServiceDesc{
184 ServiceName: "google.cloud.apigeeregistry.v1.Provisioning",
185 HandlerType: (*ProvisioningServer)(nil),
186 Methods: []grpc.MethodDesc{
187 {
188 MethodName: "CreateInstance",
189 Handler: _Provisioning_CreateInstance_Handler,
190 },
191 {
192 MethodName: "DeleteInstance",
193 Handler: _Provisioning_DeleteInstance_Handler,
194 },
195 {
196 MethodName: "GetInstance",
197 Handler: _Provisioning_GetInstance_Handler,
198 },
199 },
200 Streams: []grpc.StreamDesc{},
201 Metadata: "google/cloud/apigeeregistry/v1/provisioning_service.proto",
202 }