// Copyright 2023-2024 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.6
// 	protoc        (unknown)
// source: buf/protoyaml/test/v1/pb2.proto

package testv1

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 Proto2Test struct {
	state           protoimpl.MessageState `protogen:"open.v1"`
	Values          []*Proto2TestValue     `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
	extensionFields protoimpl.ExtensionFields
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*Proto2Test) ProtoMessage() {}

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

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

type Proto2TestValue struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to OneofValue:
	//
	//	*Proto2TestValue_OneofStringValue
	//	*Proto2TestValue_OneofInt32Value
	OneofValue    isProto2TestValue_OneofValue `protobuf_oneof:"oneof_value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Proto2TestValue) ProtoMessage() {}

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

func (x *Proto2TestValue) GetOneofValue() isProto2TestValue_OneofValue {
	if x != nil {
		return x.OneofValue
	}
	return nil
}

func (x *Proto2TestValue) GetOneofStringValue() string {
	if x != nil {
		if x, ok := x.OneofValue.(*Proto2TestValue_OneofStringValue); ok {
			return x.OneofStringValue
		}
	}
	return ""
}

func (x *Proto2TestValue) GetOneofInt32Value() int32 {
	if x != nil {
		if x, ok := x.OneofValue.(*Proto2TestValue_OneofInt32Value); ok {
			return x.OneofInt32Value
		}
	}
	return 0
}

type isProto2TestValue_OneofValue interface {
	isProto2TestValue_OneofValue()
}

type Proto2TestValue_OneofStringValue struct {
	OneofStringValue string `protobuf:"bytes,1,opt,name=oneof_string_value,json=oneofStringValue,oneof"`
}

type Proto2TestValue_OneofInt32Value struct {
	OneofInt32Value int32 `protobuf:"varint,2,opt,name=oneof_int32_value,json=oneofInt32Value,oneof"`
}

func (*Proto2TestValue_OneofStringValue) isProto2TestValue_OneofValue() {}

func (*Proto2TestValue_OneofInt32Value) isProto2TestValue_OneofValue() {}

var file_buf_protoyaml_test_v1_pb2_proto_extTypes = []protoimpl.ExtensionInfo{
	{
		ExtendedType:  (*Proto2Test)(nil),
		ExtensionType: (*string)(nil),
		Field:         100,
		Name:          "buf.protoyaml.test.v1.p2t_string_ext",
		Tag:           "bytes,100,opt,name=p2t_string_ext",
		Filename:      "buf/protoyaml/test/v1/pb2.proto",
	},
	{
		ExtendedType:  (*Proto2Test)(nil),
		ExtensionType: ([]string)(nil),
		Field:         101,
		Name:          "buf.protoyaml.test.v1.p2t_repeated_string_ext",
		Tag:           "bytes,101,rep,name=p2t_repeated_string_ext",
		Filename:      "buf/protoyaml/test/v1/pb2.proto",
	},
}

// Extension fields to Proto2Test.
var (
	// optional string p2t_string_ext = 100;
	E_P2TStringExt = &file_buf_protoyaml_test_v1_pb2_proto_extTypes[0]
	// repeated string p2t_repeated_string_ext = 101;
	E_P2TRepeatedStringExt = &file_buf_protoyaml_test_v1_pb2_proto_extTypes[1]
)

var File_buf_protoyaml_test_v1_pb2_proto protoreflect.FileDescriptor

const file_buf_protoyaml_test_v1_pb2_proto_rawDesc = "" +
	"\n" +
	"\x1fbuf/protoyaml/test/v1/pb2.proto\x12\x15buf.protoyaml.test.v1\"V\n" +
	"\n" +
	"Proto2Test\x12>\n" +
	"\x06values\x18\x01 \x03(\v2&.buf.protoyaml.test.v1.Proto2TestValueR\x06values*\b\bd\x10\x80\x80\x80\x80\x02\"~\n" +
	"\x0fProto2TestValue\x12.\n" +
	"\x12oneof_string_value\x18\x01 \x01(\tH\x00R\x10oneofStringValue\x12,\n" +
	"\x11oneof_int32_value\x18\x02 \x01(\x05H\x00R\x0foneofInt32ValueB\r\n" +
	"\voneof_value:G\n" +
	"\x0ep2t_string_ext\x12!.buf.protoyaml.test.v1.Proto2Test\x18d \x01(\tR\fp2tStringExt:X\n" +
	"\x17p2t_repeated_string_ext\x12!.buf.protoyaml.test.v1.Proto2Test\x18e \x03(\tR\x14p2tRepeatedStringExtB\xe4\x01\n" +
	"\x19com.buf.protoyaml.test.v1B\bPb2ProtoP\x01ZFbuf.build/go/protoyaml/internal/gen/proto/buf/protoyaml/test/v1;testv1\xa2\x02\x03BPT\xaa\x02\x15Buf.Protoyaml.Test.V1\xca\x02\x15Buf\\Protoyaml\\Test\\V1\xe2\x02!Buf\\Protoyaml\\Test\\V1\\GPBMetadata\xea\x02\x18Buf::Protoyaml::Test::V1"

var (
	file_buf_protoyaml_test_v1_pb2_proto_rawDescOnce sync.Once
	file_buf_protoyaml_test_v1_pb2_proto_rawDescData []byte
)

func file_buf_protoyaml_test_v1_pb2_proto_rawDescGZIP() []byte {
	file_buf_protoyaml_test_v1_pb2_proto_rawDescOnce.Do(func() {
		file_buf_protoyaml_test_v1_pb2_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_buf_protoyaml_test_v1_pb2_proto_rawDesc), len(file_buf_protoyaml_test_v1_pb2_proto_rawDesc)))
	})
	return file_buf_protoyaml_test_v1_pb2_proto_rawDescData
}

var file_buf_protoyaml_test_v1_pb2_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_buf_protoyaml_test_v1_pb2_proto_goTypes = []any{
	(*Proto2Test)(nil),      // 0: buf.protoyaml.test.v1.Proto2Test
	(*Proto2TestValue)(nil), // 1: buf.protoyaml.test.v1.Proto2TestValue
}
var file_buf_protoyaml_test_v1_pb2_proto_depIdxs = []int32{
	1, // 0: buf.protoyaml.test.v1.Proto2Test.values:type_name -> buf.protoyaml.test.v1.Proto2TestValue
	0, // 1: buf.protoyaml.test.v1.p2t_string_ext:extendee -> buf.protoyaml.test.v1.Proto2Test
	0, // 2: buf.protoyaml.test.v1.p2t_repeated_string_ext:extendee -> buf.protoyaml.test.v1.Proto2Test
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	1, // [1:3] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_buf_protoyaml_test_v1_pb2_proto_init() }
func file_buf_protoyaml_test_v1_pb2_proto_init() {
	if File_buf_protoyaml_test_v1_pb2_proto != nil {
		return
	}
	file_buf_protoyaml_test_v1_pb2_proto_msgTypes[1].OneofWrappers = []any{
		(*Proto2TestValue_OneofStringValue)(nil),
		(*Proto2TestValue_OneofInt32Value)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_protoyaml_test_v1_pb2_proto_rawDesc), len(file_buf_protoyaml_test_v1_pb2_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 2,
			NumServices:   0,
		},
		GoTypes:           file_buf_protoyaml_test_v1_pb2_proto_goTypes,
		DependencyIndexes: file_buf_protoyaml_test_v1_pb2_proto_depIdxs,
		MessageInfos:      file_buf_protoyaml_test_v1_pb2_proto_msgTypes,
		ExtensionInfos:    file_buf_protoyaml_test_v1_pb2_proto_extTypes,
	}.Build()
	File_buf_protoyaml_test_v1_pb2_proto = out.File
	file_buf_protoyaml_test_v1_pb2_proto_goTypes = nil
	file_buf_protoyaml_test_v1_pb2_proto_depIdxs = nil
}
