package pb

import (
	context "context"
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

const _ = proto.ProtoPackageIsVersion3 

type ValidateRequest struct {
	UserID               string   `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	Scopes               string   `protobuf:"bytes,2,opt,name=scopes,proto3" json:"scopes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *ValidateRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ValidateRequest.Unmarshal(m, b)
}
func (m *ValidateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ValidateRequest.Marshal(b, m, deterministic)
}
func (m *ValidateRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ValidateRequest.Merge(m, src)
}
func (m *ValidateRequest) XXX_Size() int {
	return xxx_messageInfo_ValidateRequest.Size(m)
}
func (m *ValidateRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_ValidateRequest.DiscardUnknown(m)
}

var xxx_messageInfo_ValidateRequest proto.InternalMessageInfo

func (m *ValidateRequest) GetUserID() string {
	if m != nil {
		return m.UserID
	}
	return ""
}

func (m *ValidateRequest) GetScopes() string {
	if m != nil {
		return m.Scopes
	}
	return ""
}

type ValidateResponse struct {
	Valid                bool     `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	Scopes               string   `protobuf:"bytes,2,opt,name=scopes,proto3" json:"scopes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *ValidateResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ValidateResponse.Unmarshal(m, b)
}
func (m *ValidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ValidateResponse.Marshal(b, m, deterministic)
}
func (m *ValidateResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ValidateResponse.Merge(m, src)
}
func (m *ValidateResponse) XXX_Size() int {
	return xxx_messageInfo_ValidateResponse.Size(m)
}
func (m *ValidateResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_ValidateResponse.DiscardUnknown(m)
}

var xxx_messageInfo_ValidateResponse proto.InternalMessageInfo

func (m *ValidateResponse) GetValid() bool {
	if m != nil {
		return m.Valid
	}
	return false
}

func (m *ValidateResponse) GetScopes() string {
	if m != nil {
		return m.Scopes
	}
	return ""
}

func init() {
	proto.RegisterType((*ValidateRequest)(nil), "pb.ValidateRequest")
	proto.RegisterType((*ValidateResponse)(nil), "pb.ValidateResponse")
}

func init() { proto.RegisterFile("grpc/scope-validator.proto", fileDescriptor_6953615eb61b0b78) }

var fileDescriptor_6953615eb61b0b78 = []byte{

	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0x2f, 0x2a, 0x48,
	0xd6, 0x2f, 0x4e, 0xce, 0x2f, 0x48, 0xd5, 0x2d, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f,
	0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0x72, 0xe4, 0xe2, 0x0f, 0x83,
	0x08, 0xa7, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x89, 0x71, 0xb1, 0x95, 0x16, 0xa7,
	0x16, 0x79, 0xba, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x41, 0x79, 0x20, 0x71, 0xb0, 0x39,
	0xc5, 0x12, 0x4c, 0x10, 0x71, 0x08, 0x4f, 0xc9, 0x81, 0x4b, 0x00, 0x61, 0x44, 0x71, 0x41, 0x7e,
	0x5e, 0x71, 0xaa, 0x90, 0x08, 0x17, 0x2b, 0xd8, 0x36, 0xb0, 0x11, 0x1c, 0x41, 0x10, 0x0e, 0x2e,
	0x13, 0x8c, 0x3c, 0xb9, 0xf8, 0x82, 0x41, 0xac, 0x30, 0x98, 0x03, 0x85, 0xcc, 0xb9, 0x38, 0x60,
	0x66, 0x0a, 0x09, 0xeb, 0x15, 0x24, 0xe9, 0xa1, 0x39, 0x52, 0x4a, 0x04, 0x55, 0x10, 0x62, 0xad,
	0x12, 0x43, 0x12, 0x1b, 0xd8, 0x6b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0xbf, 0xa9,
	0x04, 0xf8, 0x00, 0x00, 0x00,
}

var _ context.Context
var _ grpc.ClientConn

const _ = grpc.SupportPackageIsVersion4

type ScopeValidatorClient interface {
	Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
}

type scopeValidatorClient struct {
	cc *grpc.ClientConn
}

func NewScopeValidatorClient(cc *grpc.ClientConn) ScopeValidatorClient {
	return &scopeValidatorClient{cc}
}

func (c *scopeValidatorClient) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) {
	out := new(ValidateResponse)
	err := c.cc.Invoke(ctx, "/pb.ScopeValidator/Validate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

type ScopeValidatorServer interface {
	Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
}

type UnimplementedScopeValidatorServer struct {
}

func (*UnimplementedScopeValidatorServer) Validate(ctx context.Context, req *ValidateRequest) (*ValidateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented")
}

func RegisterScopeValidatorServer(s *grpc.Server, srv ScopeValidatorServer) {
	s.RegisterService(&_ScopeValidator_serviceDesc, srv)
}

func _ScopeValidator_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ValidateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ScopeValidatorServer).Validate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.ScopeValidator/Validate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ScopeValidatorServer).Validate(ctx, req.(*ValidateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _ScopeValidator_serviceDesc = grpc.ServiceDesc{
	ServiceName: "pb.ScopeValidator",
	HandlerType: (*ScopeValidatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Validate",
			Handler:    _ScopeValidator_Validate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/scope-validator.proto",
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: grpc/scope-validator.proto

package pb

import (
	context "context"
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// 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.ProtoPackageIsVersion3 // please upgrade the proto package

type ValidateRequest struct {
	UserID               string   `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	Scopes               string   `protobuf:"bytes,2,opt,name=scopes,proto3" json:"scopes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *ValidateRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ValidateRequest.Unmarshal(m, b)
}
func (m *ValidateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ValidateRequest.Marshal(b, m, deterministic)
}
func (m *ValidateRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ValidateRequest.Merge(m, src)
}
func (m *ValidateRequest) XXX_Size() int {
	return xxx_messageInfo_ValidateRequest.Size(m)
}
func (m *ValidateRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_ValidateRequest.DiscardUnknown(m)
}

var xxx_messageInfo_ValidateRequest proto.InternalMessageInfo

func (m *ValidateRequest) GetUserID() string {
	if m != nil {
		return m.UserID
	}
	return ""
}

func (m *ValidateRequest) GetScopes() string {
	if m != nil {
		return m.Scopes
	}
	return ""
}

type ValidateResponse struct {
	Valid                bool     `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	Scopes               string   `protobuf:"bytes,2,opt,name=scopes,proto3" json:"scopes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *ValidateResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ValidateResponse.Unmarshal(m, b)
}
func (m *ValidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ValidateResponse.Marshal(b, m, deterministic)
}
func (m *ValidateResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ValidateResponse.Merge(m, src)
}
func (m *ValidateResponse) XXX_Size() int {
	return xxx_messageInfo_ValidateResponse.Size(m)
}
func (m *ValidateResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_ValidateResponse.DiscardUnknown(m)
}

var xxx_messageInfo_ValidateResponse proto.InternalMessageInfo

func (m *ValidateResponse) GetValid() bool {
	if m != nil {
		return m.Valid
	}
	return false
}

func (m *ValidateResponse) GetScopes() string {
	if m != nil {
		return m.Scopes
	}
	return ""
}

func init() {
	proto.RegisterType((*ValidateRequest)(nil), "pb.ValidateRequest")
	proto.RegisterType((*ValidateResponse)(nil), "pb.ValidateResponse")
}

func init() { proto.RegisterFile("grpc/scope-validator.proto", fileDescriptor_6953615eb61b0b78) }

var fileDescriptor_6953615eb61b0b78 = []byte{
	// 165 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0x2f, 0x2a, 0x48,
	0xd6, 0x2f, 0x4e, 0xce, 0x2f, 0x48, 0xd5, 0x2d, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f,
	0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0x72, 0xe4, 0xe2, 0x0f, 0x83,
	0x08, 0xa7, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x89, 0x71, 0xb1, 0x95, 0x16, 0xa7,
	0x16, 0x79, 0xba, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x41, 0x79, 0x20, 0x71, 0xb0, 0x39,
	0xc5, 0x12, 0x4c, 0x10, 0x71, 0x08, 0x4f, 0xc9, 0x81, 0x4b, 0x00, 0x61, 0x44, 0x71, 0x41, 0x7e,
	0x5e, 0x71, 0xaa, 0x90, 0x08, 0x17, 0x2b, 0xd8, 0x36, 0xb0, 0x11, 0x1c, 0x41, 0x10, 0x0e, 0x2e,
	0x13, 0x8c, 0x3c, 0xb9, 0xf8, 0x82, 0x41, 0xac, 0x30, 0x98, 0x03, 0x85, 0xcc, 0xb9, 0x38, 0x60,
	0x66, 0x0a, 0x09, 0xeb, 0x15, 0x24, 0xe9, 0xa1, 0x39, 0x52, 0x4a, 0x04, 0x55, 0x10, 0x62, 0xad,
	0x12, 0x43, 0x12, 0x1b, 0xd8, 0x6b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0xbf, 0xa9,
	0x04, 0xf8, 0x00, 0x00, 0x00,
}

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

// ScopeValidatorClient is the client API for ScopeValidator service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ScopeValidatorClient interface {
	Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
}

type scopeValidatorClient struct {
	cc *grpc.ClientConn
}

func NewScopeValidatorClient(cc *grpc.ClientConn) ScopeValidatorClient {
	return &scopeValidatorClient{cc}
}

func (c *scopeValidatorClient) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) {
	out := new(ValidateResponse)
	err := c.cc.Invoke(ctx, "/pb.ScopeValidator/Validate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ScopeValidatorServer is the server API for ScopeValidator service.
type ScopeValidatorServer interface {
	Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
}

// UnimplementedScopeValidatorServer can be embedded to have forward compatible implementations.
type UnimplementedScopeValidatorServer struct {
}

func (*UnimplementedScopeValidatorServer) Validate(ctx context.Context, req *ValidateRequest) (*ValidateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented")
}

func RegisterScopeValidatorServer(s *grpc.Server, srv ScopeValidatorServer) {
	s.RegisterService(&_ScopeValidator_serviceDesc, srv)
}

func _ScopeValidator_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ValidateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ScopeValidatorServer).Validate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.ScopeValidator/Validate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ScopeValidatorServer).Validate(ctx, req.(*ValidateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _ScopeValidator_serviceDesc = grpc.ServiceDesc{
	ServiceName: "pb.ScopeValidator",
	HandlerType: (*ScopeValidatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Validate",
			Handler:    _ScopeValidator_Validate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/scope-validator.proto",
}
