// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        (unknown)
// source: pbdns/dns.proto

package pbdns

import (
	_ "github.com/hashicorp/consul/proto-public/annotations/ratelimit"
	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 Protocol int32

const (
	Protocol_PROTOCOL_UNSET_UNSPECIFIED Protocol = 0
	Protocol_PROTOCOL_TCP               Protocol = 1
	Protocol_PROTOCOL_UDP               Protocol = 2
)

// Enum value maps for Protocol.
var (
	Protocol_name = map[int32]string{
		0: "PROTOCOL_UNSET_UNSPECIFIED",
		1: "PROTOCOL_TCP",
		2: "PROTOCOL_UDP",
	}
	Protocol_value = map[string]int32{
		"PROTOCOL_UNSET_UNSPECIFIED": 0,
		"PROTOCOL_TCP":               1,
		"PROTOCOL_UDP":               2,
	}
)

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

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

func (Protocol) Descriptor() protoreflect.EnumDescriptor {
	return file_pbdns_dns_proto_enumTypes[0].Descriptor()
}

func (Protocol) Type() protoreflect.EnumType {
	return &file_pbdns_dns_proto_enumTypes[0]
}

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

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

type QueryRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// msg is the DNS request message.
	Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// protocol is the protocol of the request
	Protocol      Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=hashicorp.consul.dns.Protocol" json:"protocol,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*QueryRequest) ProtoMessage() {}

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

func (x *QueryRequest) GetMsg() []byte {
	if x != nil {
		return x.Msg
	}
	return nil
}

func (x *QueryRequest) GetProtocol() Protocol {
	if x != nil {
		return x.Protocol
	}
	return Protocol_PROTOCOL_UNSET_UNSPECIFIED
}

type QueryResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// msg is the DNS reply message.
	Msg           []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*QueryResponse) ProtoMessage() {}

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

func (x *QueryResponse) GetMsg() []byte {
	if x != nil {
		return x.Msg
	}
	return nil
}

var File_pbdns_dns_proto protoreflect.FileDescriptor

const file_pbdns_dns_proto_rawDesc = "" +
	"\n" +
	"\x0fpbdns/dns.proto\x12\x14hashicorp.consul.dns\x1a%annotations/ratelimit/ratelimit.proto\"\\\n" +
	"\fQueryRequest\x12\x10\n" +
	"\x03msg\x18\x01 \x01(\fR\x03msg\x12:\n" +
	"\bprotocol\x18\x02 \x01(\x0e2\x1e.hashicorp.consul.dns.ProtocolR\bprotocol\"!\n" +
	"\rQueryResponse\x12\x10\n" +
	"\x03msg\x18\x01 \x01(\fR\x03msg*N\n" +
	"\bProtocol\x12\x1e\n" +
	"\x1aPROTOCOL_UNSET_UNSPECIFIED\x10\x00\x12\x10\n" +
	"\fPROTOCOL_TCP\x10\x01\x12\x10\n" +
	"\fPROTOCOL_UDP\x10\x022h\n" +
	"\n" +
	"DNSService\x12Z\n" +
	"\x05Query\x12\".hashicorp.consul.dns.QueryRequest\x1a#.hashicorp.consul.dns.QueryResponse\"\b\xe2\x86\x04\x04\b\x02\x10\bB\xc6\x01\n" +
	"\x18com.hashicorp.consul.dnsB\bDnsProtoP\x01Z.github.com/hashicorp/consul/proto-public/pbdns\xa2\x02\x03HCD\xaa\x02\x14Hashicorp.Consul.Dns\xca\x02\x14Hashicorp\\Consul\\Dns\xe2\x02 Hashicorp\\Consul\\Dns\\GPBMetadata\xea\x02\x16Hashicorp::Consul::Dnsb\x06proto3"

var (
	file_pbdns_dns_proto_rawDescOnce sync.Once
	file_pbdns_dns_proto_rawDescData []byte
)

func file_pbdns_dns_proto_rawDescGZIP() []byte {
	file_pbdns_dns_proto_rawDescOnce.Do(func() {
		file_pbdns_dns_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pbdns_dns_proto_rawDesc), len(file_pbdns_dns_proto_rawDesc)))
	})
	return file_pbdns_dns_proto_rawDescData
}

var file_pbdns_dns_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pbdns_dns_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_pbdns_dns_proto_goTypes = []any{
	(Protocol)(0),         // 0: hashicorp.consul.dns.Protocol
	(*QueryRequest)(nil),  // 1: hashicorp.consul.dns.QueryRequest
	(*QueryResponse)(nil), // 2: hashicorp.consul.dns.QueryResponse
}
var file_pbdns_dns_proto_depIdxs = []int32{
	0, // 0: hashicorp.consul.dns.QueryRequest.protocol:type_name -> hashicorp.consul.dns.Protocol
	1, // 1: hashicorp.consul.dns.DNSService.Query:input_type -> hashicorp.consul.dns.QueryRequest
	2, // 2: hashicorp.consul.dns.DNSService.Query:output_type -> hashicorp.consul.dns.QueryResponse
	2, // [2:3] is the sub-list for method output_type
	1, // [1:2] 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_pbdns_dns_proto_init() }
func file_pbdns_dns_proto_init() {
	if File_pbdns_dns_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_pbdns_dns_proto_rawDesc), len(file_pbdns_dns_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_pbdns_dns_proto_goTypes,
		DependencyIndexes: file_pbdns_dns_proto_depIdxs,
		EnumInfos:         file_pbdns_dns_proto_enumTypes,
		MessageInfos:      file_pbdns_dns_proto_msgTypes,
	}.Build()
	File_pbdns_dns_proto = out.File
	file_pbdns_dns_proto_goTypes = nil
	file_pbdns_dns_proto_depIdxs = nil
}
