cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/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/v1beta1/evaluation_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  	EvaluationService_EvaluateInstances_FullMethodName = "/google.cloud.aiplatform.v1beta1.EvaluationService/EvaluateInstances"
    38  	EvaluationService_EvaluateDataset_FullMethodName   = "/google.cloud.aiplatform.v1beta1.EvaluationService/EvaluateDataset"
    39  )
    40  
    41  // EvaluationServiceClient is the client API for EvaluationService 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 EvaluationServiceClient interface {
    45  	// Evaluates instances based on a given metric.
    46  	EvaluateInstances(ctx context.Context, in *EvaluateInstancesRequest, opts ...grpc.CallOption) (*EvaluateInstancesResponse, error)
    47  	// Evaluates a dataset based on a set of given metrics.
    48  	EvaluateDataset(ctx context.Context, in *EvaluateDatasetRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
    49  }
    50  
    51  type evaluationServiceClient struct {
    52  	cc grpc.ClientConnInterface
    53  }
    54  
    55  func NewEvaluationServiceClient(cc grpc.ClientConnInterface) EvaluationServiceClient {
    56  	return &evaluationServiceClient{cc}
    57  }
    58  
    59  func (c *evaluationServiceClient) EvaluateInstances(ctx context.Context, in *EvaluateInstancesRequest, opts ...grpc.CallOption) (*EvaluateInstancesResponse, error) {
    60  	out := new(EvaluateInstancesResponse)
    61  	err := c.cc.Invoke(ctx, EvaluationService_EvaluateInstances_FullMethodName, in, out, opts...)
    62  	if err != nil {
    63  		return nil, err
    64  	}
    65  	return out, nil
    66  }
    67  
    68  func (c *evaluationServiceClient) EvaluateDataset(ctx context.Context, in *EvaluateDatasetRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
    69  	out := new(longrunningpb.Operation)
    70  	err := c.cc.Invoke(ctx, EvaluationService_EvaluateDataset_FullMethodName, in, out, opts...)
    71  	if err != nil {
    72  		return nil, err
    73  	}
    74  	return out, nil
    75  }
    76  
    77  // EvaluationServiceServer is the server API for EvaluationService service.
    78  // All implementations should embed UnimplementedEvaluationServiceServer
    79  // for forward compatibility
    80  type EvaluationServiceServer interface {
    81  	// Evaluates instances based on a given metric.
    82  	EvaluateInstances(context.Context, *EvaluateInstancesRequest) (*EvaluateInstancesResponse, error)
    83  	// Evaluates a dataset based on a set of given metrics.
    84  	EvaluateDataset(context.Context, *EvaluateDatasetRequest) (*longrunningpb.Operation, error)
    85  }
    86  
    87  // UnimplementedEvaluationServiceServer should be embedded to have forward compatible implementations.
    88  type UnimplementedEvaluationServiceServer struct {
    89  }
    90  
    91  func (UnimplementedEvaluationServiceServer) EvaluateInstances(context.Context, *EvaluateInstancesRequest) (*EvaluateInstancesResponse, error) {
    92  	return nil, status.Errorf(codes.Unimplemented, "method EvaluateInstances not implemented")
    93  }
    94  func (UnimplementedEvaluationServiceServer) EvaluateDataset(context.Context, *EvaluateDatasetRequest) (*longrunningpb.Operation, error) {
    95  	return nil, status.Errorf(codes.Unimplemented, "method EvaluateDataset not implemented")
    96  }
    97  
    98  // UnsafeEvaluationServiceServer may be embedded to opt out of forward compatibility for this service.
    99  // Use of this interface is not recommended, as added methods to EvaluationServiceServer will
   100  // result in compilation errors.
   101  type UnsafeEvaluationServiceServer interface {
   102  	mustEmbedUnimplementedEvaluationServiceServer()
   103  }
   104  
   105  func RegisterEvaluationServiceServer(s grpc.ServiceRegistrar, srv EvaluationServiceServer) {
   106  	s.RegisterService(&EvaluationService_ServiceDesc, srv)
   107  }
   108  
   109  func _EvaluationService_EvaluateInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   110  	in := new(EvaluateInstancesRequest)
   111  	if err := dec(in); err != nil {
   112  		return nil, err
   113  	}
   114  	if interceptor == nil {
   115  		return srv.(EvaluationServiceServer).EvaluateInstances(ctx, in)
   116  	}
   117  	info := &grpc.UnaryServerInfo{
   118  		Server:     srv,
   119  		FullMethod: EvaluationService_EvaluateInstances_FullMethodName,
   120  	}
   121  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   122  		return srv.(EvaluationServiceServer).EvaluateInstances(ctx, req.(*EvaluateInstancesRequest))
   123  	}
   124  	return interceptor(ctx, in, info, handler)
   125  }
   126  
   127  func _EvaluationService_EvaluateDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   128  	in := new(EvaluateDatasetRequest)
   129  	if err := dec(in); err != nil {
   130  		return nil, err
   131  	}
   132  	if interceptor == nil {
   133  		return srv.(EvaluationServiceServer).EvaluateDataset(ctx, in)
   134  	}
   135  	info := &grpc.UnaryServerInfo{
   136  		Server:     srv,
   137  		FullMethod: EvaluationService_EvaluateDataset_FullMethodName,
   138  	}
   139  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   140  		return srv.(EvaluationServiceServer).EvaluateDataset(ctx, req.(*EvaluateDatasetRequest))
   141  	}
   142  	return interceptor(ctx, in, info, handler)
   143  }
   144  
   145  // EvaluationService_ServiceDesc is the grpc.ServiceDesc for EvaluationService service.
   146  // It's only intended for direct use with grpc.RegisterService,
   147  // and not to be introspected or modified (even as a copy)
   148  var EvaluationService_ServiceDesc = grpc.ServiceDesc{
   149  	ServiceName: "google.cloud.aiplatform.v1beta1.EvaluationService",
   150  	HandlerType: (*EvaluationServiceServer)(nil),
   151  	Methods: []grpc.MethodDesc{
   152  		{
   153  			MethodName: "EvaluateInstances",
   154  			Handler:    _EvaluationService_EvaluateInstances_Handler,
   155  		},
   156  		{
   157  			MethodName: "EvaluateDataset",
   158  			Handler:    _EvaluationService_EvaluateDataset_Handler,
   159  		},
   160  	},
   161  	Streams:  []grpc.StreamDesc{},
   162  	Metadata: "google/cloud/aiplatform/v1beta1/evaluation_service.proto",
   163  }