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

package v1

import (
	context "context"
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
	_ "google.golang.org/protobuf/types/known/timestamppb"
	io "io"
	math "math"
	math_bits "math/bits"
	time "time"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen

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

type Permission struct {
	Id          int64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Method      string     `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Path        string     `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	Title       string     `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	Description string     `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	CreatedAt   *time.Time `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"`
	UpdatedAt   *time.Time `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"`
}

func (m *Permission) Reset()         { *m = Permission{} }
func (m *Permission) String() string { return proto.CompactTextString(m) }
func (*Permission) ProtoMessage()    {}
func (*Permission) Descriptor() ([]byte, []int) {
	return fileDescriptor_6f5311b1c95edab2, []int{0}
}
func (m *Permission) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Permission.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *Permission) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Permission.Merge(m, src)
}
func (m *Permission) XXX_Size() int {
	return m.Size()
}
func (m *Permission) XXX_DiscardUnknown() {
	xxx_messageInfo_Permission.DiscardUnknown(m)
}

var xxx_messageInfo_Permission proto.InternalMessageInfo

func (m *Permission) GetId() int64 {
	if m != nil {
		return m.Id
	}
	return 0
}

func (m *Permission) GetMethod() string {
	if m != nil {
		return m.Method
	}
	return ""
}

func (m *Permission) GetPath() string {
	if m != nil {
		return m.Path
	}
	return ""
}

func (m *Permission) GetTitle() string {
	if m != nil {
		return m.Title
	}
	return ""
}

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

func (m *Permission) GetCreatedAt() *time.Time {
	if m != nil {
		return m.CreatedAt
	}
	return nil
}

func (m *Permission) GetUpdatedAt() *time.Time {
	if m != nil {
		return m.UpdatedAt
	}
	return nil
}

type DeletePermissionRequest struct {
	Id []int64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"`
}

func (m *DeletePermissionRequest) Reset()         { *m = DeletePermissionRequest{} }
func (m *DeletePermissionRequest) String() string { return proto.CompactTextString(m) }
func (*DeletePermissionRequest) ProtoMessage()    {}
func (*DeletePermissionRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_6f5311b1c95edab2, []int{1}
}
func (m *DeletePermissionRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DeletePermissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DeletePermissionRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *DeletePermissionRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DeletePermissionRequest.Merge(m, src)
}
func (m *DeletePermissionRequest) XXX_Size() int {
	return m.Size()
}
func (m *DeletePermissionRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_DeletePermissionRequest.DiscardUnknown(m)
}

var xxx_messageInfo_DeletePermissionRequest proto.InternalMessageInfo

func (m *DeletePermissionRequest) GetId() []int64 {
	if m != nil {
		return m.Id
	}
	return nil
}

type GetPermissionRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (m *GetPermissionRequest) Reset()         { *m = GetPermissionRequest{} }
func (m *GetPermissionRequest) String() string { return proto.CompactTextString(m) }
func (*GetPermissionRequest) ProtoMessage()    {}
func (*GetPermissionRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_6f5311b1c95edab2, []int{2}
}
func (m *GetPermissionRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GetPermissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GetPermissionRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *GetPermissionRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetPermissionRequest.Merge(m, src)
}
func (m *GetPermissionRequest) XXX_Size() int {
	return m.Size()
}
func (m *GetPermissionRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_GetPermissionRequest.DiscardUnknown(m)
}

var xxx_messageInfo_GetPermissionRequest proto.InternalMessageInfo

func (m *GetPermissionRequest) GetId() int64 {
	if m != nil {
		return m.Id
	}
	return 0
}

type GetPermissionReply struct {
	Permission *Permission `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"`
}

func (m *GetPermissionReply) Reset()         { *m = GetPermissionReply{} }
func (m *GetPermissionReply) String() string { return proto.CompactTextString(m) }
func (*GetPermissionReply) ProtoMessage()    {}
func (*GetPermissionReply) Descriptor() ([]byte, []int) {
	return fileDescriptor_6f5311b1c95edab2, []int{3}
}
func (m *GetPermissionReply) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GetPermissionReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GetPermissionReply.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *GetPermissionReply) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetPermissionReply.Merge(m, src)
}
func (m *GetPermissionReply) XXX_Size() int {
	return m.Size()
}
func (m *GetPermissionReply) XXX_DiscardUnknown() {
	xxx_messageInfo_GetPermissionReply.DiscardUnknown(m)
}

var xxx_messageInfo_GetPermissionReply proto.InternalMessageInfo

func (m *GetPermissionReply) GetPermission() *Permission {
	if m != nil {
		return m.Permission
	}
	return nil
}

type ListPermissionRequest struct {
	Page   int64    `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	Size_  int64    `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Wd     string   `protobuf:"bytes,3,opt,name=wd,proto3" json:"wd,omitempty"`
	Method []string `protobuf:"bytes,4,rep,name=method,proto3" json:"method,omitempty"`
	Path   string   `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
}

func (m *ListPermissionRequest) Reset()         { *m = ListPermissionRequest{} }
func (m *ListPermissionRequest) String() string { return proto.CompactTextString(m) }
func (*ListPermissionRequest) ProtoMessage()    {}
func (*ListPermissionRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_6f5311b1c95edab2, []int{4}
}
func (m *ListPermissionRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *ListPermissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_ListPermissionRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *ListPermissionRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ListPermissionRequest.Merge(m, src)
}
func (m *ListPermissionRequest) XXX_Size() int {
	return m.Size()
}
func (m *ListPermissionRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_ListPermissionRequest.DiscardUnknown(m)
}

var xxx_messageInfo_ListPermissionRequest proto.InternalMessageInfo

func (m *ListPermissionRequest) GetPage() int64 {
	if m != nil {
		return m.Page
	}
	return 0
}

func (m *ListPermissionRequest) GetSize_() int64 {
	if m != nil {
		return m.Size_
	}
	return 0
}

func (m *ListPermissionRequest) GetWd() string {
	if m != nil {
		return m.Wd
	}
	return ""
}

func (m *ListPermissionRequest) GetMethod() []string {
	if m != nil {
		return m.Method
	}
	return nil
}

func (m *ListPermissionRequest) GetPath() string {
	if m != nil {
		return m.Path
	}
	return ""
}

type ListPermissionReply struct {
	Total      int64         `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Permission []*Permission `protobuf:"bytes,2,rep,name=permission,proto3" json:"permission,omitempty"`
}

func (m *ListPermissionReply) Reset()         { *m = ListPermissionReply{} }
func (m *ListPermissionReply) String() string { return proto.CompactTextString(m) }
func (*ListPermissionReply) ProtoMessage()    {}
func (*ListPermissionReply) Descriptor() ([]byte, []int) {
	return fileDescriptor_6f5311b1c95edab2, []int{5}
}
func (m *ListPermissionReply) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *ListPermissionReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_ListPermissionReply.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *ListPermissionReply) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ListPermissionReply.Merge(m, src)
}
func (m *ListPermissionReply) XXX_Size() int {
	return m.Size()
}
func (m *ListPermissionReply) XXX_DiscardUnknown() {
	xxx_messageInfo_ListPermissionReply.DiscardUnknown(m)
}

var xxx_messageInfo_ListPermissionReply proto.InternalMessageInfo

func (m *ListPermissionReply) GetTotal() int64 {
	if m != nil {
		return m.Total
	}
	return 0
}

func (m *ListPermissionReply) GetPermission() []*Permission {
	if m != nil {
		return m.Permission
	}
	return nil
}

func init() {
	proto.RegisterType((*Permission)(nil), "api.v1.Permission")
	proto.RegisterType((*DeletePermissionRequest)(nil), "api.v1.DeletePermissionRequest")
	proto.RegisterType((*GetPermissionRequest)(nil), "api.v1.GetPermissionRequest")
	proto.RegisterType((*GetPermissionReply)(nil), "api.v1.GetPermissionReply")
	proto.RegisterType((*ListPermissionRequest)(nil), "api.v1.ListPermissionRequest")
	proto.RegisterType((*ListPermissionReply)(nil), "api.v1.ListPermissionReply")
}

func init() { proto.RegisterFile("api/v1/permission.proto", fileDescriptor_6f5311b1c95edab2) }

var fileDescriptor_6f5311b1c95edab2 = []byte{
	// 549 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xc1, 0x6e, 0xd3, 0x40,
	0x10, 0x86, 0xb3, 0x76, 0x12, 0xd4, 0x89, 0x5a, 0xc1, 0x12, 0x1a, 0xe3, 0xb6, 0x8e, 0xe5, 0x03,
	0x0a, 0x1c, 0x6c, 0x25, 0x88, 0x0b, 0x1c, 0x50, 0x2a, 0x10, 0x20, 0x71, 0x88, 0x22, 0xb8, 0x20,
	0x55, 0x95, 0x1b, 0x2f, 0xe9, 0x4a, 0x76, 0x76, 0xb1, 0x37, 0xa9, 0x02, 0xb7, 0x3e, 0x41, 0x25,
	0x5e, 0x87, 0x07, 0xe0, 0x58, 0x89, 0x0b, 0x37, 0x50, 0xc2, 0x83, 0x20, 0xaf, 0xd7, 0x8d, 0x9b,
	0xb8, 0x82, 0xdb, 0xec, 0xcc, 0xec, 0xff, 0xcf, 0xce, 0xe7, 0x04, 0x5a, 0x3e, 0xa7, 0xde, 0xac,
	0xeb, 0x71, 0x12, 0x47, 0x34, 0x49, 0x28, 0x9b, 0xb8, 0x3c, 0x66, 0x82, 0xe1, 0xba, 0xcf, 0xa9,
	0x3b, 0xeb, 0x9a, 0xed, 0x31, 0x63, 0xe3, 0x90, 0x78, 0x32, 0x7b, 0x32, 0xfd, 0xe8, 0x09, 0x1a,
	0x91, 0x44, 0xf8, 0x11, 0xcf, 0x1a, 0xcd, 0xe6, 0x98, 0x8d, 0x99, 0x0c, 0xbd, 0x34, 0x52, 0xd9,
	0x7d, 0x75, 0x2d, 0x95, 0xf7, 0x27, 0x13, 0x26, 0x7c, 0x41, 0xd9, 0x24, 0x51, 0xd5, 0xbd, 0x75,
	0x51, 0x12, 0x71, 0x31, 0xcf, 0x8a, 0xce, 0xb9, 0x06, 0x30, 0xb8, 0x1a, 0x07, 0xef, 0x80, 0x46,
	0x03, 0x03, 0xd9, 0xa8, 0xa3, 0x0f, 0x35, 0x1a, 0xe0, 0x5d, 0xa8, 0x47, 0x44, 0x9c, 0xb2, 0xc0,
	0xd0, 0x6c, 0xd4, 0xd9, 0x1a, 0xaa, 0x13, 0xc6, 0x50, 0xe5, 0xbe, 0x38, 0x35, 0x74, 0x99, 0x95,
	0x31, 0x6e, 0x42, 0x4d, 0x50, 0x11, 0x12, 0xa3, 0x2a, 0x93, 0xd9, 0x01, 0xdb, 0xd0, 0x08, 0x48,
	0x32, 0x8a, 0x29, 0x4f, 0x67, 0x32, 0x6a, 0xb2, 0x56, 0x4c, 0xe1, 0xe7, 0x00, 0xa3, 0x98, 0xf8,
	0x82, 0x04, 0xc7, 0xbe, 0x30, 0xea, 0x36, 0xea, 0x34, 0x7a, 0xa6, 0x9b, 0x0d, 0xed, 0xe6, 0x43,
	0xbb, 0xef, 0xf2, 0x4d, 0x1c, 0x56, 0x2f, 0x7e, 0xb5, 0xd1, 0x70, 0x4b, 0xdd, 0xe9, 0x8b, 0x54,
	0x60, 0xca, 0x83, 0x5c, 0xe0, 0xd6, 0xff, 0x0a, 0xa8, 0x3b, 0x7d, 0xe1, 0x3c, 0x84, 0xd6, 0x0b,
	0x12, 0x12, 0x41, 0x56, 0x9b, 0x18, 0x92, 0x4f, 0x53, 0x92, 0x88, 0xab, 0x85, 0xe8, 0xd9, 0x42,
	0x9c, 0x07, 0xd0, 0x7c, 0x45, 0xc4, 0xcd, 0x7d, 0x6a, 0x71, 0xce, 0x6b, 0xc0, 0x6b, 0x7d, 0x3c,
	0x9c, 0xe3, 0x1e, 0xc0, 0x8a, 0xbd, 0xec, 0x6e, 0xf4, 0xb0, 0x9b, 0xc1, 0x77, 0x0b, 0xcd, 0x85,
	0x2e, 0xe7, 0x0b, 0xdc, 0x7b, 0x4b, 0x93, 0x12, 0x4b, 0xc9, 0x60, 0x4c, 0x94, 0xa9, 0x8c, 0xd3,
	0x5c, 0x42, 0x3f, 0x13, 0x49, 0x4b, 0x1f, 0xca, 0x38, 0x1d, 0xed, 0x2c, 0x50, 0xa4, 0xb4, 0xb3,
	0x22, 0xd3, 0xaa, 0xad, 0x97, 0x30, 0xad, 0xad, 0x98, 0x3a, 0xc7, 0x70, 0x77, 0xdd, 0x3c, 0x7d,
	0x47, 0x8a, 0x9a, 0x09, 0x3f, 0x54, 0xde, 0xd9, 0x61, 0xed, 0x75, 0x9a, 0xad, 0xff, 0xfb, 0x75,
	0xbd, 0x6f, 0x1a, 0x6c, 0xaf, 0x4a, 0xfd, 0xc1, 0x1b, 0x7c, 0x04, 0xb7, 0xdf, 0x4b, 0x32, 0x85,
	0xcf, 0xb2, 0x44, 0xc5, 0xdc, 0xdd, 0x20, 0xfc, 0x32, 0xfd, 0xae, 0x9d, 0x83, 0xf3, 0x1f, 0x7f,
	0xbe, 0x6a, 0x2d, 0x13, 0x7b, 0x1b, 0xbf, 0xb6, 0xa7, 0xe8, 0x11, 0x3e, 0x82, 0xed, 0x6b, 0x60,
	0xf0, 0x7e, 0xae, 0x5d, 0xc6, 0xd5, 0x2c, 0x71, 0x76, 0x4c, 0xe9, 0xd0, 0xc4, 0x25, 0x0e, 0x38,
	0x82, 0x9d, 0xeb, 0x0b, 0xc3, 0x07, 0xb9, 0x42, 0x29, 0x45, 0x73, 0xef, 0xa6, 0x32, 0x0f, 0xe7,
	0x4e, 0x5b, 0x3a, 0xdd, 0xc7, 0xad, 0x4d, 0x27, 0x2f, 0xa4, 0x89, 0x38, 0x7c, 0xf2, 0x7d, 0x61,
	0xa1, 0xcb, 0x85, 0x85, 0x7e, 0x2f, 0x2c, 0x74, 0xb1, 0xb4, 0x2a, 0x97, 0x4b, 0xab, 0xf2, 0x73,
	0x69, 0x55, 0x40, 0xfd, 0xa5, 0x0c, 0xd0, 0x87, 0x3b, 0x11, 0x8b, 0x49, 0xc0, 0x46, 0x4a, 0xe3,
	0xd9, 0xac, 0x7b, 0x52, 0x97, 0x3b, 0x7b, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xc9, 0x53,
	0xe7, 0x91, 0x04, 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

// PermissionAPIClient is the client API for PermissionAPI service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PermissionAPIClient interface {
	UpdatePermission(ctx context.Context, in *Permission, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*Permission, error)
	ListPermission(ctx context.Context, in *ListPermissionRequest, opts ...grpc.CallOption) (*ListPermissionReply, error)
}

type permissionAPIClient struct {
	cc *grpc.ClientConn
}

func NewPermissionAPIClient(cc *grpc.ClientConn) PermissionAPIClient {
	return &permissionAPIClient{cc}
}

func (c *permissionAPIClient) UpdatePermission(ctx context.Context, in *Permission, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/api.v1.PermissionAPI/UpdatePermission", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *permissionAPIClient) GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*Permission, error) {
	out := new(Permission)
	err := c.cc.Invoke(ctx, "/api.v1.PermissionAPI/GetPermission", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *permissionAPIClient) ListPermission(ctx context.Context, in *ListPermissionRequest, opts ...grpc.CallOption) (*ListPermissionReply, error) {
	out := new(ListPermissionReply)
	err := c.cc.Invoke(ctx, "/api.v1.PermissionAPI/ListPermission", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PermissionAPIServer is the server API for PermissionAPI service.
type PermissionAPIServer interface {
	UpdatePermission(context.Context, *Permission) (*emptypb.Empty, error)
	GetPermission(context.Context, *GetPermissionRequest) (*Permission, error)
	ListPermission(context.Context, *ListPermissionRequest) (*ListPermissionReply, error)
}

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

func (*UnimplementedPermissionAPIServer) UpdatePermission(ctx context.Context, req *Permission) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdatePermission not implemented")
}
func (*UnimplementedPermissionAPIServer) GetPermission(ctx context.Context, req *GetPermissionRequest) (*Permission, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetPermission not implemented")
}
func (*UnimplementedPermissionAPIServer) ListPermission(ctx context.Context, req *ListPermissionRequest) (*ListPermissionReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListPermission not implemented")
}

func RegisterPermissionAPIServer(s *grpc.Server, srv PermissionAPIServer) {
	s.RegisterService(&_PermissionAPI_serviceDesc, srv)
}

func _PermissionAPI_UpdatePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Permission)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionAPIServer).UpdatePermission(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/api.v1.PermissionAPI/UpdatePermission",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionAPIServer).UpdatePermission(ctx, req.(*Permission))
	}
	return interceptor(ctx, in, info, handler)
}

func _PermissionAPI_GetPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetPermissionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionAPIServer).GetPermission(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/api.v1.PermissionAPI/GetPermission",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionAPIServer).GetPermission(ctx, req.(*GetPermissionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PermissionAPI_ListPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListPermissionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionAPIServer).ListPermission(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/api.v1.PermissionAPI/ListPermission",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionAPIServer).ListPermission(ctx, req.(*ListPermissionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _PermissionAPI_serviceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.PermissionAPI",
	HandlerType: (*PermissionAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdatePermission",
			Handler:    _PermissionAPI_UpdatePermission_Handler,
		},
		{
			MethodName: "GetPermission",
			Handler:    _PermissionAPI_GetPermission_Handler,
		},
		{
			MethodName: "ListPermission",
			Handler:    _PermissionAPI_ListPermission_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/permission.proto",
}

func (m *Permission) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Permission) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Permission) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.UpdatedAt != nil {
		n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt):])
		if err1 != nil {
			return 0, err1
		}
		i -= n1
		i = encodeVarintPermission(dAtA, i, uint64(n1))
		i--
		dAtA[i] = 0x3a
	}
	if m.CreatedAt != nil {
		n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt):])
		if err2 != nil {
			return 0, err2
		}
		i -= n2
		i = encodeVarintPermission(dAtA, i, uint64(n2))
		i--
		dAtA[i] = 0x32
	}
	if len(m.Description) > 0 {
		i -= len(m.Description)
		copy(dAtA[i:], m.Description)
		i = encodeVarintPermission(dAtA, i, uint64(len(m.Description)))
		i--
		dAtA[i] = 0x2a
	}
	if len(m.Title) > 0 {
		i -= len(m.Title)
		copy(dAtA[i:], m.Title)
		i = encodeVarintPermission(dAtA, i, uint64(len(m.Title)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Path) > 0 {
		i -= len(m.Path)
		copy(dAtA[i:], m.Path)
		i = encodeVarintPermission(dAtA, i, uint64(len(m.Path)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Method) > 0 {
		i -= len(m.Method)
		copy(dAtA[i:], m.Method)
		i = encodeVarintPermission(dAtA, i, uint64(len(m.Method)))
		i--
		dAtA[i] = 0x12
	}
	if m.Id != 0 {
		i = encodeVarintPermission(dAtA, i, uint64(m.Id))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *DeletePermissionRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *DeletePermissionRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *DeletePermissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Id) > 0 {
		dAtA4 := make([]byte, len(m.Id)*10)
		var j3 int
		for _, num1 := range m.Id {
			num := uint64(num1)
			for num >= 1<<7 {
				dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j3++
			}
			dAtA4[j3] = uint8(num)
			j3++
		}
		i -= j3
		copy(dAtA[i:], dAtA4[:j3])
		i = encodeVarintPermission(dAtA, i, uint64(j3))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *GetPermissionRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *GetPermissionRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GetPermissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Id != 0 {
		i = encodeVarintPermission(dAtA, i, uint64(m.Id))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *GetPermissionReply) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *GetPermissionReply) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GetPermissionReply) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Permission != nil {
		{
			size, err := m.Permission.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintPermission(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *ListPermissionRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *ListPermissionRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *ListPermissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Path) > 0 {
		i -= len(m.Path)
		copy(dAtA[i:], m.Path)
		i = encodeVarintPermission(dAtA, i, uint64(len(m.Path)))
		i--
		dAtA[i] = 0x2a
	}
	if len(m.Method) > 0 {
		for iNdEx := len(m.Method) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.Method[iNdEx])
			copy(dAtA[i:], m.Method[iNdEx])
			i = encodeVarintPermission(dAtA, i, uint64(len(m.Method[iNdEx])))
			i--
			dAtA[i] = 0x22
		}
	}
	if len(m.Wd) > 0 {
		i -= len(m.Wd)
		copy(dAtA[i:], m.Wd)
		i = encodeVarintPermission(dAtA, i, uint64(len(m.Wd)))
		i--
		dAtA[i] = 0x1a
	}
	if m.Size_ != 0 {
		i = encodeVarintPermission(dAtA, i, uint64(m.Size_))
		i--
		dAtA[i] = 0x10
	}
	if m.Page != 0 {
		i = encodeVarintPermission(dAtA, i, uint64(m.Page))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *ListPermissionReply) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *ListPermissionReply) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *ListPermissionReply) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Permission) > 0 {
		for iNdEx := len(m.Permission) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Permission[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintPermission(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if m.Total != 0 {
		i = encodeVarintPermission(dAtA, i, uint64(m.Total))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func encodeVarintPermission(dAtA []byte, offset int, v uint64) int {
	offset -= sovPermission(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *Permission) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Id != 0 {
		n += 1 + sovPermission(uint64(m.Id))
	}
	l = len(m.Method)
	if l > 0 {
		n += 1 + l + sovPermission(uint64(l))
	}
	l = len(m.Path)
	if l > 0 {
		n += 1 + l + sovPermission(uint64(l))
	}
	l = len(m.Title)
	if l > 0 {
		n += 1 + l + sovPermission(uint64(l))
	}
	l = len(m.Description)
	if l > 0 {
		n += 1 + l + sovPermission(uint64(l))
	}
	if m.CreatedAt != nil {
		l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt)
		n += 1 + l + sovPermission(uint64(l))
	}
	if m.UpdatedAt != nil {
		l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt)
		n += 1 + l + sovPermission(uint64(l))
	}
	return n
}

func (m *DeletePermissionRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Id) > 0 {
		l = 0
		for _, e := range m.Id {
			l += sovPermission(uint64(e))
		}
		n += 1 + sovPermission(uint64(l)) + l
	}
	return n
}

func (m *GetPermissionRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Id != 0 {
		n += 1 + sovPermission(uint64(m.Id))
	}
	return n
}

func (m *GetPermissionReply) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Permission != nil {
		l = m.Permission.Size()
		n += 1 + l + sovPermission(uint64(l))
	}
	return n
}

func (m *ListPermissionRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Page != 0 {
		n += 1 + sovPermission(uint64(m.Page))
	}
	if m.Size_ != 0 {
		n += 1 + sovPermission(uint64(m.Size_))
	}
	l = len(m.Wd)
	if l > 0 {
		n += 1 + l + sovPermission(uint64(l))
	}
	if len(m.Method) > 0 {
		for _, s := range m.Method {
			l = len(s)
			n += 1 + l + sovPermission(uint64(l))
		}
	}
	l = len(m.Path)
	if l > 0 {
		n += 1 + l + sovPermission(uint64(l))
	}
	return n
}

func (m *ListPermissionReply) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Total != 0 {
		n += 1 + sovPermission(uint64(m.Total))
	}
	if len(m.Permission) > 0 {
		for _, e := range m.Permission {
			l = e.Size()
			n += 1 + l + sovPermission(uint64(l))
		}
	}
	return n
}

func sovPermission(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozPermission(x uint64) (n int) {
	return sovPermission(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Permission) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowPermission
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Permission: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Permission: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
			m.Id = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Id |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Method = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Path = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Title = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Description = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.CreatedAt == nil {
				m.CreatedAt = new(time.Time)
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.UpdatedAt == nil {
				m.UpdatedAt = new(time.Time)
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipPermission(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthPermission
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *DeletePermissionRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowPermission
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: DeletePermissionRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: DeletePermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType == 0 {
				var v int64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowPermission
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					v |= int64(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.Id = append(m.Id, v)
			} else if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowPermission
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					packedLen |= int(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				if packedLen < 0 {
					return ErrInvalidLengthPermission
				}
				postIndex := iNdEx + packedLen
				if postIndex < 0 {
					return ErrInvalidLengthPermission
				}
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				var elementCount int
				var count int
				for _, integer := range dAtA[iNdEx:postIndex] {
					if integer < 128 {
						count++
					}
				}
				elementCount = count
				if elementCount != 0 && len(m.Id) == 0 {
					m.Id = make([]int64, 0, elementCount)
				}
				for iNdEx < postIndex {
					var v int64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowPermission
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						v |= int64(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.Id = append(m.Id, v)
				}
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
		default:
			iNdEx = preIndex
			skippy, err := skipPermission(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthPermission
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GetPermissionRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowPermission
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: GetPermissionRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GetPermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
			m.Id = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Id |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipPermission(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthPermission
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GetPermissionReply) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowPermission
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: GetPermissionReply: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GetPermissionReply: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Permission == nil {
				m.Permission = &Permission{}
			}
			if err := m.Permission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipPermission(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthPermission
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ListPermissionRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowPermission
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: ListPermissionRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ListPermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType)
			}
			m.Page = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Page |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
			}
			m.Size_ = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Size_ |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Wd", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Wd = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Method = append(m.Method, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Path = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipPermission(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthPermission
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ListPermissionReply) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowPermission
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: ListPermissionReply: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ListPermissionReply: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
			}
			m.Total = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Total |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthPermission
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthPermission
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Permission = append(m.Permission, &Permission{})
			if err := m.Permission[len(m.Permission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipPermission(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthPermission
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipPermission(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowPermission
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowPermission
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthPermission
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupPermission
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthPermission
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthPermission        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPermission          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPermission = fmt.Errorf("proto: unexpected end of group")
)
