// Copyright 2024-2025 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.8
// 	protoc        (unknown)
// source: buf/protoschema/test/v1/test_cases.proto

package testv1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	proto3 "github.com/bufbuild/protoschema-plugins/internal/gen/proto/bufext/cel/expr/conformance/proto3"
	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 NestedReference struct {
	state         protoimpl.MessageState             `protogen:"open.v1"`
	NestedMessage *proto3.TestAllTypes_NestedMessage `protobuf:"bytes,1,opt,name=nested_message,json=nestedMessage,proto3" json:"nested_message,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*NestedReference) ProtoMessage() {}

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

func (x *NestedReference) GetNestedMessage() *proto3.TestAllTypes_NestedMessage {
	if x != nil {
		return x.NestedMessage
	}
	return nil
}

// The title for CustomOptions. On
// multiple lines.
//
// This is a test case for the custom options in the buf.validate package... and
// comment parsing.
type CustomOptions struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A field with a title.
	//
	// This field has a title!
	Int32Field []int32 `protobuf:"varint,1,rep,packed,name=int32_field,json=int32Field,proto3" json:"int32_field,omitempty"`
	// Types that are valid to be assigned to Kind:
	//
	//	*CustomOptions_StringField
	Kind          isCustomOptions_Kind `protobuf_oneof:"kind"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CustomOptions) ProtoMessage() {}

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

func (x *CustomOptions) GetInt32Field() []int32 {
	if x != nil {
		return x.Int32Field
	}
	return nil
}

func (x *CustomOptions) GetKind() isCustomOptions_Kind {
	if x != nil {
		return x.Kind
	}
	return nil
}

func (x *CustomOptions) GetStringField() string {
	if x != nil {
		if x, ok := x.Kind.(*CustomOptions_StringField); ok {
			return x.StringField
		}
	}
	return ""
}

type isCustomOptions_Kind interface {
	isCustomOptions_Kind()
}

type CustomOptions_StringField struct {
	StringField string `protobuf:"bytes,2,opt,name=string_field,json=stringField,proto3,oneof"`
}

func (*CustomOptions_StringField) isCustomOptions_Kind() {}

type IgnoreField struct {
	state       protoimpl.MessageState `protogen:"open.v1"`
	StringField string                 `protobuf:"bytes,1,opt,name=string_field,json=stringField,proto3" json:"string_field,omitempty"` // jsonschema:ignore
	// jsonschema:ignore
	Int32Field int32  `protobuf:"varint,2,opt,name=int32_field,json=int32Field,proto3" json:"int32_field,omitempty"`
	BoolField  bool   `protobuf:"varint,3,opt,name=bool_field,json=boolField,proto3" json:"bool_field,omitempty"`
	BytesField []byte `protobuf:"bytes,4,opt,name=bytes_field,json=bytesField,proto3" json:"bytes_field,omitempty"` // jsonschema:hide
	// jsonschema:hide
	NestedReference *NestedReference `protobuf:"bytes,5,opt,name=nested_reference,json=nestedReference,proto3" json:"nested_reference,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*IgnoreField) ProtoMessage() {}

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

func (x *IgnoreField) GetStringField() string {
	if x != nil {
		return x.StringField
	}
	return ""
}

func (x *IgnoreField) GetInt32Field() int32 {
	if x != nil {
		return x.Int32Field
	}
	return 0
}

func (x *IgnoreField) GetBoolField() bool {
	if x != nil {
		return x.BoolField
	}
	return false
}

func (x *IgnoreField) GetBytesField() []byte {
	if x != nil {
		return x.BytesField
	}
	return nil
}

func (x *IgnoreField) GetNestedReference() *NestedReference {
	if x != nil {
		return x.NestedReference
	}
	return nil
}

var File_buf_protoschema_test_v1_test_cases_proto protoreflect.FileDescriptor

const file_buf_protoschema_test_v1_test_cases_proto_rawDesc = "" +
	"\n" +
	"(buf/protoschema/test/v1/test_cases.proto\x12\x17buf.protoschema.test.v1\x1a\x1bbuf/validate/validate.proto\x1a7bufext/cel/expr/conformance/proto3/test_all_types.proto\"x\n" +
	"\x0fNestedReference\x12e\n" +
	"\x0enested_message\x18\x01 \x01(\v2>.bufext.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\rnestedMessage\"\xf4\x01\n" +
	"\rCustomOptions\x12O\n" +
	"\vint32_field\x18\x01 \x03(\x05B.\xbaH)\xba\x01&\n" +
	"\x0eint32_field_id\x12\fmust be true\x1a\x061 == 1\x10\x01R\n" +
	"int32Field\x12R\n" +
	"\fstring_field\x18\x02 \x01(\tB-\xbaH*\xba\x01'\n" +
	"\x0fstring_field_id\x12\fmust be true\x1a\x061 == 1H\x00R\vstringField:/\xbaH*\x1a(\n" +
	"\x10custom_option_id\x12\fmust be true\x1a\x061 == 1\x10\x01B\r\n" +
	"\x04kind\x12\x05\xbaH\x02\b\x01\"\xe6\x01\n" +
	"\vIgnoreField\x12!\n" +
	"\fstring_field\x18\x01 \x01(\tR\vstringField\x12\x1f\n" +
	"\vint32_field\x18\x02 \x01(\x05R\n" +
	"int32Field\x12\x1d\n" +
	"\n" +
	"bool_field\x18\x03 \x01(\bR\tboolField\x12\x1f\n" +
	"\vbytes_field\x18\x04 \x01(\fR\n" +
	"bytesField\x12S\n" +
	"\x10nested_reference\x18\x05 \x01(\v2(.buf.protoschema.test.v1.NestedReferenceR\x0fnestedReferenceB\x87\x02\n" +
	"\x1bcom.buf.protoschema.test.v1B\x0eTestCasesProtoP\x01ZYgithub.com/bufbuild/protoschema-plugins/internal/gen/proto/buf/protoschema/test/v1;testv1\xa2\x02\x03BPT\xaa\x02\x17Buf.Protoschema.Test.V1\xca\x02\x17Buf\\Protoschema\\Test\\V1\xe2\x02#Buf\\Protoschema\\Test\\V1\\GPBMetadata\xea\x02\x1aBuf::Protoschema::Test::V1b\x06proto3"

var (
	file_buf_protoschema_test_v1_test_cases_proto_rawDescOnce sync.Once
	file_buf_protoschema_test_v1_test_cases_proto_rawDescData []byte
)

func file_buf_protoschema_test_v1_test_cases_proto_rawDescGZIP() []byte {
	file_buf_protoschema_test_v1_test_cases_proto_rawDescOnce.Do(func() {
		file_buf_protoschema_test_v1_test_cases_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_buf_protoschema_test_v1_test_cases_proto_rawDesc), len(file_buf_protoschema_test_v1_test_cases_proto_rawDesc)))
	})
	return file_buf_protoschema_test_v1_test_cases_proto_rawDescData
}

var file_buf_protoschema_test_v1_test_cases_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_buf_protoschema_test_v1_test_cases_proto_goTypes = []any{
	(*NestedReference)(nil),                   // 0: buf.protoschema.test.v1.NestedReference
	(*CustomOptions)(nil),                     // 1: buf.protoschema.test.v1.CustomOptions
	(*IgnoreField)(nil),                       // 2: buf.protoschema.test.v1.IgnoreField
	(*proto3.TestAllTypes_NestedMessage)(nil), // 3: bufext.cel.expr.conformance.proto3.TestAllTypes.NestedMessage
}
var file_buf_protoschema_test_v1_test_cases_proto_depIdxs = []int32{
	3, // 0: buf.protoschema.test.v1.NestedReference.nested_message:type_name -> bufext.cel.expr.conformance.proto3.TestAllTypes.NestedMessage
	0, // 1: buf.protoschema.test.v1.IgnoreField.nested_reference:type_name -> buf.protoschema.test.v1.NestedReference
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] 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_buf_protoschema_test_v1_test_cases_proto_init() }
func file_buf_protoschema_test_v1_test_cases_proto_init() {
	if File_buf_protoschema_test_v1_test_cases_proto != nil {
		return
	}
	file_buf_protoschema_test_v1_test_cases_proto_msgTypes[1].OneofWrappers = []any{
		(*CustomOptions_StringField)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_protoschema_test_v1_test_cases_proto_rawDesc), len(file_buf_protoschema_test_v1_test_cases_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_buf_protoschema_test_v1_test_cases_proto_goTypes,
		DependencyIndexes: file_buf_protoschema_test_v1_test_cases_proto_depIdxs,
		MessageInfos:      file_buf_protoschema_test_v1_test_cases_proto_msgTypes,
	}.Build()
	File_buf_protoschema_test_v1_test_cases_proto = out.File
	file_buf_protoschema_test_v1_test_cases_proto_goTypes = nil
	file_buf_protoschema_test_v1_test_cases_proto_depIdxs = nil
}
