// Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.31.1
// source: backend/api/v1beta1/experiment.proto

package go_client

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	ExperimentService_CreateExperimentV1_FullMethodName    = "/api.ExperimentService/CreateExperimentV1"
	ExperimentService_GetExperimentV1_FullMethodName       = "/api.ExperimentService/GetExperimentV1"
	ExperimentService_ListExperimentsV1_FullMethodName     = "/api.ExperimentService/ListExperimentsV1"
	ExperimentService_DeleteExperimentV1_FullMethodName    = "/api.ExperimentService/DeleteExperimentV1"
	ExperimentService_ArchiveExperimentV1_FullMethodName   = "/api.ExperimentService/ArchiveExperimentV1"
	ExperimentService_UnarchiveExperimentV1_FullMethodName = "/api.ExperimentService/UnarchiveExperimentV1"
)

// ExperimentServiceClient is the client API for ExperimentService service.
//
// 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.
type ExperimentServiceClient interface {
	// Creates a new experiment.
	CreateExperimentV1(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error)
	// Finds a specific experiment by ID.
	GetExperimentV1(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error)
	// Finds all experiments. Supports pagination, and sorting on certain fields.
	ListExperimentsV1(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error)
	// Deletes an experiment without deleting the experiment's runs and jobs. To
	// avoid unexpected behaviors, delete an experiment's runs and jobs before
	// deleting the experiment.
	DeleteExperimentV1(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Archives an experiment and the experiment's runs and jobs.
	ArchiveExperimentV1(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Restores an archived experiment. The experiment's archived runs and jobs
	// will stay archived.
	UnarchiveExperimentV1(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type experimentServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewExperimentServiceClient(cc grpc.ClientConnInterface) ExperimentServiceClient {
	return &experimentServiceClient{cc}
}

func (c *experimentServiceClient) CreateExperimentV1(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Experiment)
	err := c.cc.Invoke(ctx, ExperimentService_CreateExperimentV1_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *experimentServiceClient) GetExperimentV1(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Experiment)
	err := c.cc.Invoke(ctx, ExperimentService_GetExperimentV1_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *experimentServiceClient) ListExperimentsV1(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListExperimentsResponse)
	err := c.cc.Invoke(ctx, ExperimentService_ListExperimentsV1_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *experimentServiceClient) DeleteExperimentV1(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, ExperimentService_DeleteExperimentV1_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *experimentServiceClient) ArchiveExperimentV1(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, ExperimentService_ArchiveExperimentV1_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *experimentServiceClient) UnarchiveExperimentV1(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, ExperimentService_UnarchiveExperimentV1_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ExperimentServiceServer is the server API for ExperimentService service.
// All implementations must embed UnimplementedExperimentServiceServer
// for forward compatibility.
type ExperimentServiceServer interface {
	// Creates a new experiment.
	CreateExperimentV1(context.Context, *CreateExperimentRequest) (*Experiment, error)
	// Finds a specific experiment by ID.
	GetExperimentV1(context.Context, *GetExperimentRequest) (*Experiment, error)
	// Finds all experiments. Supports pagination, and sorting on certain fields.
	ListExperimentsV1(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error)
	// Deletes an experiment without deleting the experiment's runs and jobs. To
	// avoid unexpected behaviors, delete an experiment's runs and jobs before
	// deleting the experiment.
	DeleteExperimentV1(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error)
	// Archives an experiment and the experiment's runs and jobs.
	ArchiveExperimentV1(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error)
	// Restores an archived experiment. The experiment's archived runs and jobs
	// will stay archived.
	UnarchiveExperimentV1(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error)
	mustEmbedUnimplementedExperimentServiceServer()
}

// UnimplementedExperimentServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedExperimentServiceServer struct{}

func (UnimplementedExperimentServiceServer) CreateExperimentV1(context.Context, *CreateExperimentRequest) (*Experiment, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateExperimentV1 not implemented")
}
func (UnimplementedExperimentServiceServer) GetExperimentV1(context.Context, *GetExperimentRequest) (*Experiment, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetExperimentV1 not implemented")
}
func (UnimplementedExperimentServiceServer) ListExperimentsV1(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListExperimentsV1 not implemented")
}
func (UnimplementedExperimentServiceServer) DeleteExperimentV1(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteExperimentV1 not implemented")
}
func (UnimplementedExperimentServiceServer) ArchiveExperimentV1(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ArchiveExperimentV1 not implemented")
}
func (UnimplementedExperimentServiceServer) UnarchiveExperimentV1(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UnarchiveExperimentV1 not implemented")
}
func (UnimplementedExperimentServiceServer) mustEmbedUnimplementedExperimentServiceServer() {}
func (UnimplementedExperimentServiceServer) testEmbeddedByValue()                           {}

// UnsafeExperimentServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ExperimentServiceServer will
// result in compilation errors.
type UnsafeExperimentServiceServer interface {
	mustEmbedUnimplementedExperimentServiceServer()
}

func RegisterExperimentServiceServer(s grpc.ServiceRegistrar, srv ExperimentServiceServer) {
	// If the following call pancis, it indicates UnimplementedExperimentServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&ExperimentService_ServiceDesc, srv)
}

func _ExperimentService_CreateExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateExperimentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExperimentServiceServer).CreateExperimentV1(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExperimentService_CreateExperimentV1_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExperimentServiceServer).CreateExperimentV1(ctx, req.(*CreateExperimentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExperimentService_GetExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetExperimentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExperimentServiceServer).GetExperimentV1(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExperimentService_GetExperimentV1_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExperimentServiceServer).GetExperimentV1(ctx, req.(*GetExperimentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExperimentService_ListExperimentsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListExperimentsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExperimentServiceServer).ListExperimentsV1(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExperimentService_ListExperimentsV1_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExperimentServiceServer).ListExperimentsV1(ctx, req.(*ListExperimentsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExperimentService_DeleteExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteExperimentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExperimentServiceServer).DeleteExperimentV1(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExperimentService_DeleteExperimentV1_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExperimentServiceServer).DeleteExperimentV1(ctx, req.(*DeleteExperimentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExperimentService_ArchiveExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArchiveExperimentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExperimentServiceServer).ArchiveExperimentV1(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExperimentService_ArchiveExperimentV1_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExperimentServiceServer).ArchiveExperimentV1(ctx, req.(*ArchiveExperimentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExperimentService_UnarchiveExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UnarchiveExperimentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExperimentServiceServer).UnarchiveExperimentV1(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExperimentService_UnarchiveExperimentV1_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExperimentServiceServer).UnarchiveExperimentV1(ctx, req.(*UnarchiveExperimentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ExperimentService_ServiceDesc is the grpc.ServiceDesc for ExperimentService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExperimentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.ExperimentService",
	HandlerType: (*ExperimentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateExperimentV1",
			Handler:    _ExperimentService_CreateExperimentV1_Handler,
		},
		{
			MethodName: "GetExperimentV1",
			Handler:    _ExperimentService_GetExperimentV1_Handler,
		},
		{
			MethodName: "ListExperimentsV1",
			Handler:    _ExperimentService_ListExperimentsV1_Handler,
		},
		{
			MethodName: "DeleteExperimentV1",
			Handler:    _ExperimentService_DeleteExperimentV1_Handler,
		},
		{
			MethodName: "ArchiveExperimentV1",
			Handler:    _ExperimentService_ArchiveExperimentV1_Handler,
		},
		{
			MethodName: "UnarchiveExperimentV1",
			Handler:    _ExperimentService_UnarchiveExperimentV1_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "backend/api/v1beta1/experiment.proto",
}
