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

/*
Package catalog is a generated protocol buffer package.

It is generated from these files:
	catalog.proto

It has these top-level messages:
	DetailRequest
	DetailResponse
	AllCategoriesRequest
	AllCategoriesResponse
	CategoryProductsRequest
	CategoryProductsResponse
	SearchRequest
	SearchResponse
	Product
	ProductCategory
*/
package catalog

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

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

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

type DetailResponse struct {
	Product *Product `protobuf:"bytes,1,opt,name=product" json:"product,omitempty"`
}

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

func (m *DetailResponse) GetProduct() *Product {
	if m != nil {
		return m.Product
	}
	return nil
}

type AllCategoriesRequest struct {
	Unused int32 `protobuf:"varint,1,opt,name=Unused" json:"Unused,omitempty"`
}

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

func (m *AllCategoriesRequest) GetUnused() int32 {
	if m != nil {
		return m.Unused
	}
	return 0
}

type AllCategoriesResponse struct {
	Categories []*ProductCategory `protobuf:"bytes,1,rep,name=categories" json:"categories,omitempty"`
}

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

func (m *AllCategoriesResponse) GetCategories() []*ProductCategory {
	if m != nil {
		return m.Categories
	}
	return nil
}

type CategoryProductsRequest struct {
	CategoryId uint64 `protobuf:"varint,1,opt,name=category_id,json=categoryId" json:"category_id,omitempty"`
}

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

func (m *CategoryProductsRequest) GetCategoryId() uint64 {
	if m != nil {
		return m.CategoryId
	}
	return 0
}

type CategoryProductsResponse struct {
	Products []*Product `protobuf:"bytes,1,rep,name=products" json:"products,omitempty"`
}

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

func (m *CategoryProductsResponse) GetProducts() []*Product {
	if m != nil {
		return m.Products
	}
	return nil
}

type SearchRequest struct {
	SearchTerm string   `protobuf:"bytes,1,opt,name=search_term,json=searchTerm" json:"search_term,omitempty"`
	Categories []uint64 `protobuf:"varint,2,rep,packed,name=categories" json:"categories,omitempty"`
}

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

func (m *SearchRequest) GetSearchTerm() string {
	if m != nil {
		return m.SearchTerm
	}
	return ""
}

func (m *SearchRequest) GetCategories() []uint64 {
	if m != nil {
		return m.Categories
	}
	return nil
}

type SearchResponse struct {
	SearchResults []*Product `protobuf:"bytes,1,rep,name=search_results,json=searchResults" json:"search_results,omitempty"`
}

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

func (m *SearchResponse) GetSearchResults() []*Product {
	if m != nil {
		return m.SearchResults
	}
	return nil
}

type Product struct {
	Sku          string `protobuf:"bytes,1,opt,name=sku" json:"sku,omitempty"`
	Name         string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Description  string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
	Manufacturer string `protobuf:"bytes,4,opt,name=manufacturer" json:"manufacturer,omitempty"`
	Model        string `protobuf:"bytes,5,opt,name=model" json:"model,omitempty"`
	Price        int64  `protobuf:"varint,6,opt,name=price" json:"price,omitempty"`
}

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

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

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

func (m *Product) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

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

func (m *Product) GetModel() string {
	if m != nil {
		return m.Model
	}
	return ""
}

func (m *Product) GetPrice() int64 {
	if m != nil {
		return m.Price
	}
	return 0
}

type ProductCategory struct {
	CategoryId  uint64 `protobuf:"varint,1,opt,name=category_id,json=categoryId" json:"category_id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
}

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

func (m *ProductCategory) GetCategoryId() uint64 {
	if m != nil {
		return m.CategoryId
	}
	return 0
}

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

func (m *ProductCategory) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

func init() {
	proto.RegisterType((*DetailRequest)(nil), "catalog.DetailRequest")
	proto.RegisterType((*DetailResponse)(nil), "catalog.DetailResponse")
	proto.RegisterType((*AllCategoriesRequest)(nil), "catalog.AllCategoriesRequest")
	proto.RegisterType((*AllCategoriesResponse)(nil), "catalog.AllCategoriesResponse")
	proto.RegisterType((*CategoryProductsRequest)(nil), "catalog.CategoryProductsRequest")
	proto.RegisterType((*CategoryProductsResponse)(nil), "catalog.CategoryProductsResponse")
	proto.RegisterType((*SearchRequest)(nil), "catalog.SearchRequest")
	proto.RegisterType((*SearchResponse)(nil), "catalog.SearchResponse")
	proto.RegisterType((*Product)(nil), "catalog.Product")
	proto.RegisterType((*ProductCategory)(nil), "catalog.ProductCategory")
}

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

// Client API for Catalog service

type CatalogClient interface {
	GetProductDetails(ctx context.Context, in *DetailRequest, opts ...client.CallOption) (*DetailResponse, error)
	GetProductCategories(ctx context.Context, in *AllCategoriesRequest, opts ...client.CallOption) (*AllCategoriesResponse, error)
	GetProductsInCategory(ctx context.Context, in *CategoryProductsRequest, opts ...client.CallOption) (*CategoryProductsResponse, error)
	ProductSearch(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
}

type catalogClient struct {
	c           client.Client
	serviceName string
}

func NewCatalogClient(serviceName string, c client.Client) CatalogClient {
	if c == nil {
		c = client.NewClient()
	}
	if len(serviceName) == 0 {
		serviceName = "catalog"
	}
	return &catalogClient{
		c:           c,
		serviceName: serviceName,
	}
}

func (c *catalogClient) GetProductDetails(ctx context.Context, in *DetailRequest, opts ...client.CallOption) (*DetailResponse, error) {
	req := c.c.NewRequest(c.serviceName, "Catalog.GetProductDetails", in)
	out := new(DetailResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *catalogClient) GetProductCategories(ctx context.Context, in *AllCategoriesRequest, opts ...client.CallOption) (*AllCategoriesResponse, error) {
	req := c.c.NewRequest(c.serviceName, "Catalog.GetProductCategories", in)
	out := new(AllCategoriesResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *catalogClient) GetProductsInCategory(ctx context.Context, in *CategoryProductsRequest, opts ...client.CallOption) (*CategoryProductsResponse, error) {
	req := c.c.NewRequest(c.serviceName, "Catalog.GetProductsInCategory", in)
	out := new(CategoryProductsResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *catalogClient) ProductSearch(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error) {
	req := c.c.NewRequest(c.serviceName, "Catalog.ProductSearch", in)
	out := new(SearchResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Catalog service

type CatalogHandler interface {
	GetProductDetails(context.Context, *DetailRequest, *DetailResponse) error
	GetProductCategories(context.Context, *AllCategoriesRequest, *AllCategoriesResponse) error
	GetProductsInCategory(context.Context, *CategoryProductsRequest, *CategoryProductsResponse) error
	ProductSearch(context.Context, *SearchRequest, *SearchResponse) error
}

func RegisterCatalogHandler(s server.Server, hdlr CatalogHandler, opts ...server.HandlerOption) {
	s.Handle(s.NewHandler(&Catalog{hdlr}, opts...))
}

type Catalog struct {
	CatalogHandler
}

func (h *Catalog) GetProductDetails(ctx context.Context, in *DetailRequest, out *DetailResponse) error {
	return h.CatalogHandler.GetProductDetails(ctx, in, out)
}

func (h *Catalog) GetProductCategories(ctx context.Context, in *AllCategoriesRequest, out *AllCategoriesResponse) error {
	return h.CatalogHandler.GetProductCategories(ctx, in, out)
}

func (h *Catalog) GetProductsInCategory(ctx context.Context, in *CategoryProductsRequest, out *CategoryProductsResponse) error {
	return h.CatalogHandler.GetProductsInCategory(ctx, in, out)
}

func (h *Catalog) ProductSearch(ctx context.Context, in *SearchRequest, out *SearchResponse) error {
	return h.CatalogHandler.ProductSearch(ctx, in, out)
}

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

var fileDescriptor0 = []byte{
	// 469 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
	0x10, 0x95, 0xe3, 0x7c, 0xc0, 0x04, 0x87, 0xb2, 0x4a, 0xdb, 0x55, 0x24, 0x8a, 0xbb, 0xa7, 0x08,
	0xa1, 0x1c, 0xc2, 0x01, 0x84, 0x38, 0x80, 0x5a, 0x09, 0x72, 0x2b, 0x86, 0xde, 0x90, 0x2a, 0x63,
	0x0f, 0xad, 0x85, 0xbf, 0xd8, 0x5d, 0x1f, 0xf2, 0x73, 0xf8, 0x33, 0xfc, 0x2e, 0x94, 0xf5, 0x78,
	0x63, 0x27, 0x34, 0x48, 0xdc, 0xbc, 0x6f, 0xde, 0xbc, 0x79, 0x33, 0x3b, 0x6b, 0xf0, 0xa2, 0x50,
	0x87, 0x69, 0x71, 0xbb, 0x28, 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