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

/*
Package warehouse is a generated protocol buffer package.

It is generated from these files:
	warehouse.proto

It has these top-level messages:
	DetailsRequest
	DetailsResponse
	WarehouseDetails
*/
package warehouse

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

import (
	client "github.com/micro/go-micro/client"
	server "github.com/micro/go-micro/server"
	context "golang.org/x/net/context"
)

// 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 DetailsRequest struct {
	Sku string `protobuf:"bytes,1,opt,name=sku" json:"sku,omitempty"`
}

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

func (m *DetailsRequest) GetSku() string {
	if m != nil {
		return m.Sku
	}
	return ""
}

type DetailsResponse struct {
	Details *WarehouseDetails `protobuf:"bytes,1,opt,name=details" json:"details,omitempty"`
}

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

func (m *DetailsResponse) GetDetails() *WarehouseDetails {
	if m != nil {
		return m.Details
	}
	return nil
}

type WarehouseDetails struct {
	Sku            string `protobuf:"bytes,1,opt,name=sku" json:"sku,omitempty"`
	StockRemaining uint32 `protobuf:"varint,2,opt,name=stock_remaining,json=stockRemaining" json:"stock_remaining,omitempty"`
	Manufacturer   string `protobuf:"bytes,3,opt,name=manufacturer" json:"manufacturer,omitempty"`
	ModelNumber    string `protobuf:"bytes,4,opt,name=model_number,json=modelNumber" json:"model_number,omitempty"`
}

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

func (m *WarehouseDetails) GetSku() string {
	if m != nil {
		return m.Sku
	}
	return ""
}

func (m *WarehouseDetails) GetStockRemaining() uint32 {
	if m != nil {
		return m.StockRemaining
	}
	return 0
}

func (m *WarehouseDetails) GetManufacturer() string {
	if m != nil {
		return m.Manufacturer
	}
	return ""
}

func (m *WarehouseDetails) GetModelNumber() string {
	if m != nil {
		return m.ModelNumber
	}
	return ""
}

func init() {
	proto.RegisterType((*DetailsRequest)(nil), "warehouse.DetailsRequest")
	proto.RegisterType((*DetailsResponse)(nil), "warehouse.DetailsResponse")
	proto.RegisterType((*WarehouseDetails)(nil), "warehouse.WarehouseDetails")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ client.Option
var _ server.Option

// Client API for Warehouse service

type WarehouseClient interface {
	GetWarehouseDetails(ctx context.Context, in *DetailsRequest, opts ...client.CallOption) (*DetailsResponse, error)
}

type warehouseClient struct {
	c           client.Client
	serviceName string
}

func NewWarehouseClient(serviceName string, c client.Client) WarehouseClient {
	if c == nil {
		c = client.NewClient()
	}
	if len(serviceName) == 0 {
		serviceName = "warehouse"
	}
	return &warehouseClient{
		c:           c,
		serviceName: serviceName,
	}
}

func (c *warehouseClient) GetWarehouseDetails(ctx context.Context, in *DetailsRequest, opts ...client.CallOption) (*DetailsResponse, error) {
	req := c.c.NewRequest(c.serviceName, "Warehouse.GetWarehouseDetails", in)
	out := new(DetailsResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Warehouse service

type WarehouseHandler interface {
	GetWarehouseDetails(context.Context, *DetailsRequest, *DetailsResponse) error
}

func RegisterWarehouseHandler(s server.Server, hdlr WarehouseHandler, opts ...server.HandlerOption) {
	s.Handle(s.NewHandler(&Warehouse{hdlr}, opts...))
}

type Warehouse struct {
	WarehouseHandler
}

func (h *Warehouse) GetWarehouseDetails(ctx context.Context, in *DetailsRequest, out *DetailsResponse) error {
	return h.WarehouseHandler.GetWarehouseDetails(ctx, in, out)
}

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

var fileDescriptor0 = []byte{
	// 235 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x4f, 0x2c, 0x4a,
	0xcd, 0xc8, 0x2f, 0x2d, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x28,
	0x29, 0x71, 0xf1, 0xb9, 0xa4, 0x96, 0x24, 0x66, 0xe6, 0x14, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16,
	0x97, 0x08, 0x09, 0x70, 0x31, 0x17, 0x67, 0x97, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81,
	0x98, 0x4a, 0x1e, 0x5c, 0xfc, 0x70, 0x35, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x42, 0xa6, 0x5c,
	0xec, 0x29, 0x10, 0x21, 0xb0, 0x42, 0x6e, 0x23, 0x69, 0x3d, 0x84, 0x25, 0xe1, 0x30, 0x16, 0x4c,
	0x17, 0x4c, 0xad, 0xd2, 0x14, 0x46, 0x2e, 0x01, 0x74, 0x59, 0x4c, 0x0b, 0x85, 0xd4, 0xb9, 0xf8,
	0x8b, 0x4b, 0xf2, 0x93, 0xb3, 0xe3, 0x8b, 0x52, 0x73, 0x13, 0x33, 0xf3, 0x32, 0xf3, 0xd2, 0x25,
	0x98, 0x14, 0x18, 0x35, 0x78, 0x83, 0xf8, 0xc0, 0xc2, 0x41, 0x30, 0x51, 0x21, 0x25, 0x2e, 0x9e,
	0xdc, 0xc4, 0xbc, 0xd2, 0xb4, 0xc4, 0xe4, 0x92, 0xd2, 0xa2, 0xd4, 0x22, 0x09, 0x66, 0xb0, 0x19,
	0x28, 0x62, 0x42, 0x8a, 0x5c, 0x3c, 0xb9, 0xf9, 0x29, 0xa9, 0x39, 0xf1, 0x79, 0xa5, 0xb9, 0x49,
	0xa9, 0x45, 0x12, 0x2c, 0x60, 0x35, 0xdc, 0x60, 0x31, 0x3f, 0xb0, 0x90, 0x51, 0x24, 0x17, 0x27,
	0xdc, 0x55, 0x42, 0x3e, 0x5c, 0xc2, 0xee, 0xa9, 0x25, 0x18, 0xae, 0x94, 0x44, 0xf2, 0x20, 0x6a,
	0x88, 0x49, 0x49, 0x61, 0x93, 0x82, 0x04, 0x54, 0x12, 0x1b, 0x38, 0xc4, 0x8d, 0x01, 0x01, 0x00,
	0x00, 0xff, 0xff, 0xf2, 0x06, 0xa6, 0xa6, 0x84, 0x01, 0x00, 0x00,
}
