// Code generated by protoc-gen-go. DO NOT EDIT.
// source: remote.proto

package gitaly

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

type AddRemoteRequest struct {
	Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
	Name       string      `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Url        string      `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"`
	// If any, the remote is configured as a mirror with those mappings
	MirrorRefmaps []string `protobuf:"bytes,5,rep,name=mirror_refmaps,json=mirrorRefmaps" json:"mirror_refmaps,omitempty"`
}

func (m *AddRemoteRequest) Reset()                    { *m = AddRemoteRequest{} }
func (m *AddRemoteRequest) String() string            { return proto.CompactTextString(m) }
func (*AddRemoteRequest) ProtoMessage()               {}
func (*AddRemoteRequest) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{0} }

func (m *AddRemoteRequest) GetRepository() *Repository {
	if m != nil {
		return m.Repository
	}
	return nil
}

func (m *AddRemoteRequest) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *AddRemoteRequest) GetUrl() string {
	if m != nil {
		return m.Url
	}
	return ""
}

func (m *AddRemoteRequest) GetMirrorRefmaps() []string {
	if m != nil {
		return m.MirrorRefmaps
	}
	return nil
}

type AddRemoteResponse struct {
}

func (m *AddRemoteResponse) Reset()                    { *m = AddRemoteResponse{} }
func (m *AddRemoteResponse) String() string            { return proto.CompactTextString(m) }
func (*AddRemoteResponse) ProtoMessage()               {}
func (*AddRemoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{1} }

type RemoveRemoteRequest struct {
	Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
	Name       string      `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
}

func (m *RemoveRemoteRequest) Reset()                    { *m = RemoveRemoteRequest{} }
func (m *RemoveRemoteRequest) String() string            { return proto.CompactTextString(m) }
func (*RemoveRemoteRequest) ProtoMessage()               {}
func (*RemoveRemoteRequest) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{2} }

func (m *RemoveRemoteRequest) GetRepository() *Repository {
	if m != nil {
		return m.Repository
	}
	return nil
}

func (m *RemoveRemoteRequest) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

type RemoveRemoteResponse struct {
	Result bool `protobuf:"varint,1,opt,name=result" json:"result,omitempty"`
}

func (m *RemoveRemoteResponse) Reset()                    { *m = RemoveRemoteResponse{} }
func (m *RemoveRemoteResponse) String() string            { return proto.CompactTextString(m) }
func (*RemoveRemoteResponse) ProtoMessage()               {}
func (*RemoveRemoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{3} }

func (m *RemoveRemoteResponse) GetResult() bool {
	if m != nil {
		return m.Result
	}
	return false
}

type FetchInternalRemoteRequest struct {
	Repository       *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
	RemoteRepository *Repository `protobuf:"bytes,2,opt,name=remote_repository,json=remoteRepository" json:"remote_repository,omitempty"`
}

func (m *FetchInternalRemoteRequest) Reset()                    { *m = FetchInternalRemoteRequest{} }
func (m *FetchInternalRemoteRequest) String() string            { return proto.CompactTextString(m) }
func (*FetchInternalRemoteRequest) ProtoMessage()               {}
func (*FetchInternalRemoteRequest) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{4} }

func (m *FetchInternalRemoteRequest) GetRepository() *Repository {
	if m != nil {
		return m.Repository
	}
	return nil
}

func (m *FetchInternalRemoteRequest) GetRemoteRepository() *Repository {
	if m != nil {
		return m.RemoteRepository
	}
	return nil
}

type FetchInternalRemoteResponse struct {
	Result bool `protobuf:"varint,1,opt,name=result" json:"result,omitempty"`
}

func (m *FetchInternalRemoteResponse) Reset()                    { *m = FetchInternalRemoteResponse{} }
func (m *FetchInternalRemoteResponse) String() string            { return proto.CompactTextString(m) }
func (*FetchInternalRemoteResponse) ProtoMessage()               {}
func (*FetchInternalRemoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{5} }

func (m *FetchInternalRemoteResponse) GetResult() bool {
	if m != nil {
		return m.Result
	}
	return false
}

type UpdateRemoteMirrorRequest struct {
	Repository           *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
	RefName              string      `protobuf:"bytes,2,opt,name=ref_name,json=refName" json:"ref_name,omitempty"`
	OnlyBranchesMatching [][]byte    `protobuf:"bytes,3,rep,name=only_branches_matching,json=onlyBranchesMatching,proto3" json:"only_branches_matching,omitempty"`
}

func (m *UpdateRemoteMirrorRequest) Reset()                    { *m = UpdateRemoteMirrorRequest{} }
func (m *UpdateRemoteMirrorRequest) String() string            { return proto.CompactTextString(m) }
func (*UpdateRemoteMirrorRequest) ProtoMessage()               {}
func (*UpdateRemoteMirrorRequest) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{6} }

func (m *UpdateRemoteMirrorRequest) GetRepository() *Repository {
	if m != nil {
		return m.Repository
	}
	return nil
}

func (m *UpdateRemoteMirrorRequest) GetRefName() string {
	if m != nil {
		return m.RefName
	}
	return ""
}

func (m *UpdateRemoteMirrorRequest) GetOnlyBranchesMatching() [][]byte {
	if m != nil {
		return m.OnlyBranchesMatching
	}
	return nil
}

type UpdateRemoteMirrorResponse struct {
}

func (m *UpdateRemoteMirrorResponse) Reset()                    { *m = UpdateRemoteMirrorResponse{} }
func (m *UpdateRemoteMirrorResponse) String() string            { return proto.CompactTextString(m) }
func (*UpdateRemoteMirrorResponse) ProtoMessage()               {}
func (*UpdateRemoteMirrorResponse) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{7} }

func init() {
	proto.RegisterType((*AddRemoteRequest)(nil), "gitaly.AddRemoteRequest")
	proto.RegisterType((*AddRemoteResponse)(nil), "gitaly.AddRemoteResponse")
	proto.RegisterType((*RemoveRemoteRequest)(nil), "gitaly.RemoveRemoteRequest")
	proto.RegisterType((*RemoveRemoteResponse)(nil), "gitaly.RemoveRemoteResponse")
	proto.RegisterType((*FetchInternalRemoteRequest)(nil), "gitaly.FetchInternalRemoteRequest")
	proto.RegisterType((*FetchInternalRemoteResponse)(nil), "gitaly.FetchInternalRemoteResponse")
	proto.RegisterType((*UpdateRemoteMirrorRequest)(nil), "gitaly.UpdateRemoteMirrorRequest")
	proto.RegisterType((*UpdateRemoteMirrorResponse)(nil), "gitaly.UpdateRemoteMirrorResponse")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for RemoteService service

type RemoteServiceClient interface {
	AddRemote(ctx context.Context, in *AddRemoteRequest, opts ...grpc.CallOption) (*AddRemoteResponse, error)
	FetchInternalRemote(ctx context.Context, in *FetchInternalRemoteRequest, opts ...grpc.CallOption) (*FetchInternalRemoteResponse, error)
	RemoveRemote(ctx context.Context, in *RemoveRemoteRequest, opts ...grpc.CallOption) (*RemoveRemoteResponse, error)
	UpdateRemoteMirror(ctx context.Context, opts ...grpc.CallOption) (RemoteService_UpdateRemoteMirrorClient, error)
}

type remoteServiceClient struct {
	cc *grpc.ClientConn
}

func NewRemoteServiceClient(cc *grpc.ClientConn) RemoteServiceClient {
	return &remoteServiceClient{cc}
}

func (c *remoteServiceClient) AddRemote(ctx context.Context, in *AddRemoteRequest, opts ...grpc.CallOption) (*AddRemoteResponse, error) {
	out := new(AddRemoteResponse)
	err := grpc.Invoke(ctx, "/gitaly.RemoteService/AddRemote", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *remoteServiceClient) FetchInternalRemote(ctx context.Context, in *FetchInternalRemoteRequest, opts ...grpc.CallOption) (*FetchInternalRemoteResponse, error) {
	out := new(FetchInternalRemoteResponse)
	err := grpc.Invoke(ctx, "/gitaly.RemoteService/FetchInternalRemote", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *remoteServiceClient) RemoveRemote(ctx context.Context, in *RemoveRemoteRequest, opts ...grpc.CallOption) (*RemoveRemoteResponse, error) {
	out := new(RemoveRemoteResponse)
	err := grpc.Invoke(ctx, "/gitaly.RemoteService/RemoveRemote", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *remoteServiceClient) UpdateRemoteMirror(ctx context.Context, opts ...grpc.CallOption) (RemoteService_UpdateRemoteMirrorClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_RemoteService_serviceDesc.Streams[0], c.cc, "/gitaly.RemoteService/UpdateRemoteMirror", opts...)
	if err != nil {
		return nil, err
	}
	x := &remoteServiceUpdateRemoteMirrorClient{stream}
	return x, nil
}

type RemoteService_UpdateRemoteMirrorClient interface {
	Send(*UpdateRemoteMirrorRequest) error
	CloseAndRecv() (*UpdateRemoteMirrorResponse, error)
	grpc.ClientStream
}

type remoteServiceUpdateRemoteMirrorClient struct {
	grpc.ClientStream
}

func (x *remoteServiceUpdateRemoteMirrorClient) Send(m *UpdateRemoteMirrorRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *remoteServiceUpdateRemoteMirrorClient) CloseAndRecv() (*UpdateRemoteMirrorResponse, error) {
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	m := new(UpdateRemoteMirrorResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// Server API for RemoteService service

type RemoteServiceServer interface {
	AddRemote(context.Context, *AddRemoteRequest) (*AddRemoteResponse, error)
	FetchInternalRemote(context.Context, *FetchInternalRemoteRequest) (*FetchInternalRemoteResponse, error)
	RemoveRemote(context.Context, *RemoveRemoteRequest) (*RemoveRemoteResponse, error)
	UpdateRemoteMirror(RemoteService_UpdateRemoteMirrorServer) error
}

func RegisterRemoteServiceServer(s *grpc.Server, srv RemoteServiceServer) {
	s.RegisterService(&_RemoteService_serviceDesc, srv)
}

func _RemoteService_AddRemote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddRemoteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RemoteServiceServer).AddRemote(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.RemoteService/AddRemote",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RemoteServiceServer).AddRemote(ctx, req.(*AddRemoteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RemoteService_FetchInternalRemote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FetchInternalRemoteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RemoteServiceServer).FetchInternalRemote(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.RemoteService/FetchInternalRemote",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RemoteServiceServer).FetchInternalRemote(ctx, req.(*FetchInternalRemoteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RemoteService_RemoveRemote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemoveRemoteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RemoteServiceServer).RemoveRemote(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gitaly.RemoteService/RemoveRemote",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RemoteServiceServer).RemoveRemote(ctx, req.(*RemoveRemoteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RemoteService_UpdateRemoteMirror_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(RemoteServiceServer).UpdateRemoteMirror(&remoteServiceUpdateRemoteMirrorServer{stream})
}

type RemoteService_UpdateRemoteMirrorServer interface {
	SendAndClose(*UpdateRemoteMirrorResponse) error
	Recv() (*UpdateRemoteMirrorRequest, error)
	grpc.ServerStream
}

type remoteServiceUpdateRemoteMirrorServer struct {
	grpc.ServerStream
}

func (x *remoteServiceUpdateRemoteMirrorServer) SendAndClose(m *UpdateRemoteMirrorResponse) error {
	return x.ServerStream.SendMsg(m)
}

func (x *remoteServiceUpdateRemoteMirrorServer) Recv() (*UpdateRemoteMirrorRequest, error) {
	m := new(UpdateRemoteMirrorRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

var _RemoteService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "gitaly.RemoteService",
	HandlerType: (*RemoteServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddRemote",
			Handler:    _RemoteService_AddRemote_Handler,
		},
		{
			MethodName: "FetchInternalRemote",
			Handler:    _RemoteService_FetchInternalRemote_Handler,
		},
		{
			MethodName: "RemoveRemote",
			Handler:    _RemoteService_RemoveRemote_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "UpdateRemoteMirror",
			Handler:       _RemoteService_UpdateRemoteMirror_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "remote.proto",
}

func init() { proto.RegisterFile("remote.proto", fileDescriptor9) }

var fileDescriptor9 = []byte{
	// 434 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
	0x10, 0xc6, 0x71, 0x1a, 0x92, 0x21, 0x45, 0xe9, 0xa6, 0xaa, 0x1c, 0xb7, 0x87, 0xb0, 0x08, 0xc9,
	0xa7, 0x1c, 0x02, 0x9c, 0x11, 0x3d, 0x20, 0x01, 0x2a, 0x87, 0x45,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