// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.19.0
// source: external/common/query/parameters.proto

package query

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

type SortOrder int32

const (
	SortOrder_ASC  SortOrder = 0
	SortOrder_DESC SortOrder = 1
)

// Enum value maps for SortOrder.
var (
	SortOrder_name = map[int32]string{
		0: "ASC",
		1: "DESC",
	}
	SortOrder_value = map[string]int32{
		"ASC":  0,
		"DESC": 1,
	}
)

func (x SortOrder) Enum() *SortOrder {
	p := new(SortOrder)
	*p = x
	return p
}

func (x SortOrder) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (SortOrder) Descriptor() protoreflect.EnumDescriptor {
	return file_external_common_query_parameters_proto_enumTypes[0].Descriptor()
}

func (SortOrder) Type() protoreflect.EnumType {
	return &file_external_common_query_parameters_proto_enumTypes[0]
}

func (x SortOrder) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use SortOrder.Descriptor instead.
func (SortOrder) EnumDescriptor() ([]byte, []int) {
	return file_external_common_query_parameters_proto_rawDescGZIP(), []int{0}
}

type Pagination struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Page number of the results to return.
	Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	// Amount of results to include per page.
	Size          int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Pagination) ProtoMessage() {}

func (x *Pagination) ProtoReflect() protoreflect.Message {
	mi := &file_external_common_query_parameters_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 Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) Descriptor() ([]byte, []int) {
	return file_external_common_query_parameters_proto_rawDescGZIP(), []int{0}
}

func (x *Pagination) GetPage() int32 {
	if x != nil {
		return x.Page
	}
	return 0
}

func (x *Pagination) GetSize() int32 {
	if x != nil {
		return x.Size
	}
	return 0
}

type Sorting struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Field to sort the list results on.
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	// Order the results should be returned in.
	Order         SortOrder `protobuf:"varint,2,opt,name=order,proto3,enum=chef.automate.api.common.query.SortOrder" json:"order,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Sorting) ProtoMessage() {}

func (x *Sorting) ProtoReflect() protoreflect.Message {
	mi := &file_external_common_query_parameters_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 Sorting.ProtoReflect.Descriptor instead.
func (*Sorting) Descriptor() ([]byte, []int) {
	return file_external_common_query_parameters_proto_rawDescGZIP(), []int{1}
}

func (x *Sorting) GetField() string {
	if x != nil {
		return x.Field
	}
	return ""
}

func (x *Sorting) GetOrder() SortOrder {
	if x != nil {
		return x.Order
	}
	return SortOrder_ASC
}

type Suggestion struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Field for which suggestions are being returned.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Text to search on for the type value.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// Filters to be applied to the results.
	Filter        []string `protobuf:"bytes,3,rep,name=filter,proto3" json:"filter,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Suggestion) Reset() {
	*x = Suggestion{}
	mi := &file_external_common_query_parameters_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Suggestion) ProtoMessage() {}

func (x *Suggestion) ProtoReflect() protoreflect.Message {
	mi := &file_external_common_query_parameters_proto_msgTypes[2]
	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 Suggestion.ProtoReflect.Descriptor instead.
func (*Suggestion) Descriptor() ([]byte, []int) {
	return file_external_common_query_parameters_proto_rawDescGZIP(), []int{2}
}

func (x *Suggestion) GetType() string {
	if x != nil {
		return x.Type
	}
	return ""
}

func (x *Suggestion) GetText() string {
	if x != nil {
		return x.Text
	}
	return ""
}

func (x *Suggestion) GetFilter() []string {
	if x != nil {
		return x.Filter
	}
	return nil
}

type Filter struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Field to filter on.
	Key string `protobuf:"bytes,20,opt,name=key,proto3" json:"key,omitempty"`
	// Include matches for this filter.(boolean)
	// `true` (default) *includes* all nodes that match this filter.
	// `false` *excludes* all nodes that match this filter.
	Exclude bool `protobuf:"varint,22,opt,name=exclude,proto3" json:"exclude,omitempty"`
	// Field values to filter on.
	Values        []string `protobuf:"bytes,23,rep,name=values,proto3" json:"values,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Filter) Reset() {
	*x = Filter{}
	mi := &file_external_common_query_parameters_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Filter) ProtoMessage() {}

func (x *Filter) ProtoReflect() protoreflect.Message {
	mi := &file_external_common_query_parameters_proto_msgTypes[3]
	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 Filter.ProtoReflect.Descriptor instead.
func (*Filter) Descriptor() ([]byte, []int) {
	return file_external_common_query_parameters_proto_rawDescGZIP(), []int{3}
}

func (x *Filter) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *Filter) GetExclude() bool {
	if x != nil {
		return x.Exclude
	}
	return false
}

func (x *Filter) GetValues() []string {
	if x != nil {
		return x.Values
	}
	return nil
}

type Kv struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Tag key.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Tag value.
	Value         string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Kv) Reset() {
	*x = Kv{}
	mi := &file_external_common_query_parameters_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Kv) ProtoMessage() {}

func (x *Kv) ProtoReflect() protoreflect.Message {
	mi := &file_external_common_query_parameters_proto_msgTypes[4]
	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 Kv.ProtoReflect.Descriptor instead.
func (*Kv) Descriptor() ([]byte, []int) {
	return file_external_common_query_parameters_proto_rawDescGZIP(), []int{4}
}

func (x *Kv) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *Kv) GetValue() string {
	if x != nil {
		return x.Value
	}
	return ""
}

var File_external_common_query_parameters_proto protoreflect.FileDescriptor

const file_external_common_query_parameters_proto_rawDesc = "" +
	"\n" +
	"&external/common/query/parameters.proto\x12\x1echef.automate.api.common.query\"4\n" +
	"\n" +
	"Pagination\x12\x12\n" +
	"\x04page\x18\x01 \x01(\x05R\x04page\x12\x12\n" +
	"\x04size\x18\x02 \x01(\x05R\x04size\"`\n" +
	"\aSorting\x12\x14\n" +
	"\x05field\x18\x01 \x01(\tR\x05field\x12?\n" +
	"\x05order\x18\x02 \x01(\x0e2).chef.automate.api.common.query.SortOrderR\x05order\"L\n" +
	"\n" +
	"Suggestion\x12\x12\n" +
	"\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n" +
	"\x04text\x18\x02 \x01(\tR\x04text\x12\x16\n" +
	"\x06filter\x18\x03 \x03(\tR\x06filter\"L\n" +
	"\x06Filter\x12\x10\n" +
	"\x03key\x18\x14 \x01(\tR\x03key\x12\x18\n" +
	"\aexclude\x18\x16 \x01(\bR\aexclude\x12\x16\n" +
	"\x06values\x18\x17 \x03(\tR\x06values\",\n" +
	"\x02Kv\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value*\x1e\n" +
	"\tSortOrder\x12\a\n" +
	"\x03ASC\x10\x00\x12\b\n" +
	"\x04DESC\x10\x01B4Z2github.com/chef/automate/api/external/common/queryb\x06proto3"

var (
	file_external_common_query_parameters_proto_rawDescOnce sync.Once
	file_external_common_query_parameters_proto_rawDescData []byte
)

func file_external_common_query_parameters_proto_rawDescGZIP() []byte {
	file_external_common_query_parameters_proto_rawDescOnce.Do(func() {
		file_external_common_query_parameters_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_external_common_query_parameters_proto_rawDesc), len(file_external_common_query_parameters_proto_rawDesc)))
	})
	return file_external_common_query_parameters_proto_rawDescData
}

var file_external_common_query_parameters_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_external_common_query_parameters_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_external_common_query_parameters_proto_goTypes = []any{
	(SortOrder)(0),     // 0: chef.automate.api.common.query.SortOrder
	(*Pagination)(nil), // 1: chef.automate.api.common.query.Pagination
	(*Sorting)(nil),    // 2: chef.automate.api.common.query.Sorting
	(*Suggestion)(nil), // 3: chef.automate.api.common.query.Suggestion
	(*Filter)(nil),     // 4: chef.automate.api.common.query.Filter
	(*Kv)(nil),         // 5: chef.automate.api.common.query.Kv
}
var file_external_common_query_parameters_proto_depIdxs = []int32{
	0, // 0: chef.automate.api.common.query.Sorting.order:type_name -> chef.automate.api.common.query.SortOrder
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_external_common_query_parameters_proto_init() }
func file_external_common_query_parameters_proto_init() {
	if File_external_common_query_parameters_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_external_common_query_parameters_proto_rawDesc), len(file_external_common_query_parameters_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_external_common_query_parameters_proto_goTypes,
		DependencyIndexes: file_external_common_query_parameters_proto_depIdxs,
		EnumInfos:         file_external_common_query_parameters_proto_enumTypes,
		MessageInfos:      file_external_common_query_parameters_proto_msgTypes,
	}.Build()
	File_external_common_query_parameters_proto = out.File
	file_external_common_query_parameters_proto_goTypes = nil
	file_external_common_query_parameters_proto_depIdxs = nil
}
