cloud.google.com/go/aiplatform@v1.106.0/apiv1/aiplatformpb/evaluation_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/v1/evaluation_service.proto 20 21 package aiplatformpb 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 EvaluationService_EvaluateInstances_FullMethodName = "/google.cloud.aiplatform.v1.EvaluationService/EvaluateInstances" 37 ) 38 39 // EvaluationServiceClient is the client API for EvaluationService service. 40 // 41 // 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. 42 type EvaluationServiceClient interface { 43 // Evaluates instances based on a given metric. 44 EvaluateInstances(ctx context.Context, in *EvaluateInstancesRequest, opts ...grpc.CallOption) (*EvaluateInstancesResponse, error) 45 } 46 47 type evaluationServiceClient struct { 48 cc grpc.ClientConnInterface 49 } 50 51 func NewEvaluationServiceClient(cc grpc.ClientConnInterface) EvaluationServiceClient { 52 return &evaluationServiceClient{cc} 53 } 54 55 func (c *evaluationServiceClient) EvaluateInstances(ctx context.Context, in *EvaluateInstancesRequest, opts ...grpc.CallOption) (*EvaluateInstancesResponse, error) { 56 out := new(EvaluateInstancesResponse) 57 err := c.cc.Invoke(ctx, EvaluationService_EvaluateInstances_FullMethodName, in, out, opts...) 58 if err != nil { 59 return nil, err 60 } 61 return out, nil 62 } 63 64 // EvaluationServiceServer is the server API for EvaluationService service. 65 // All implementations should embed UnimplementedEvaluationServiceServer 66 // for forward compatibility 67 type EvaluationServiceServer interface { 68 // Evaluates instances based on a given metric. 69 EvaluateInstances(context.Context, *EvaluateInstancesRequest) (*EvaluateInstancesResponse, error) 70 } 71 72 // UnimplementedEvaluationServiceServer should be embedded to have forward compatible implementations. 73 type UnimplementedEvaluationServiceServer struct { 74 } 75 76 func (UnimplementedEvaluationServiceServer) EvaluateInstances(context.Context, *EvaluateInstancesRequest) (*EvaluateInstancesResponse, error) { 77 return nil, status.Errorf(codes.Unimplemented, "method EvaluateInstances not implemented") 78 } 79 80 // UnsafeEvaluationServiceServer may be embedded to opt out of forward compatibility for this service. 81 // Use of this interface is not recommended, as added methods to EvaluationServiceServer will 82 // result in compilation errors. 83 type UnsafeEvaluationServiceServer interface { 84 mustEmbedUnimplementedEvaluationServiceServer() 85 } 86 87 func RegisterEvaluationServiceServer(s grpc.ServiceRegistrar, srv EvaluationServiceServer) { 88 s.RegisterService(&EvaluationService_ServiceDesc, srv) 89 } 90 91 func _EvaluationService_EvaluateInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 92 in := new(EvaluateInstancesRequest) 93 if err := dec(in); err != nil { 94 return nil, err 95 } 96 if interceptor == nil { 97 return srv.(EvaluationServiceServer).EvaluateInstances(ctx, in) 98 } 99 info := &grpc.UnaryServerInfo{ 100 Server: srv, 101 FullMethod: EvaluationService_EvaluateInstances_FullMethodName, 102 } 103 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 104 return srv.(EvaluationServiceServer).EvaluateInstances(ctx, req.(*EvaluateInstancesRequest)) 105 } 106 return interceptor(ctx, in, info, handler) 107 } 108 109 // EvaluationService_ServiceDesc is the grpc.ServiceDesc for EvaluationService service. 110 // It's only intended for direct use with grpc.RegisterService, 111 // and not to be introspected or modified (even as a copy) 112 var EvaluationService_ServiceDesc = grpc.ServiceDesc{ 113 ServiceName: "google.cloud.aiplatform.v1.EvaluationService", 114 HandlerType: (*EvaluationServiceServer)(nil), 115 Methods: []grpc.MethodDesc{ 116 { 117 MethodName: "EvaluateInstances", 118 Handler: _EvaluationService_EvaluateInstances_Handler, 119 }, 120 }, 121 Streams: []grpc.StreamDesc{}, 122 Metadata: "google/cloud/aiplatform/v1/evaluation_service.proto", 123 }