// Copyright 2023-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.6
// 	protoc        (unknown)
// source: tests/example/v1/example.proto

//go:build protoopaque

package examplev1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	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 Person struct {
	state            protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_Id    uint64                 `protobuf:"varint,1,opt,name=id,proto3"`
	xxx_hidden_Email string                 `protobuf:"bytes,2,opt,name=email,proto3"`
	xxx_hidden_Name  string                 `protobuf:"bytes,3,opt,name=name,proto3"`
	xxx_hidden_Home  *Coordinates           `protobuf:"bytes,4,opt,name=home,proto3"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*Person) ProtoMessage() {}

func (x *Person) ProtoReflect() protoreflect.Message {
	mi := &file_tests_example_v1_example_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)
}

func (x *Person) GetId() uint64 {
	if x != nil {
		return x.xxx_hidden_Id
	}
	return 0
}

func (x *Person) GetEmail() string {
	if x != nil {
		return x.xxx_hidden_Email
	}
	return ""
}

func (x *Person) GetName() string {
	if x != nil {
		return x.xxx_hidden_Name
	}
	return ""
}

func (x *Person) GetHome() *Coordinates {
	if x != nil {
		return x.xxx_hidden_Home
	}
	return nil
}

func (x *Person) SetId(v uint64) {
	x.xxx_hidden_Id = v
}

func (x *Person) SetEmail(v string) {
	x.xxx_hidden_Email = v
}

func (x *Person) SetName(v string) {
	x.xxx_hidden_Name = v
}

func (x *Person) SetHome(v *Coordinates) {
	x.xxx_hidden_Home = v
}

func (x *Person) HasHome() bool {
	if x == nil {
		return false
	}
	return x.xxx_hidden_Home != nil
}

func (x *Person) ClearHome() {
	x.xxx_hidden_Home = nil
}

type Person_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	Id    uint64
	Email string
	Name  string
	Home  *Coordinates
}

func (b0 Person_builder) Build() *Person {
	m0 := &Person{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_Id = b.Id
	x.xxx_hidden_Email = b.Email
	x.xxx_hidden_Name = b.Name
	x.xxx_hidden_Home = b.Home
	return m0
}

type Coordinates struct {
	state          protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_Lat float64                `protobuf:"fixed64,1,opt,name=lat,proto3"`
	xxx_hidden_Lng float64                `protobuf:"fixed64,2,opt,name=lng,proto3"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*Coordinates) ProtoMessage() {}

func (x *Coordinates) ProtoReflect() protoreflect.Message {
	mi := &file_tests_example_v1_example_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)
}

func (x *Coordinates) GetLat() float64 {
	if x != nil {
		return x.xxx_hidden_Lat
	}
	return 0
}

func (x *Coordinates) GetLng() float64 {
	if x != nil {
		return x.xxx_hidden_Lng
	}
	return 0
}

func (x *Coordinates) SetLat(v float64) {
	x.xxx_hidden_Lat = v
}

func (x *Coordinates) SetLng(v float64) {
	x.xxx_hidden_Lng = v
}

type Coordinates_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	Lat float64
	Lng float64
}

func (b0 Coordinates_builder) Build() *Coordinates {
	m0 := &Coordinates{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_Lat = b.Lat
	x.xxx_hidden_Lng = b.Lng
	return m0
}

var File_tests_example_v1_example_proto protoreflect.FileDescriptor

const file_tests_example_v1_example_proto_rawDesc = "" +
	"\n" +
	"\x1etests/example/v1/example.proto\x12\x10tests.example.v1\x1a\x1bbuf/validate/validate.proto\"\xb2\x01\n" +
	"\x06Person\x12\x18\n" +
	"\x02id\x18\x01 \x01(\x04B\b\xbaH\x052\x03 \xe7\aR\x02id\x12\x1d\n" +
	"\x05email\x18\x02 \x01(\tB\a\xbaH\x04r\x02`\x01R\x05email\x12<\n" +
	"\x04name\x18\x03 \x01(\tB(\xbaH%r#(\x80\x022\x1e^[[:alpha:]]+( [[:alpha:]]+)*$R\x04name\x121\n" +
	"\x04home\x18\x04 \x01(\v2\x1d.tests.example.v1.CoordinatesR\x04home\"c\n" +
	"\vCoordinates\x12)\n" +
	"\x03lat\x18\x01 \x01(\x01B\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x80V@)\x00\x00\x00\x00\x00\x80V\xc0R\x03lat\x12)\n" +
	"\x03lng\x18\x02 \x01(\x01B\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x80f@)\x00\x00\x00\x00\x00\x80f\xc0R\x03lngB\xca\x01\n" +
	"\x14com.tests.example.v1B\fExampleProtoP\x01ZBbuf.build/go/protovalidate/internal/gen/tests/example/v1;examplev1\xa2\x02\x03TEX\xaa\x02\x10Tests.Example.V1\xca\x02\x10Tests\\Example\\V1\xe2\x02\x1cTests\\Example\\V1\\GPBMetadata\xea\x02\x12Tests::Example::V1b\x06proto3"

var file_tests_example_v1_example_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_tests_example_v1_example_proto_goTypes = []any{
	(*Person)(nil),      // 0: tests.example.v1.Person
	(*Coordinates)(nil), // 1: tests.example.v1.Coordinates
}
var file_tests_example_v1_example_proto_depIdxs = []int32{
	1, // 0: tests.example.v1.Person.home:type_name -> tests.example.v1.Coordinates
	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_tests_example_v1_example_proto_init() }
func file_tests_example_v1_example_proto_init() {
	if File_tests_example_v1_example_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_tests_example_v1_example_proto_rawDesc), len(file_tests_example_v1_example_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_tests_example_v1_example_proto_goTypes,
		DependencyIndexes: file_tests_example_v1_example_proto_depIdxs,
		MessageInfos:      file_tests_example_v1_example_proto_msgTypes,
	}.Build()
	File_tests_example_v1_example_proto = out.File
	file_tests_example_v1_example_proto_goTypes = nil
	file_tests_example_v1_example_proto_depIdxs = nil
}
