// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: mixer/v1/service.proto

package v1

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

import context "golang.org/x/net/context"
import 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

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

type MixerClient interface {
	// Checks preconditions and allocate quota before performing an operation.
	// The preconditions enforced depend on the set of supplied attributes and
	// the active configuration.
	Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
	// Reports telemetry, such as logs and metrics.
	// The reported information depends on the set of supplied attributes and the
	// active configuration.
	Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error)
}

type mixerClient struct {
	cc *grpc.ClientConn
}

func NewMixerClient(cc *grpc.ClientConn) MixerClient {
	return &mixerClient{cc}
}

func (c *mixerClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
	out := new(CheckResponse)
	err := grpc.Invoke(ctx, "/istio.mixer.v1.Mixer/Check", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *mixerClient) Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) {
	out := new(ReportResponse)
	err := grpc.Invoke(ctx, "/istio.mixer.v1.Mixer/Report", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Mixer service

type MixerServer interface {
	// Checks preconditions and allocate quota before performing an operation.
	// The preconditions enforced depend on the set of supplied attributes and
	// the active configuration.
	Check(context.Context, *CheckRequest) (*CheckResponse, error)
	// Reports telemetry, such as logs and metrics.
	// The reported information depends on the set of supplied attributes and the
	// active configuration.
	Report(context.Context, *ReportRequest) (*ReportResponse, error)
}

func RegisterMixerServer(s *grpc.Server, srv MixerServer) {
	s.RegisterService(&_Mixer_serviceDesc, srv)
}

func _Mixer_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CheckRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MixerServer).Check(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/istio.mixer.v1.Mixer/Check",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MixerServer).Check(ctx, req.(*CheckRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Mixer_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MixerServer).Report(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/istio.mixer.v1.Mixer/Report",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MixerServer).Report(ctx, req.(*ReportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Mixer_serviceDesc = grpc.ServiceDesc{
	ServiceName: "istio.mixer.v1.Mixer",
	HandlerType: (*MixerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Check",
			Handler:    _Mixer_Check_Handler,
		},
		{
			MethodName: "Report",
			Handler:    _Mixer_Report_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mixer/v1/service.proto",
}

func init() { proto.RegisterFile("mixer/v1/service.proto", fileDescriptorService) }

var fileDescriptorService = []byte{
	// 216 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcb, 0xcd, 0xac, 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, 0xaf, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff,
	0xd8, 0x38, 0xef, 0x37, 0x42, 0x01, 0x00, 0x00,
}
