Debian Codegraph @

apihub/apiv1/apihubpb/host_project_registration_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/host_project_registration_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 HostProjectRegistrationService_CreateHostProjectRegistration_FullMethodName = "/google.cloud.apihub.v1.HostProjectRegistrationService/CreateHostProjectRegistration"
37 HostProjectRegistrationService_GetHostProjectRegistration_FullMethodName = "/google.cloud.apihub.v1.HostProjectRegistrationService/GetHostProjectRegistration"
38 HostProjectRegistrationService_ListHostProjectRegistrations_FullMethodName = "/google.cloud.apihub.v1.HostProjectRegistrationService/ListHostProjectRegistrations"
39 )
40
41 // HostProjectRegistrationServiceClient is the client API for HostProjectRegistrationService 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 HostProjectRegistrationServiceClient interface {
45 // Create a host project registration.
46 // A Google cloud project can be registered as a host project if it is not
47 // attached as a runtime project to another host project.
48 // A project can be registered as a host project only once. Subsequent
49 // register calls for the same project will fail.
50 CreateHostProjectRegistration(ctx context.Context, in *CreateHostProjectRegistrationRequest, opts ...grpc.CallOption) (*HostProjectRegistration, error)
51 // Get a host project registration.
52 GetHostProjectRegistration(ctx context.Context, in *GetHostProjectRegistrationRequest, opts ...grpc.CallOption) (*HostProjectRegistration, error)
53 // Lists host project registrations.
54 ListHostProjectRegistrations(ctx context.Context, in *ListHostProjectRegistrationsRequest, opts ...grpc.CallOption) (*ListHostProjectRegistrationsResponse, error)
55 }
56
57 type hostProjectRegistrationServiceClient struct {
58 cc grpc.ClientConnInterface
59 }
60
61 func NewHostProjectRegistrationServiceClient(cc grpc.ClientConnInterface) HostProjectRegistrationServiceClient {
62 return &hostProjectRegistrationServiceClient{cc}
63 }
64
65 func (c *hostProjectRegistrationServiceClient) CreateHostProjectRegistration(ctx context.Context, in *CreateHostProjectRegistrationRequest, opts ...grpc.CallOption) (*HostProjectRegistration, error) {
66 out := new(HostProjectRegistration)
67 err := c.cc.Invoke(ctx, HostProjectRegistrationService_CreateHostProjectRegistration_FullMethodName, in, out, opts...)
68 if err != nil {
69 return nil, err
70 }
71 return out, nil
72 }
73
74 func (c *hostProjectRegistrationServiceClient) GetHostProjectRegistration(ctx context.Context, in *GetHostProjectRegistrationRequest, opts ...grpc.CallOption) (*HostProjectRegistration, error) {
75 out := new(HostProjectRegistration)
76 err := c.cc.Invoke(ctx, HostProjectRegistrationService_GetHostProjectRegistration_FullMethodName, in, out, opts...)
77 if err != nil {
78 return nil, err
79 }
80 return out, nil
81 }
82
83 func (c *hostProjectRegistrationServiceClient) ListHostProjectRegistrations(ctx context.Context, in *ListHostProjectRegistrationsRequest, opts ...grpc.CallOption) (*ListHostProjectRegistrationsResponse, error) {
84 out := new(ListHostProjectRegistrationsResponse)
85 err := c.cc.Invoke(ctx, HostProjectRegistrationService_ListHostProjectRegistrations_FullMethodName, in, out, opts...)
86 if err != nil {
87 return nil, err
88 }
89 return out, nil
90 }
91
92 // HostProjectRegistrationServiceServer is the server API for HostProjectRegistrationService service.
93 // All implementations should embed UnimplementedHostProjectRegistrationServiceServer
94 // for forward compatibility
95 type HostProjectRegistrationServiceServer interface {
96 // Create a host project registration.
97 // A Google cloud project can be registered as a host project if it is not
98 // attached as a runtime project to another host project.
99 // A project can be registered as a host project only once. Subsequent
100 // register calls for the same project will fail.
101 CreateHostProjectRegistration(context.Context, *CreateHostProjectRegistrationRequest) (*HostProjectRegistration, error)
102 // Get a host project registration.
103 GetHostProjectRegistration(context.Context, *GetHostProjectRegistrationRequest) (*HostProjectRegistration, error)
104 // Lists host project registrations.
105 ListHostProjectRegistrations(context.Context, *ListHostProjectRegistrationsRequest) (*ListHostProjectRegistrationsResponse, error)
106 }
107
108 // UnimplementedHostProjectRegistrationServiceServer should be embedded to have forward compatible implementations.
109 type UnimplementedHostProjectRegistrationServiceServer struct {
110 }
111
112 func (UnimplementedHostProjectRegistrationServiceServer) CreateHostProjectRegistration(context.Context, *CreateHostProjectRegistrationRequest) (*HostProjectRegistration, error) {
113 return nil, status.Errorf(codes.Unimplemented, "method CreateHostProjectRegistration not implemented")
114 }
115 func (UnimplementedHostProjectRegistrationServiceServer) GetHostProjectRegistration(context.Context, *GetHostProjectRegistrationRequest) (*HostProjectRegistration, error) {
116 return nil, status.Errorf(codes.Unimplemented, "method GetHostProjectRegistration not implemented")
117 }
118 func (UnimplementedHostProjectRegistrationServiceServer) ListHostProjectRegistrations(context.Context, *ListHostProjectRegistrationsRequest) (*ListHostProjectRegistrationsResponse, error) {
119 return nil, status.Errorf(codes.Unimplemented, "method ListHostProjectRegistrations not implemented")
120 }
121
122 // UnsafeHostProjectRegistrationServiceServer may be embedded to opt out of forward compatibility for this service.
123 // Use of this interface is not recommended, as added methods to HostProjectRegistrationServiceServer will
124 // result in compilation errors.
125 type UnsafeHostProjectRegistrationServiceServer interface {
126 mustEmbedUnimplementedHostProjectRegistrationServiceServer()
127 }
128
129 func RegisterHostProjectRegistrationServiceServer(s grpc.ServiceRegistrar, srv HostProjectRegistrationServiceServer) {
130 s.RegisterService(&HostProjectRegistrationService_ServiceDesc, srv)
131 }
132
133 func _HostProjectRegistrationService_CreateHostProjectRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
134 in := new(CreateHostProjectRegistrationRequest)
135 if err := dec(in); err != nil {
136 return nil, err
137 }
138 if interceptor == nil {
139 return srv.(HostProjectRegistrationServiceServer).CreateHostProjectRegistration(ctx, in)
140 }
141 info := &grpc.UnaryServerInfo{
142 Server: srv,
143 FullMethod: HostProjectRegistrationService_CreateHostProjectRegistration_FullMethodName,
144 }
145 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
146 return srv.(HostProjectRegistrationServiceServer).CreateHostProjectRegistration(ctx, req.(*CreateHostProjectRegistrationRequest))
147 }
148 return interceptor(ctx, in, info, handler)
149 }
150
151 func _HostProjectRegistrationService_GetHostProjectRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
152 in := new(GetHostProjectRegistrationRequest)
153 if err := dec(in); err != nil {
154 return nil, err
155 }
156 if interceptor == nil {
157 return srv.(HostProjectRegistrationServiceServer).GetHostProjectRegistration(ctx, in)
158 }
159 info := &grpc.UnaryServerInfo{
160 Server: srv,
161 FullMethod: HostProjectRegistrationService_GetHostProjectRegistration_FullMethodName,
162 }
163 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
164 return srv.(HostProjectRegistrationServiceServer).GetHostProjectRegistration(ctx, req.(*GetHostProjectRegistrationRequest))
165 }
166 return interceptor(ctx, in, info, handler)
167 }
168
169 func _HostProjectRegistrationService_ListHostProjectRegistrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
170 in := new(ListHostProjectRegistrationsRequest)
171 if err := dec(in); err != nil {
172 return nil, err
173 }
174 if interceptor == nil {
175 return srv.(HostProjectRegistrationServiceServer).ListHostProjectRegistrations(ctx, in)
176 }
177 info := &grpc.UnaryServerInfo{
178 Server: srv,
179 FullMethod: HostProjectRegistrationService_ListHostProjectRegistrations_FullMethodName,
180 }
181 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
182 return srv.(HostProjectRegistrationServiceServer).ListHostProjectRegistrations(ctx, req.(*ListHostProjectRegistrationsRequest))
183 }
184 return interceptor(ctx, in, info, handler)
185 }
186
187 // HostProjectRegistrationService_ServiceDesc is the grpc.ServiceDesc for HostProjectRegistrationService service.
188 // It's only intended for direct use with grpc.RegisterService,
189 // and not to be introspected or modified (even as a copy)
190 var HostProjectRegistrationService_ServiceDesc = grpc.ServiceDesc{
191 ServiceName: "google.cloud.apihub.v1.HostProjectRegistrationService",
192 HandlerType: (*HostProjectRegistrationServiceServer)(nil),
193 Methods: []grpc.MethodDesc{
194 {
195 MethodName: "CreateHostProjectRegistration",
196 Handler: _HostProjectRegistrationService_CreateHostProjectRegistration_Handler,
197 },
198 {
199 MethodName: "GetHostProjectRegistration",
200 Handler: _HostProjectRegistrationService_GetHostProjectRegistration_Handler,
201 },
202 {
203 MethodName: "ListHostProjectRegistrations",
204 Handler: _HostProjectRegistrationService_ListHostProjectRegistrations_Handler,
205 },
206 },
207 Streams: []grpc.StreamDesc{},
208 Metadata: "google/cloud/apihub/v1/host_project_registration_service.proto",
209 }