// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v6.30.1
// source: answer.proto

package survey

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 SubmitAnswerRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	SurveyId      string                 `protobuf:"bytes,1,opt,name=survey_id,json=surveyId,proto3" json:"survey_id,omitempty"`
	OwnerId       string                 `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` // 答题者ID
	Answer        []*AnswerItem          `protobuf:"bytes,3,rep,name=answer,proto3" json:"answer,omitempty"`                  // 答题
	IpAddress     string                 `protobuf:"bytes,4,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	UserAgent     string                 `protobuf:"bytes,5,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*SubmitAnswerRequest) ProtoMessage() {}

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

func (x *SubmitAnswerRequest) GetSurveyId() string {
	if x != nil {
		return x.SurveyId
	}
	return ""
}

func (x *SubmitAnswerRequest) GetOwnerId() string {
	if x != nil {
		return x.OwnerId
	}
	return ""
}

func (x *SubmitAnswerRequest) GetAnswer() []*AnswerItem {
	if x != nil {
		return x.Answer
	}
	return nil
}

func (x *SubmitAnswerRequest) GetIpAddress() string {
	if x != nil {
		return x.IpAddress
	}
	return ""
}

func (x *SubmitAnswerRequest) GetUserAgent() string {
	if x != nil {
		return x.UserAgent
	}
	return ""
}

type AnswerItem struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	QuestionId    string                 `protobuf:"bytes,1,opt,name=question_id,json=questionId,proto3" json:"question_id,omitempty"`
	Answer        []string               `protobuf:"bytes,2,rep,name=answer,proto3" json:"answer,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*AnswerItem) ProtoMessage() {}

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

func (x *AnswerItem) GetQuestionId() string {
	if x != nil {
		return x.QuestionId
	}
	return ""
}

func (x *AnswerItem) GetAnswer() []string {
	if x != nil {
		return x.Answer
	}
	return nil
}

type ListAnswerReply struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Data          []*AnswerItem          `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	Count         int64                  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ListAnswerReply) ProtoMessage() {}

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

func (x *ListAnswerReply) GetData() []*AnswerItem {
	if x != nil {
		return x.Data
	}
	return nil
}

func (x *ListAnswerReply) GetCount() int64 {
	if x != nil {
		return x.Count
	}
	return 0
}

var File_answer_proto protoreflect.FileDescriptor

const file_answer_proto_rawDesc = "" +
	"\n" +
	"\fanswer.proto\x12\x06survey\x1a\fblocks.proto\"\xb7\x01\n" +
	"\x13SubmitAnswerRequest\x12\x1b\n" +
	"\tsurvey_id\x18\x01 \x01(\tR\bsurveyId\x12\x19\n" +
	"\bowner_id\x18\x02 \x01(\tR\aownerId\x12*\n" +
	"\x06answer\x18\x03 \x03(\v2\x12.survey.AnswerItemR\x06answer\x12\x1d\n" +
	"\n" +
	"ip_address\x18\x04 \x01(\tR\tipAddress\x12\x1d\n" +
	"\n" +
	"user_agent\x18\x05 \x01(\tR\tuserAgent\"E\n" +
	"\n" +
	"AnswerItem\x12\x1f\n" +
	"\vquestion_id\x18\x01 \x01(\tR\n" +
	"questionId\x12\x16\n" +
	"\x06answer\x18\x02 \x03(\tR\x06answer\"O\n" +
	"\x0fListAnswerReply\x12&\n" +
	"\x04data\x18\x01 \x03(\v2\x12.survey.AnswerItemR\x04data\x12\x14\n" +
	"\x05count\x18\x02 \x01(\x03R\x05count2\x7f\n" +
	"\x06Answer\x12:\n" +
	"\x06Submit\x12\x1b.survey.SubmitAnswerRequest\x1a\x13.survey.StatusReply\x129\n" +
	"\bBySurvey\x12\x14.survey.IdentRequest\x1a\x17.survey.ListAnswerReplyB\n" +
	"Z\b.;surveyb\x06proto3"

var (
	file_answer_proto_rawDescOnce sync.Once
	file_answer_proto_rawDescData []byte
)

func file_answer_proto_rawDescGZIP() []byte {
	file_answer_proto_rawDescOnce.Do(func() {
		file_answer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_answer_proto_rawDesc), len(file_answer_proto_rawDesc)))
	})
	return file_answer_proto_rawDescData
}

var file_answer_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_answer_proto_goTypes = []any{
	(*SubmitAnswerRequest)(nil), // 0: survey.SubmitAnswerRequest
	(*AnswerItem)(nil),          // 1: survey.AnswerItem
	(*ListAnswerReply)(nil),     // 2: survey.ListAnswerReply
	(*IdentRequest)(nil),        // 3: survey.IdentRequest
	(*StatusReply)(nil),         // 4: survey.StatusReply
}
var file_answer_proto_depIdxs = []int32{
	1, // 0: survey.SubmitAnswerRequest.answer:type_name -> survey.AnswerItem
	1, // 1: survey.ListAnswerReply.data:type_name -> survey.AnswerItem
	0, // 2: survey.Answer.Submit:input_type -> survey.SubmitAnswerRequest
	3, // 3: survey.Answer.BySurvey:input_type -> survey.IdentRequest
	4, // 4: survey.Answer.Submit:output_type -> survey.StatusReply
	2, // 5: survey.Answer.BySurvey:output_type -> survey.ListAnswerReply
	4, // [4:6] is the sub-list for method output_type
	2, // [2:4] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_answer_proto_init() }
func file_answer_proto_init() {
	if File_answer_proto != nil {
		return
	}
	file_blocks_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_answer_proto_rawDesc), len(file_answer_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_answer_proto_goTypes,
		DependencyIndexes: file_answer_proto_depIdxs,
		MessageInfos:      file_answer_proto_msgTypes,
	}.Build()
	File_answer_proto = out.File
	file_answer_proto_goTypes = nil
	file_answer_proto_depIdxs = nil
}