// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.9
// 	protoc        (unknown)
// source: common/v1/pagination.proto

package commonv1

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// 简单版分页（先用 offset；后续可切换游标）
type PageRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	PageSize      int32                  `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`   // 建议 <= 200
	Offset        int32                  `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`                       // 可与 page_token 互斥，先用 offset
	PageToken     string                 `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // 未来游标化时使用
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PageRequest) Reset() {
	*x = PageRequest{}
	mi := &file_common_v1_pagination_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PageRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PageRequest) ProtoMessage() {}

func (x *PageRequest) ProtoReflect() protoreflect.Message {
	mi := &file_common_v1_pagination_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PageRequest.ProtoReflect.Descriptor instead.
func (*PageRequest) Descriptor() ([]byte, []int) {
	return file_common_v1_pagination_proto_rawDescGZIP(), []int{0}
}

func (x *PageRequest) GetPageSize() int32 {
	if x != nil {
		return x.PageSize
	}
	return 0
}

func (x *PageRequest) GetOffset() int32 {
	if x != nil {
		return x.Offset
	}
	return 0
}

func (x *PageRequest) GetPageToken() string {
	if x != nil {
		return x.PageToken
	}
	return ""
}

type PageResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	NextPageToken string                 `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	Total         int64                  `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // 大表可不返
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PageResponse) Reset() {
	*x = PageResponse{}
	mi := &file_common_v1_pagination_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PageResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PageResponse) ProtoMessage() {}

func (x *PageResponse) ProtoReflect() protoreflect.Message {
	mi := &file_common_v1_pagination_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PageResponse.ProtoReflect.Descriptor instead.
func (*PageResponse) Descriptor() ([]byte, []int) {
	return file_common_v1_pagination_proto_rawDescGZIP(), []int{1}
}

func (x *PageResponse) GetNextPageToken() string {
	if x != nil {
		return x.NextPageToken
	}
	return ""
}

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

var File_common_v1_pagination_proto protoreflect.FileDescriptor

const file_common_v1_pagination_proto_rawDesc = "" +
	"\n" +
	"\x1acommon/v1/pagination.proto\x12\tcommon.v1\"a\n" +
	"\vPageRequest\x12\x1b\n" +
	"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x16\n" +
	"\x06offset\x18\x02 \x01(\x05R\x06offset\x12\x1d\n" +
	"\n" +
	"page_token\x18\x03 \x01(\tR\tpageToken\"L\n" +
	"\fPageResponse\x12&\n" +
	"\x0fnext_page_token\x18\x01 \x01(\tR\rnextPageToken\x12\x14\n" +
	"\x05total\x18\x02 \x01(\x03R\x05totalBCZAgithub.com/ArtisanCloud/PowerX/api/grpc/gen/go/common/v1;commonv1b\x06proto3"

var (
	file_common_v1_pagination_proto_rawDescOnce sync.Once
	file_common_v1_pagination_proto_rawDescData []byte
)

func file_common_v1_pagination_proto_rawDescGZIP() []byte {
	file_common_v1_pagination_proto_rawDescOnce.Do(func() {
		file_common_v1_pagination_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_common_v1_pagination_proto_rawDesc), len(file_common_v1_pagination_proto_rawDesc)))
	})
	return file_common_v1_pagination_proto_rawDescData
}

var file_common_v1_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_common_v1_pagination_proto_goTypes = []any{
	(*PageRequest)(nil),  // 0: common.v1.PageRequest
	(*PageResponse)(nil), // 1: common.v1.PageResponse
}
var file_common_v1_pagination_proto_depIdxs = []int32{
	0, // [0:0] is the sub-list for method output_type
	0, // [0:0] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_common_v1_pagination_proto_init() }
func file_common_v1_pagination_proto_init() {
	if File_common_v1_pagination_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_common_v1_pagination_proto_rawDesc), len(file_common_v1_pagination_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_common_v1_pagination_proto_goTypes,
		DependencyIndexes: file_common_v1_pagination_proto_depIdxs,
		MessageInfos:      file_common_v1_pagination_proto_msgTypes,
	}.Build()
	File_common_v1_pagination_proto = out.File
	file_common_v1_pagination_proto_goTypes = nil
	file_common_v1_pagination_proto_depIdxs = nil
}
