// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: proto/rpc/system/organization.proto

package rpcv3

import (
	context "context"
	v3 "github.com/RafayLabs/rcloud-base/proto/types/systempb/v3"
	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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// OrganizationClient is the client API for Organization 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 OrganizationClient interface {
	CreateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
	GetOrganizations(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.OrganizationList, error)
	GetOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
	UpdateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
	DeleteOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
}

type organizationClient struct {
	cc grpc.ClientConnInterface
}

func NewOrganizationClient(cc grpc.ClientConnInterface) OrganizationClient {
	return &organizationClient{cc}
}

func (c *organizationClient) CreateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
	out := new(v3.Organization)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/CreateOrganization", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *organizationClient) GetOrganizations(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.OrganizationList, error) {
	out := new(v3.OrganizationList)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/GetOrganizations", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *organizationClient) GetOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
	out := new(v3.Organization)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/GetOrganization", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *organizationClient) UpdateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
	out := new(v3.Organization)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/UpdateOrganization", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *organizationClient) DeleteOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
	out := new(v3.Organization)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/DeleteOrganization", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OrganizationServer is the server API for Organization service.
// All implementations should embed UnimplementedOrganizationServer
// for forward compatibility
type OrganizationServer interface {
	CreateOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
	GetOrganizations(context.Context, *v3.Organization) (*v3.OrganizationList, error)
	GetOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
	UpdateOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
	DeleteOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
}

// UnimplementedOrganizationServer should be embedded to have forward compatible implementations.
type UnimplementedOrganizationServer struct {
}

func (UnimplementedOrganizationServer) CreateOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateOrganization not implemented")
}
func (UnimplementedOrganizationServer) GetOrganizations(context.Context, *v3.Organization) (*v3.OrganizationList, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetOrganizations not implemented")
}
func (UnimplementedOrganizationServer) GetOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetOrganization not implemented")
}
func (UnimplementedOrganizationServer) UpdateOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateOrganization not implemented")
}
func (UnimplementedOrganizationServer) DeleteOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteOrganization not implemented")
}

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

func RegisterOrganizationServer(s grpc.ServiceRegistrar, srv OrganizationServer) {
	s.RegisterService(&Organization_ServiceDesc, srv)
}

func _Organization_CreateOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Organization)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OrganizationServer).CreateOrganization(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Organization/CreateOrganization",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OrganizationServer).CreateOrganization(ctx, req.(*v3.Organization))
	}
	return interceptor(ctx, in, info, handler)
}

func _Organization_GetOrganizations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Organization)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OrganizationServer).GetOrganizations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Organization/GetOrganizations",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OrganizationServer).GetOrganizations(ctx, req.(*v3.Organization))
	}
	return interceptor(ctx, in, info, handler)
}

func _Organization_GetOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Organization)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OrganizationServer).GetOrganization(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Organization/GetOrganization",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OrganizationServer).GetOrganization(ctx, req.(*v3.Organization))
	}
	return interceptor(ctx, in, info, handler)
}

func _Organization_UpdateOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Organization)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OrganizationServer).UpdateOrganization(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Organization/UpdateOrganization",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OrganizationServer).UpdateOrganization(ctx, req.(*v3.Organization))
	}
	return interceptor(ctx, in, info, handler)
}

func _Organization_DeleteOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Organization)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OrganizationServer).DeleteOrganization(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Organization/DeleteOrganization",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OrganizationServer).DeleteOrganization(ctx, req.(*v3.Organization))
	}
	return interceptor(ctx, in, info, handler)
}

// Organization_ServiceDesc is the grpc.ServiceDesc for Organization service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Organization_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rafay.dev.rpc.v3.Organization",
	HandlerType: (*OrganizationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateOrganization",
			Handler:    _Organization_CreateOrganization_Handler,
		},
		{
			MethodName: "GetOrganizations",
			Handler:    _Organization_GetOrganizations_Handler,
		},
		{
			MethodName: "GetOrganization",
			Handler:    _Organization_GetOrganization_Handler,
		},
		{
			MethodName: "UpdateOrganization",
			Handler:    _Organization_UpdateOrganization_Handler,
		},
		{
			MethodName: "DeleteOrganization",
			Handler:    _Organization_DeleteOrganization_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/rpc/system/organization.proto",
}
