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

/*
Package keyvalue is a generated protocol buffer package.

It is generated from these files:
	keyvalue/keyvalue.proto

It has these top-level messages:
	SetKeyValueRequest
	GetKeyValueRequest
	KeyValueResponse
*/
package keyvalue

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

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

type SetKeyValueRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

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

func (m *SetKeyValueRequest) GetKey() string {
	if m != nil {
		return m.Key
	}
	return ""
}

func (m *SetKeyValueRequest) GetValue() string {
	if m != nil {
		return m.Value
	}
	return ""
}

type GetKeyValueRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
}

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

func (m *GetKeyValueRequest) GetKey() string {
	if m != nil {
		return m.Key
	}
	return ""
}

type KeyValueResponse struct {
	Success string `protobuf:"bytes,1,opt,name=success" json:"success,omitempty"`
	Value   string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

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

func (m *KeyValueResponse) GetSuccess() string {
	if m != nil {
		return m.Success
	}
	return ""
}

func (m *KeyValueResponse) GetValue() string {
	if m != nil {
		return m.Value
	}
	return ""
}

func init() {
	proto.RegisterType((*SetKeyValueRequest)(nil), "keyvalue.SetKeyValueRequest")
	proto.RegisterType((*GetKeyValueRequest)(nil), "keyvalue.GetKeyValueRequest")
	proto.RegisterType((*KeyValueResponse)(nil), "keyvalue.KeyValueResponse")
}

// 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 KeyValue service

type KeyValueClient interface {
	Set(ctx context.Context, in *SetKeyValueRequest, opts ...grpc.CallOption) (*KeyValueResponse, error)
	Get(ctx context.Context, in *GetKeyValueRequest, opts ...grpc.CallOption) (*KeyValueResponse, error)
}

type keyValueClient struct {
	cc *grpc.ClientConn
}

func NewKeyValueClient(cc *grpc.ClientConn) KeyValueClient {
	return &keyValueClient{cc}
}

func (c *keyValueClient) Set(ctx context.Context, in *SetKeyValueRequest, opts ...grpc.CallOption) (*KeyValueResponse, error) {
	out := new(KeyValueResponse)
	err := grpc.Invoke(ctx, "/keyvalue.KeyValue/Set", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keyValueClient) Get(ctx context.Context, in *GetKeyValueRequest, opts ...grpc.CallOption) (*KeyValueResponse, error) {
	out := new(KeyValueResponse)
	err := grpc.Invoke(ctx, "/keyvalue.KeyValue/Get", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for KeyValue service

type KeyValueServer interface {
	Set(context.Context, *SetKeyValueRequest) (*KeyValueResponse, error)
	Get(context.Context, *GetKeyValueRequest) (*KeyValueResponse, error)
}

func RegisterKeyValueServer(s *grpc.Server, srv KeyValueServer) {
	s.RegisterService(&_KeyValue_serviceDesc, srv)
}

func _KeyValue_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetKeyValueRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeyValueServer).Set(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/keyvalue.KeyValue/Set",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeyValueServer).Set(ctx, req.(*SetKeyValueRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KeyValue_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetKeyValueRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeyValueServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/keyvalue.KeyValue/Get",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeyValueServer).Get(ctx, req.(*GetKeyValueRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _KeyValue_serviceDesc = grpc.ServiceDesc{
	ServiceName: "keyvalue.KeyValue",
	HandlerType: (*KeyValueServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Set",
			Handler:    _KeyValue_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _KeyValue_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "keyvalue/keyvalue.proto",
}

func init() { proto.RegisterFile("keyvalue/keyvalue.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 174 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x4e, 0xad, 0x2c,
	0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x87, 0x31, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x38, 0x60,
	0x7c, 0x25, 0x1b, 0x2e, 0xa1, 0xe0, 0xd4, 0x12, 0xef, 0xd4, 0xca, 0x30, 0x10, 0x37, 0x28, 0xb5,
	0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x52, 0x82, 0x51, 0x81, 0x51,
	0x83, 0x33, 0x08, 0xc4, 0x14, 0x12, 0xe1, 0x62, 0x05, 0x6b, 0x90, 0x60, 0x02, 0x8b, 0x41, 0x38,
	0x4a, 0x6a, 0x5c, 0x42, 0xee, 0x44, 0xe8, 0x56, 0x72, 0xe2, 0x12, 0x40, 0x28, 0x2a, 0x2e, 0xc8,
	0xcf, 0x2b, 0x4e, 0x15, 0x92, 0xe0, 0x62, 0x2f, 0x2e, 0x4d, 0x4e, 0x4e, 0x2d, 0x2e, 0x86, 0xaa,
	0x84, 0x71, 0xb1, 0xdb, 0x65, 0x34, 0x81, 0x91, 0x8b, 0x03, 0x66, 0x88, 0x90, 0x23, 0x17, 0x73,
	0x70, 0x6a, 0x89, 0x90, 0x8c, 0x1e, 0xdc, 0x63, 0x98, 0xbe, 0x90, 0x92, 0x42, 0xc8, 0xa2, 0xdb,
	0xae, 0xc4, 0x00, 0x32, 0xc2, 0x1d, 0xd5, 0x08, 0x77, 0x12, 0x8d, 0x48, 0x62, 0x03, 0x87, 0xa6,
	0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x06, 0xdf, 0xc9, 0x4b, 0x68, 0x01, 0x00, 0x00,
}
