| 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/runtime_project_attachment_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 |
emptypb "google.golang.org/protobuf/types/known/emptypb" |
| 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 |
RuntimeProjectAttachmentService_CreateRuntimeProjectAttachment_FullMethodName = "/google.cloud.apihub.v1.RuntimeProjectAttachmentService/CreateRuntimeProjectAttachment" |
| 38 |
RuntimeProjectAttachmentService_GetRuntimeProjectAttachment_FullMethodName = "/google.cloud.apihub.v1.RuntimeProjectAttachmentService/GetRuntimeProjectAttachment" |
| 39 |
RuntimeProjectAttachmentService_ListRuntimeProjectAttachments_FullMethodName = "/google.cloud.apihub.v1.RuntimeProjectAttachmentService/ListRuntimeProjectAttachments" |
| 40 |
RuntimeProjectAttachmentService_DeleteRuntimeProjectAttachment_FullMethodName = "/google.cloud.apihub.v1.RuntimeProjectAttachmentService/DeleteRuntimeProjectAttachment" |
| 41 |
RuntimeProjectAttachmentService_LookupRuntimeProjectAttachment_FullMethodName = "/google.cloud.apihub.v1.RuntimeProjectAttachmentService/LookupRuntimeProjectAttachment" |
| 42 |
) |
| 43 |
|
| 44 |
// RuntimeProjectAttachmentServiceClient is the client API for RuntimeProjectAttachmentService service. |
| 45 |
// |
| 46 |
// 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. |
| 47 |
type RuntimeProjectAttachmentServiceClient interface { |
| 48 |
// Attaches a runtime project to the host project. |
| 49 |
CreateRuntimeProjectAttachment(ctx context.Context, in *CreateRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*RuntimeProjectAttachment, error) |
| 50 |
// Gets a runtime project attachment. |
| 51 |
GetRuntimeProjectAttachment(ctx context.Context, in *GetRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*RuntimeProjectAttachment, error) |
| 52 |
// List runtime projects attached to the host project. |
| 53 |
ListRuntimeProjectAttachments(ctx context.Context, in *ListRuntimeProjectAttachmentsRequest, opts ...grpc.CallOption) (*ListRuntimeProjectAttachmentsResponse, error) |
| 54 |
// Delete a runtime project attachment in the API Hub. This call will detach |
| 55 |
// the runtime project from the host project. |
| 56 |
DeleteRuntimeProjectAttachment(ctx context.Context, in *DeleteRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 57 |
// Look up a runtime project attachment. This API can be called in the context |
| 58 |
// of any project. |
| 59 |
LookupRuntimeProjectAttachment(ctx context.Context, in *LookupRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*LookupRuntimeProjectAttachmentResponse, error) |
| 60 |
} |
| 61 |
|
| 62 |
type runtimeProjectAttachmentServiceClient struct { |
| 63 |
cc grpc.ClientConnInterface |
| 64 |
} |
| 65 |
|
| 66 |
func NewRuntimeProjectAttachmentServiceClient(cc grpc.ClientConnInterface) RuntimeProjectAttachmentServiceClient { |
| 67 |
return &runtimeProjectAttachmentServiceClient{cc} |
| 68 |
} |
| 69 |
|
| 70 |
func (c *runtimeProjectAttachmentServiceClient) CreateRuntimeProjectAttachment(ctx context.Context, in *CreateRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*RuntimeProjectAttachment, error) { |
| 71 |
out := new(RuntimeProjectAttachment) |
| 72 |
err := c.cc.Invoke(ctx, RuntimeProjectAttachmentService_CreateRuntimeProjectAttachment_FullMethodName, in, out, opts...) |
| 73 |
if err != nil { |
| 74 |
return nil, err |
| 75 |
} |
| 76 |
return out, nil |
| 77 |
} |
| 78 |
|
| 79 |
func (c *runtimeProjectAttachmentServiceClient) GetRuntimeProjectAttachment(ctx context.Context, in *GetRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*RuntimeProjectAttachment, error) { |
| 80 |
out := new(RuntimeProjectAttachment) |
| 81 |
err := c.cc.Invoke(ctx, RuntimeProjectAttachmentService_GetRuntimeProjectAttachment_FullMethodName, in, out, opts...) |
| 82 |
if err != nil { |
| 83 |
return nil, err |
| 84 |
} |
| 85 |
return out, nil |
| 86 |
} |
| 87 |
|
| 88 |
func (c *runtimeProjectAttachmentServiceClient) ListRuntimeProjectAttachments(ctx context.Context, in *ListRuntimeProjectAttachmentsRequest, opts ...grpc.CallOption) (*ListRuntimeProjectAttachmentsResponse, error) { |
| 89 |
out := new(ListRuntimeProjectAttachmentsResponse) |
| 90 |
err := c.cc.Invoke(ctx, RuntimeProjectAttachmentService_ListRuntimeProjectAttachments_FullMethodName, in, out, opts...) |
| 91 |
if err != nil { |
| 92 |
return nil, err |
| 93 |
} |
| 94 |
return out, nil |
| 95 |
} |
| 96 |
|
| 97 |
func (c *runtimeProjectAttachmentServiceClient) DeleteRuntimeProjectAttachment(ctx context.Context, in *DeleteRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 98 |
out := new(emptypb.Empty) |
| 99 |
err := c.cc.Invoke(ctx, RuntimeProjectAttachmentService_DeleteRuntimeProjectAttachment_FullMethodName, in, out, opts...) |
| 100 |
if err != nil { |
| 101 |
return nil, err |
| 102 |
} |
| 103 |
return out, nil |
| 104 |
} |
| 105 |
|
| 106 |
func (c *runtimeProjectAttachmentServiceClient) LookupRuntimeProjectAttachment(ctx context.Context, in *LookupRuntimeProjectAttachmentRequest, opts ...grpc.CallOption) (*LookupRuntimeProjectAttachmentResponse, error) { |
| 107 |
out := new(LookupRuntimeProjectAttachmentResponse) |
| 108 |
err := c.cc.Invoke(ctx, RuntimeProjectAttachmentService_LookupRuntimeProjectAttachment_FullMethodName, in, out, opts...) |
| 109 |
if err != nil { |
| 110 |
return nil, err |
| 111 |
} |
| 112 |
return out, nil |
| 113 |
} |
| 114 |
|
| 115 |
// RuntimeProjectAttachmentServiceServer is the server API for RuntimeProjectAttachmentService service. |
| 116 |
// All implementations should embed UnimplementedRuntimeProjectAttachmentServiceServer |
| 117 |
// for forward compatibility |
| 118 |
type RuntimeProjectAttachmentServiceServer interface { |
| 119 |
// Attaches a runtime project to the host project. |
| 120 |
CreateRuntimeProjectAttachment(context.Context, *CreateRuntimeProjectAttachmentRequest) (*RuntimeProjectAttachment, error) |
| 121 |
// Gets a runtime project attachment. |
| 122 |
GetRuntimeProjectAttachment(context.Context, *GetRuntimeProjectAttachmentRequest) (*RuntimeProjectAttachment, error) |
| 123 |
// List runtime projects attached to the host project. |
| 124 |
ListRuntimeProjectAttachments(context.Context, *ListRuntimeProjectAttachmentsRequest) (*ListRuntimeProjectAttachmentsResponse, error) |
| 125 |
// Delete a runtime project attachment in the API Hub. This call will detach |
| 126 |
// the runtime project from the host project. |
| 127 |
DeleteRuntimeProjectAttachment(context.Context, *DeleteRuntimeProjectAttachmentRequest) (*emptypb.Empty, error) |
| 128 |
// Look up a runtime project attachment. This API can be called in the context |
| 129 |
// of any project. |
| 130 |
LookupRuntimeProjectAttachment(context.Context, *LookupRuntimeProjectAttachmentRequest) (*LookupRuntimeProjectAttachmentResponse, error) |
| 131 |
} |
| 132 |
|
| 133 |
// UnimplementedRuntimeProjectAttachmentServiceServer should be embedded to have forward compatible implementations. |
| 134 |
type UnimplementedRuntimeProjectAttachmentServiceServer struct { |
| 135 |
} |
| 136 |
|
| 137 |
func (UnimplementedRuntimeProjectAttachmentServiceServer) CreateRuntimeProjectAttachment(context.Context, *CreateRuntimeProjectAttachmentRequest) (*RuntimeProjectAttachment, error) { |
| 138 |
return nil, status.Errorf(codes.Unimplemented, "method CreateRuntimeProjectAttachment not implemented") |
| 139 |
} |
| 140 |
func (UnimplementedRuntimeProjectAttachmentServiceServer) GetRuntimeProjectAttachment(context.Context, *GetRuntimeProjectAttachmentRequest) (*RuntimeProjectAttachment, error) { |
| 141 |
return nil, status.Errorf(codes.Unimplemented, "method GetRuntimeProjectAttachment not implemented") |
| 142 |
} |
| 143 |
func (UnimplementedRuntimeProjectAttachmentServiceServer) ListRuntimeProjectAttachments(context.Context, *ListRuntimeProjectAttachmentsRequest) (*ListRuntimeProjectAttachmentsResponse, error) { |
| 144 |
return nil, status.Errorf(codes.Unimplemented, "method ListRuntimeProjectAttachments not implemented") |
| 145 |
} |
| 146 |
func (UnimplementedRuntimeProjectAttachmentServiceServer) DeleteRuntimeProjectAttachment(context.Context, *DeleteRuntimeProjectAttachmentRequest) (*emptypb.Empty, error) { |
| 147 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteRuntimeProjectAttachment not implemented") |
| 148 |
} |
| 149 |
func (UnimplementedRuntimeProjectAttachmentServiceServer) LookupRuntimeProjectAttachment(context.Context, *LookupRuntimeProjectAttachmentRequest) (*LookupRuntimeProjectAttachmentResponse, error) { |
| 150 |
return nil, status.Errorf(codes.Unimplemented, "method LookupRuntimeProjectAttachment not implemented") |
| 151 |
} |
| 152 |
|
| 153 |
// UnsafeRuntimeProjectAttachmentServiceServer may be embedded to opt out of forward compatibility for this service. |
| 154 |
// Use of this interface is not recommended, as added methods to RuntimeProjectAttachmentServiceServer will |
| 155 |
// result in compilation errors. |
| 156 |
type UnsafeRuntimeProjectAttachmentServiceServer interface { |
| 157 |
mustEmbedUnimplementedRuntimeProjectAttachmentServiceServer() |
| 158 |
} |
| 159 |
|
| 160 |
func RegisterRuntimeProjectAttachmentServiceServer(s grpc.ServiceRegistrar, srv RuntimeProjectAttachmentServiceServer) { |
| 161 |
s.RegisterService(&RuntimeProjectAttachmentService_ServiceDesc, srv) |
| 162 |
} |
| 163 |
|
| 164 |
func _RuntimeProjectAttachmentService_CreateRuntimeProjectAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 165 |
in := new(CreateRuntimeProjectAttachmentRequest) |
| 166 |
if err := dec(in); err != nil { |
| 167 |
return nil, err |
| 168 |
} |
| 169 |
if interceptor == nil { |
| 170 |
return srv.(RuntimeProjectAttachmentServiceServer).CreateRuntimeProjectAttachment(ctx, in) |
| 171 |
} |
| 172 |
info := &grpc.UnaryServerInfo{ |
| 173 |
Server: srv, |
| 174 |
FullMethod: RuntimeProjectAttachmentService_CreateRuntimeProjectAttachment_FullMethodName, |
| 175 |
} |
| 176 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 177 |
return srv.(RuntimeProjectAttachmentServiceServer).CreateRuntimeProjectAttachment(ctx, req.(*CreateRuntimeProjectAttachmentRequest)) |
| 178 |
} |
| 179 |
return interceptor(ctx, in, info, handler) |
| 180 |
} |
| 181 |
|
| 182 |
func _RuntimeProjectAttachmentService_GetRuntimeProjectAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 183 |
in := new(GetRuntimeProjectAttachmentRequest) |
| 184 |
if err := dec(in); err != nil { |
| 185 |
return nil, err |
| 186 |
} |
| 187 |
if interceptor == nil { |
| 188 |
return srv.(RuntimeProjectAttachmentServiceServer).GetRuntimeProjectAttachment(ctx, in) |
| 189 |
} |
| 190 |
info := &grpc.UnaryServerInfo{ |
| 191 |
Server: srv, |
| 192 |
FullMethod: RuntimeProjectAttachmentService_GetRuntimeProjectAttachment_FullMethodName, |
| 193 |
} |
| 194 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 195 |
return srv.(RuntimeProjectAttachmentServiceServer).GetRuntimeProjectAttachment(ctx, req.(*GetRuntimeProjectAttachmentRequest)) |
| 196 |
} |
| 197 |
return interceptor(ctx, in, info, handler) |
| 198 |
} |
| 199 |
|
| 200 |
func _RuntimeProjectAttachmentService_ListRuntimeProjectAttachments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 201 |
in := new(ListRuntimeProjectAttachmentsRequest) |
| 202 |
if err := dec(in); err != nil { |
| 203 |
return nil, err |
| 204 |
} |
| 205 |
if interceptor == nil { |
| 206 |
return srv.(RuntimeProjectAttachmentServiceServer).ListRuntimeProjectAttachments(ctx, in) |
| 207 |
} |
| 208 |
info := &grpc.UnaryServerInfo{ |
| 209 |
Server: srv, |
| 210 |
FullMethod: RuntimeProjectAttachmentService_ListRuntimeProjectAttachments_FullMethodName, |
| 211 |
} |
| 212 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 213 |
return srv.(RuntimeProjectAttachmentServiceServer).ListRuntimeProjectAttachments(ctx, req.(*ListRuntimeProjectAttachmentsRequest)) |
| 214 |
} |
| 215 |
return interceptor(ctx, in, info, handler) |
| 216 |
} |
| 217 |
|
| 218 |
func _RuntimeProjectAttachmentService_DeleteRuntimeProjectAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 219 |
in := new(DeleteRuntimeProjectAttachmentRequest) |
| 220 |
if err := dec(in); err != nil { |
| 221 |
return nil, err |
| 222 |
} |
| 223 |
if interceptor == nil { |
| 224 |
return srv.(RuntimeProjectAttachmentServiceServer).DeleteRuntimeProjectAttachment(ctx, in) |
| 225 |
} |
| 226 |
info := &grpc.UnaryServerInfo{ |
| 227 |
Server: srv, |
| 228 |
FullMethod: RuntimeProjectAttachmentService_DeleteRuntimeProjectAttachment_FullMethodName, |
| 229 |
} |
| 230 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 231 |
return srv.(RuntimeProjectAttachmentServiceServer).DeleteRuntimeProjectAttachment(ctx, req.(*DeleteRuntimeProjectAttachmentRequest)) |
| 232 |
} |
| 233 |
return interceptor(ctx, in, info, handler) |
| 234 |
} |
| 235 |
|
| 236 |
func _RuntimeProjectAttachmentService_LookupRuntimeProjectAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 237 |
in := new(LookupRuntimeProjectAttachmentRequest) |
| 238 |
if err := dec(in); err != nil { |
| 239 |
return nil, err |
| 240 |
} |
| 241 |
if interceptor == nil { |
| 242 |
return srv.(RuntimeProjectAttachmentServiceServer).LookupRuntimeProjectAttachment(ctx, in) |
| 243 |
} |
| 244 |
info := &grpc.UnaryServerInfo{ |
| 245 |
Server: srv, |
| 246 |
FullMethod: RuntimeProjectAttachmentService_LookupRuntimeProjectAttachment_FullMethodName, |
| 247 |
} |
| 248 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 249 |
return srv.(RuntimeProjectAttachmentServiceServer).LookupRuntimeProjectAttachment(ctx, req.(*LookupRuntimeProjectAttachmentRequest)) |
| 250 |
} |
| 251 |
return interceptor(ctx, in, info, handler) |
| 252 |
} |
| 253 |
|
| 254 |
// RuntimeProjectAttachmentService_ServiceDesc is the grpc.ServiceDesc for RuntimeProjectAttachmentService service. |
| 255 |
// It's only intended for direct use with grpc.RegisterService, |
| 256 |
// and not to be introspected or modified (even as a copy) |
| 257 |
var RuntimeProjectAttachmentService_ServiceDesc = grpc.ServiceDesc{ |
| 258 |
ServiceName: "google.cloud.apihub.v1.RuntimeProjectAttachmentService", |
| 259 |
HandlerType: (*RuntimeProjectAttachmentServiceServer)(nil), |
| 260 |
Methods: []grpc.MethodDesc{ |
| 261 |
{ |
| 262 |
MethodName: "CreateRuntimeProjectAttachment", |
| 263 |
Handler: _RuntimeProjectAttachmentService_CreateRuntimeProjectAttachment_Handler, |
| 264 |
}, |
| 265 |
{ |
| 266 |
MethodName: "GetRuntimeProjectAttachment", |
| 267 |
Handler: _RuntimeProjectAttachmentService_GetRuntimeProjectAttachment_Handler, |
| 268 |
}, |
| 269 |
{ |
| 270 |
MethodName: "ListRuntimeProjectAttachments", |
| 271 |
Handler: _RuntimeProjectAttachmentService_ListRuntimeProjectAttachments_Handler, |
| 272 |
}, |
| 273 |
{ |
| 274 |
MethodName: "DeleteRuntimeProjectAttachment", |
| 275 |
Handler: _RuntimeProjectAttachmentService_DeleteRuntimeProjectAttachment_Handler, |
| 276 |
}, |
| 277 |
{ |
| 278 |
MethodName: "LookupRuntimeProjectAttachment", |
| 279 |
Handler: _RuntimeProjectAttachmentService_LookupRuntimeProjectAttachment_Handler, |
| 280 |
}, |
| 281 |
}, |
| 282 |
Streams: []grpc.StreamDesc{}, |
| 283 |
Metadata: "google/cloud/apihub/v1/runtime_project_attachment_service.proto", |
| 284 |
} |