cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/aiplatformpb/model_garden_service_grpc.pb.go (about) 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/aiplatform/v1beta1/model_garden_service.proto 20 21 package aiplatformpb 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 ModelGardenService_GetPublisherModel_FullMethodName = "/google.cloud.aiplatform.v1beta1.ModelGardenService/GetPublisherModel" 38 ModelGardenService_ListPublisherModels_FullMethodName = "/google.cloud.aiplatform.v1beta1.ModelGardenService/ListPublisherModels" 39 ModelGardenService_Deploy_FullMethodName = "/google.cloud.aiplatform.v1beta1.ModelGardenService/Deploy" 40 ModelGardenService_DeployPublisherModel_FullMethodName = "/google.cloud.aiplatform.v1beta1.ModelGardenService/DeployPublisherModel" 41 ModelGardenService_ExportPublisherModel_FullMethodName = "/google.cloud.aiplatform.v1beta1.ModelGardenService/ExportPublisherModel" 42 ModelGardenService_CheckPublisherModelEulaAcceptance_FullMethodName = "/google.cloud.aiplatform.v1beta1.ModelGardenService/CheckPublisherModelEulaAcceptance" 43 ModelGardenService_AcceptPublisherModelEula_FullMethodName = "/google.cloud.aiplatform.v1beta1.ModelGardenService/AcceptPublisherModelEula" 44 ) 45 46 // ModelGardenServiceClient is the client API for ModelGardenService service. 47 // 48 // 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. 49 type ModelGardenServiceClient interface { 50 // Gets a Model Garden publisher model. 51 GetPublisherModel(ctx context.Context, in *GetPublisherModelRequest, opts ...grpc.CallOption) (*PublisherModel, error) 52 // Lists publisher models in Model Garden. 53 ListPublisherModels(ctx context.Context, in *ListPublisherModelsRequest, opts ...grpc.CallOption) (*ListPublisherModelsResponse, error) 54 // Deploys a model to a new endpoint. 55 Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 56 // Deprecated: Do not use. 57 // Deploys publisher models. 58 DeployPublisherModel(ctx context.Context, in *DeployPublisherModelRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 59 // Exports a publisher model to a user provided Google Cloud Storage bucket. 60 ExportPublisherModel(ctx context.Context, in *ExportPublisherModelRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 61 // Checks the EULA acceptance status of a publisher model. 62 CheckPublisherModelEulaAcceptance(ctx context.Context, in *CheckPublisherModelEulaAcceptanceRequest, opts ...grpc.CallOption) (*PublisherModelEulaAcceptance, error) 63 // Accepts the EULA acceptance status of a publisher model. 64 AcceptPublisherModelEula(ctx context.Context, in *AcceptPublisherModelEulaRequest, opts ...grpc.CallOption) (*PublisherModelEulaAcceptance, error) 65 } 66 67 type modelGardenServiceClient struct { 68 cc grpc.ClientConnInterface 69 } 70 71 func NewModelGardenServiceClient(cc grpc.ClientConnInterface) ModelGardenServiceClient { 72 return &modelGardenServiceClient{cc} 73 } 74 75 func (c *modelGardenServiceClient) GetPublisherModel(ctx context.Context, in *GetPublisherModelRequest, opts ...grpc.CallOption) (*PublisherModel, error) { 76 out := new(PublisherModel) 77 err := c.cc.Invoke(ctx, ModelGardenService_GetPublisherModel_FullMethodName, in, out, opts...) 78 if err != nil { 79 return nil, err 80 } 81 return out, nil 82 } 83 84 func (c *modelGardenServiceClient) ListPublisherModels(ctx context.Context, in *ListPublisherModelsRequest, opts ...grpc.CallOption) (*ListPublisherModelsResponse, error) { 85 out := new(ListPublisherModelsResponse) 86 err := c.cc.Invoke(ctx, ModelGardenService_ListPublisherModels_FullMethodName, in, out, opts...) 87 if err != nil { 88 return nil, err 89 } 90 return out, nil 91 } 92 93 func (c *modelGardenServiceClient) Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 94 out := new(longrunningpb.Operation) 95 err := c.cc.Invoke(ctx, ModelGardenService_Deploy_FullMethodName, in, out, opts...) 96 if err != nil { 97 return nil, err 98 } 99 return out, nil 100 } 101 102 // Deprecated: Do not use. 103 func (c *modelGardenServiceClient) DeployPublisherModel(ctx context.Context, in *DeployPublisherModelRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 104 out := new(longrunningpb.Operation) 105 err := c.cc.Invoke(ctx, ModelGardenService_DeployPublisherModel_FullMethodName, in, out, opts...) 106 if err != nil { 107 return nil, err 108 } 109 return out, nil 110 } 111 112 func (c *modelGardenServiceClient) ExportPublisherModel(ctx context.Context, in *ExportPublisherModelRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 113 out := new(longrunningpb.Operation) 114 err := c.cc.Invoke(ctx, ModelGardenService_ExportPublisherModel_FullMethodName, in, out, opts...) 115 if err != nil { 116 return nil, err 117 } 118 return out, nil 119 } 120 121 func (c *modelGardenServiceClient) CheckPublisherModelEulaAcceptance(ctx context.Context, in *CheckPublisherModelEulaAcceptanceRequest, opts ...grpc.CallOption) (*PublisherModelEulaAcceptance, error) { 122 out := new(PublisherModelEulaAcceptance) 123 err := c.cc.Invoke(ctx, ModelGardenService_CheckPublisherModelEulaAcceptance_FullMethodName, in, out, opts...) 124 if err != nil { 125 return nil, err 126 } 127 return out, nil 128 } 129 130 func (c *modelGardenServiceClient) AcceptPublisherModelEula(ctx context.Context, in *AcceptPublisherModelEulaRequest, opts ...grpc.CallOption) (*PublisherModelEulaAcceptance, error) { 131 out := new(PublisherModelEulaAcceptance) 132 err := c.cc.Invoke(ctx, ModelGardenService_AcceptPublisherModelEula_FullMethodName, in, out, opts...) 133 if err != nil { 134 return nil, err 135 } 136 return out, nil 137 } 138 139 // ModelGardenServiceServer is the server API for ModelGardenService service. 140 // All implementations should embed UnimplementedModelGardenServiceServer 141 // for forward compatibility 142 type ModelGardenServiceServer interface { 143 // Gets a Model Garden publisher model. 144 GetPublisherModel(context.Context, *GetPublisherModelRequest) (*PublisherModel, error) 145 // Lists publisher models in Model Garden. 146 ListPublisherModels(context.Context, *ListPublisherModelsRequest) (*ListPublisherModelsResponse, error) 147 // Deploys a model to a new endpoint. 148 Deploy(context.Context, *DeployRequest) (*longrunningpb.Operation, error) 149 // Deprecated: Do not use. 150 // Deploys publisher models. 151 DeployPublisherModel(context.Context, *DeployPublisherModelRequest) (*longrunningpb.Operation, error) 152 // Exports a publisher model to a user provided Google Cloud Storage bucket. 153 ExportPublisherModel(context.Context, *ExportPublisherModelRequest) (*longrunningpb.Operation, error) 154 // Checks the EULA acceptance status of a publisher model. 155 CheckPublisherModelEulaAcceptance(context.Context, *CheckPublisherModelEulaAcceptanceRequest) (*PublisherModelEulaAcceptance, error) 156 // Accepts the EULA acceptance status of a publisher model. 157 AcceptPublisherModelEula(context.Context, *AcceptPublisherModelEulaRequest) (*PublisherModelEulaAcceptance, error) 158 } 159 160 // UnimplementedModelGardenServiceServer should be embedded to have forward compatible implementations. 161 type UnimplementedModelGardenServiceServer struct { 162 } 163 164 func (UnimplementedModelGardenServiceServer) GetPublisherModel(context.Context, *GetPublisherModelRequest) (*PublisherModel, error) { 165 return nil, status.Errorf(codes.Unimplemented, "method GetPublisherModel not implemented") 166 } 167 func (UnimplementedModelGardenServiceServer) ListPublisherModels(context.Context, *ListPublisherModelsRequest) (*ListPublisherModelsResponse, error) { 168 return nil, status.Errorf(codes.Unimplemented, "method ListPublisherModels not implemented") 169 } 170 func (UnimplementedModelGardenServiceServer) Deploy(context.Context, *DeployRequest) (*longrunningpb.Operation, error) { 171 return nil, status.Errorf(codes.Unimplemented, "method Deploy not implemented") 172 } 173 func (UnimplementedModelGardenServiceServer) DeployPublisherModel(context.Context, *DeployPublisherModelRequest) (*longrunningpb.Operation, error) { 174 return nil, status.Errorf(codes.Unimplemented, "method DeployPublisherModel not implemented") 175 } 176 func (UnimplementedModelGardenServiceServer) ExportPublisherModel(context.Context, *ExportPublisherModelRequest) (*longrunningpb.Operation, error) { 177 return nil, status.Errorf(codes.Unimplemented, "method ExportPublisherModel not implemented") 178 } 179 func (UnimplementedModelGardenServiceServer) CheckPublisherModelEulaAcceptance(context.Context, *CheckPublisherModelEulaAcceptanceRequest) (*PublisherModelEulaAcceptance, error) { 180 return nil, status.Errorf(codes.Unimplemented, "method CheckPublisherModelEulaAcceptance not implemented") 181 } 182 func (UnimplementedModelGardenServiceServer) AcceptPublisherModelEula(context.Context, *AcceptPublisherModelEulaRequest) (*PublisherModelEulaAcceptance, error) { 183 return nil, status.Errorf(codes.Unimplemented, "method AcceptPublisherModelEula not implemented") 184 } 185 186 // UnsafeModelGardenServiceServer may be embedded to opt out of forward compatibility for this service. 187 // Use of this interface is not recommended, as added methods to ModelGardenServiceServer will 188 // result in compilation errors. 189 type UnsafeModelGardenServiceServer interface { 190 mustEmbedUnimplementedModelGardenServiceServer() 191 } 192 193 func RegisterModelGardenServiceServer(s grpc.ServiceRegistrar, srv ModelGardenServiceServer) { 194 s.RegisterService(&ModelGardenService_ServiceDesc, srv) 195 } 196 197 func _ModelGardenService_GetPublisherModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 198 in := new(GetPublisherModelRequest) 199 if err := dec(in); err != nil { 200 return nil, err 201 } 202 if interceptor == nil { 203 return srv.(ModelGardenServiceServer).GetPublisherModel(ctx, in) 204 } 205 info := &grpc.UnaryServerInfo{ 206 Server: srv, 207 FullMethod: ModelGardenService_GetPublisherModel_FullMethodName, 208 } 209 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 210 return srv.(ModelGardenServiceServer).GetPublisherModel(ctx, req.(*GetPublisherModelRequest)) 211 } 212 return interceptor(ctx, in, info, handler) 213 } 214 215 func _ModelGardenService_ListPublisherModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 216 in := new(ListPublisherModelsRequest) 217 if err := dec(in); err != nil { 218 return nil, err 219 } 220 if interceptor == nil { 221 return srv.(ModelGardenServiceServer).ListPublisherModels(ctx, in) 222 } 223 info := &grpc.UnaryServerInfo{ 224 Server: srv, 225 FullMethod: ModelGardenService_ListPublisherModels_FullMethodName, 226 } 227 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 228 return srv.(ModelGardenServiceServer).ListPublisherModels(ctx, req.(*ListPublisherModelsRequest)) 229 } 230 return interceptor(ctx, in, info, handler) 231 } 232 233 func _ModelGardenService_Deploy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 234 in := new(DeployRequest) 235 if err := dec(in); err != nil { 236 return nil, err 237 } 238 if interceptor == nil { 239 return srv.(ModelGardenServiceServer).Deploy(ctx, in) 240 } 241 info := &grpc.UnaryServerInfo{ 242 Server: srv, 243 FullMethod: ModelGardenService_Deploy_FullMethodName, 244 } 245 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 246 return srv.(ModelGardenServiceServer).Deploy(ctx, req.(*DeployRequest)) 247 } 248 return interceptor(ctx, in, info, handler) 249 } 250 251 func _ModelGardenService_DeployPublisherModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 252 in := new(DeployPublisherModelRequest) 253 if err := dec(in); err != nil { 254 return nil, err 255 } 256 if interceptor == nil { 257 return srv.(ModelGardenServiceServer).DeployPublisherModel(ctx, in) 258 } 259 info := &grpc.UnaryServerInfo{ 260 Server: srv, 261 FullMethod: ModelGardenService_DeployPublisherModel_FullMethodName, 262 } 263 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 264 return srv.(ModelGardenServiceServer).DeployPublisherModel(ctx, req.(*DeployPublisherModelRequest)) 265 } 266 return interceptor(ctx, in, info, handler) 267 } 268 269 func _ModelGardenService_ExportPublisherModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 270 in := new(ExportPublisherModelRequest) 271 if err := dec(in); err != nil { 272 return nil, err 273 } 274 if interceptor == nil { 275 return srv.(ModelGardenServiceServer).ExportPublisherModel(ctx, in) 276 } 277 info := &grpc.UnaryServerInfo{ 278 Server: srv, 279 FullMethod: ModelGardenService_ExportPublisherModel_FullMethodName, 280 } 281 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 282 return srv.(ModelGardenServiceServer).ExportPublisherModel(ctx, req.(*ExportPublisherModelRequest)) 283 } 284 return interceptor(ctx, in, info, handler) 285 } 286 287 func _ModelGardenService_CheckPublisherModelEulaAcceptance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 288 in := new(CheckPublisherModelEulaAcceptanceRequest) 289 if err := dec(in); err != nil { 290 return nil, err 291 } 292 if interceptor == nil { 293 return srv.(ModelGardenServiceServer).CheckPublisherModelEulaAcceptance(ctx, in) 294 } 295 info := &grpc.UnaryServerInfo{ 296 Server: srv, 297 FullMethod: ModelGardenService_CheckPublisherModelEulaAcceptance_FullMethodName, 298 } 299 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 300 return srv.(ModelGardenServiceServer).CheckPublisherModelEulaAcceptance(ctx, req.(*CheckPublisherModelEulaAcceptanceRequest)) 301 } 302 return interceptor(ctx, in, info, handler) 303 } 304 305 func _ModelGardenService_AcceptPublisherModelEula_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 306 in := new(AcceptPublisherModelEulaRequest) 307 if err := dec(in); err != nil { 308 return nil, err 309 } 310 if interceptor == nil { 311 return srv.(ModelGardenServiceServer).AcceptPublisherModelEula(ctx, in) 312 } 313 info := &grpc.UnaryServerInfo{ 314 Server: srv, 315 FullMethod: ModelGardenService_AcceptPublisherModelEula_FullMethodName, 316 } 317 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 318 return srv.(ModelGardenServiceServer).AcceptPublisherModelEula(ctx, req.(*AcceptPublisherModelEulaRequest)) 319 } 320 return interceptor(ctx, in, info, handler) 321 } 322 323 // ModelGardenService_ServiceDesc is the grpc.ServiceDesc for ModelGardenService service. 324 // It's only intended for direct use with grpc.RegisterService, 325 // and not to be introspected or modified (even as a copy) 326 var ModelGardenService_ServiceDesc = grpc.ServiceDesc{ 327 ServiceName: "google.cloud.aiplatform.v1beta1.ModelGardenService", 328 HandlerType: (*ModelGardenServiceServer)(nil), 329 Methods: []grpc.MethodDesc{ 330 { 331 MethodName: "GetPublisherModel", 332 Handler: _ModelGardenService_GetPublisherModel_Handler, 333 }, 334 { 335 MethodName: "ListPublisherModels", 336 Handler: _ModelGardenService_ListPublisherModels_Handler, 337 }, 338 { 339 MethodName: "Deploy", 340 Handler: _ModelGardenService_Deploy_Handler, 341 }, 342 { 343 MethodName: "DeployPublisherModel", 344 Handler: _ModelGardenService_DeployPublisherModel_Handler, 345 }, 346 { 347 MethodName: "ExportPublisherModel", 348 Handler: _ModelGardenService_ExportPublisherModel_Handler, 349 }, 350 { 351 MethodName: "CheckPublisherModelEulaAcceptance", 352 Handler: _ModelGardenService_CheckPublisherModelEulaAcceptance_Handler, 353 }, 354 { 355 MethodName: "AcceptPublisherModelEula", 356 Handler: _ModelGardenService_AcceptPublisherModelEula_Handler, 357 }, 358 }, 359 Streams: []grpc.StreamDesc{}, 360 Metadata: "google/cloud/aiplatform/v1beta1/model_garden_service.proto", 361 }