// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: examples/internal/proto/examplepb/openapi_merge_a.proto

// Merging Services
//
// This is an example of merging two proto files.

package examplepb

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// 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 (
	ServiceA_MethodOne_FullMethodName = "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodOne"
	ServiceA_MethodTwo_FullMethodName = "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodTwo"
)

// ServiceAClient is the client API for ServiceA 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.
//
// ServiceA provides MethodOne and MethodTwo
type ServiceAClient interface {
	// ServiceA.MethodOne receives InMessageA and returns OutMessageA
	//
	// Here is the detail explanation about ServiceA.MethodOne.
	MethodOne(ctx context.Context, in *InMessageA, opts ...grpc.CallOption) (*OutMessageA, error)
	// ServiceA.MethodTwo receives OutMessageA and returns InMessageA
	//
	// Here is the detail explanation about ServiceA.MethodTwo.
	MethodTwo(ctx context.Context, in *OutMessageA, opts ...grpc.CallOption) (*InMessageA, error)
}

type serviceAClient struct {
	cc grpc.ClientConnInterface
}

func NewServiceAClient(cc grpc.ClientConnInterface) ServiceAClient {
	return &serviceAClient{cc}
}

func (c *serviceAClient) MethodOne(ctx context.Context, in *InMessageA, opts ...grpc.CallOption) (*OutMessageA, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OutMessageA)
	err := c.cc.Invoke(ctx, ServiceA_MethodOne_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serviceAClient) MethodTwo(ctx context.Context, in *OutMessageA, opts ...grpc.CallOption) (*InMessageA, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(InMessageA)
	err := c.cc.Invoke(ctx, ServiceA_MethodTwo_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ServiceAServer is the server API for ServiceA service.
// All implementations should embed UnimplementedServiceAServer
// for forward compatibility.
//
// ServiceA provides MethodOne and MethodTwo
type ServiceAServer interface {
	// ServiceA.MethodOne receives InMessageA and returns OutMessageA
	//
	// Here is the detail explanation about ServiceA.MethodOne.
	MethodOne(context.Context, *InMessageA) (*OutMessageA, error)
	// ServiceA.MethodTwo receives OutMessageA and returns InMessageA
	//
	// Here is the detail explanation about ServiceA.MethodTwo.
	MethodTwo(context.Context, *OutMessageA) (*InMessageA, error)
}

// UnimplementedServiceAServer should 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 UnimplementedServiceAServer struct{}

func (UnimplementedServiceAServer) MethodOne(context.Context, *InMessageA) (*OutMessageA, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MethodOne not implemented")
}
func (UnimplementedServiceAServer) MethodTwo(context.Context, *OutMessageA) (*InMessageA, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MethodTwo not implemented")
}
func (UnimplementedServiceAServer) testEmbeddedByValue() {}

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

func RegisterServiceAServer(s grpc.ServiceRegistrar, srv ServiceAServer) {
	// If the following call pancis, it indicates UnimplementedServiceAServer 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(&ServiceA_ServiceDesc, srv)
}

func _ServiceA_MethodOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InMessageA)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServiceAServer).MethodOne(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ServiceA_MethodOne_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServiceAServer).MethodOne(ctx, req.(*InMessageA))
	}
	return interceptor(ctx, in, info, handler)
}

func _ServiceA_MethodTwo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OutMessageA)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServiceAServer).MethodTwo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ServiceA_MethodTwo_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServiceAServer).MethodTwo(ctx, req.(*OutMessageA))
	}
	return interceptor(ctx, in, info, handler)
}

// ServiceA_ServiceDesc is the grpc.ServiceDesc for ServiceA service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ServiceA_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.gateway.examples.internal.examplepb.ServiceA",
	HandlerType: (*ServiceAServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MethodOne",
			Handler:    _ServiceA_MethodOne_Handler,
		},
		{
			MethodName: "MethodTwo",
			Handler:    _ServiceA_MethodTwo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "examples/internal/proto/examplepb/openapi_merge_a.proto",
}

const (
	ServiceC_MethodOne_FullMethodName = "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodOne"
	ServiceC_MethodTwo_FullMethodName = "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodTwo"
)

// ServiceCClient is the client API for ServiceC 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.
//
// ServiceC service responds to incoming merge requests.
type ServiceCClient interface {
	// ServiceC.MethodOne receives InMessageA and returns OutMessageC
	//
	// Here is the detail explanation about ServiceC.MethodOne.
	MethodOne(ctx context.Context, in *InMessageA, opts ...grpc.CallOption) (*OutMessageC, error)
	// ServiceC.MethodTwo receives OutMessageA and returns InMessageA
	//
	// Here is the detail explanation about ServiceC.MethodTwo.
	MethodTwo(ctx context.Context, in *OutMessageA, opts ...grpc.CallOption) (*InMessageA, error)
}

type serviceCClient struct {
	cc grpc.ClientConnInterface
}

func NewServiceCClient(cc grpc.ClientConnInterface) ServiceCClient {
	return &serviceCClient{cc}
}

func (c *serviceCClient) MethodOne(ctx context.Context, in *InMessageA, opts ...grpc.CallOption) (*OutMessageC, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OutMessageC)
	err := c.cc.Invoke(ctx, ServiceC_MethodOne_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serviceCClient) MethodTwo(ctx context.Context, in *OutMessageA, opts ...grpc.CallOption) (*InMessageA, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(InMessageA)
	err := c.cc.Invoke(ctx, ServiceC_MethodTwo_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ServiceCServer is the server API for ServiceC service.
// All implementations should embed UnimplementedServiceCServer
// for forward compatibility.
//
// ServiceC service responds to incoming merge requests.
type ServiceCServer interface {
	// ServiceC.MethodOne receives InMessageA and returns OutMessageC
	//
	// Here is the detail explanation about ServiceC.MethodOne.
	MethodOne(context.Context, *InMessageA) (*OutMessageC, error)
	// ServiceC.MethodTwo receives OutMessageA and returns InMessageA
	//
	// Here is the detail explanation about ServiceC.MethodTwo.
	MethodTwo(context.Context, *OutMessageA) (*InMessageA, error)
}

// UnimplementedServiceCServer should 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 UnimplementedServiceCServer struct{}

func (UnimplementedServiceCServer) MethodOne(context.Context, *InMessageA) (*OutMessageC, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MethodOne not implemented")
}
func (UnimplementedServiceCServer) MethodTwo(context.Context, *OutMessageA) (*InMessageA, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MethodTwo not implemented")
}
func (UnimplementedServiceCServer) testEmbeddedByValue() {}

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

func RegisterServiceCServer(s grpc.ServiceRegistrar, srv ServiceCServer) {
	// If the following call pancis, it indicates UnimplementedServiceCServer 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(&ServiceC_ServiceDesc, srv)
}

func _ServiceC_MethodOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InMessageA)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServiceCServer).MethodOne(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ServiceC_MethodOne_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServiceCServer).MethodOne(ctx, req.(*InMessageA))
	}
	return interceptor(ctx, in, info, handler)
}

func _ServiceC_MethodTwo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OutMessageA)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServiceCServer).MethodTwo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ServiceC_MethodTwo_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServiceCServer).MethodTwo(ctx, req.(*OutMessageA))
	}
	return interceptor(ctx, in, info, handler)
}

// ServiceC_ServiceDesc is the grpc.ServiceDesc for ServiceC service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ServiceC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.gateway.examples.internal.examplepb.ServiceC",
	HandlerType: (*ServiceCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MethodOne",
			Handler:    _ServiceC_MethodOne_Handler,
		},
		{
			MethodName: "MethodTwo",
			Handler:    _ServiceC_MethodTwo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "examples/internal/proto/examplepb/openapi_merge_a.proto",
}
