// 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/examples.proto

package testv1

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"
	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)
)

// A product.
//
// A product is a good or service that is offered for sale.
type Product struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The unique identifier for the product.
	ProductId int32 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// The name of the product.
	ProductName string `protobuf:"bytes,2,opt,name=product_name,json=productName,proto3" json:"product_name,omitempty"`
	// The price of the product.
	Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"`
	// The tags associated with the product.
	Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	// The location of the product.
	Location      *Product_Location `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Product) ProtoMessage() {}

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

func (x *Product) GetProductId() int32 {
	if x != nil {
		return x.ProductId
	}
	return 0
}

func (x *Product) GetProductName() string {
	if x != nil {
		return x.ProductName
	}
	return ""
}

func (x *Product) GetPrice() float32 {
	if x != nil {
		return x.Price
	}
	return 0
}

func (x *Product) GetTags() []string {
	if x != nil {
		return x.Tags
	}
	return nil
}

func (x *Product) GetLocation() *Product_Location {
	if x != nil {
		return x.Location
	}
	return nil
}

// A point on the earth's surface.
type Product_Location struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Lat           float64                `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"`
	Long          float64                `protobuf:"fixed64,2,opt,name=long,proto3" json:"long,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Product_Location) ProtoMessage() {}

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

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

func (x *Product_Location) GetLong() float64 {
	if x != nil {
		return x.Long
	}
	return 0
}

var File_buf_protoschema_test_v1_examples_proto protoreflect.FileDescriptor

const file_buf_protoschema_test_v1_examples_proto_rawDesc = "" +
	"\n" +
	"&buf/protoschema/test/v1/examples.proto\x12\x17buf.protoschema.test.v1\x1a\x1bbuf/validate/validate.proto\"\xca\x02\n" +
	"\aProduct\x12%\n" +
	"\n" +
	"product_id\x18\x01 \x01(\x05B\x06\xbaH\x03\xc8\x01\x01R\tproductId\x12)\n" +
	"\fproduct_name\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\vproductName\x12\"\n" +
	"\x05price\x18\x03 \x01(\x02B\f\xbaH\t\n" +
	"\a@\x01-\x00\x00\x00\x00R\x05price\x12\x12\n" +
	"\x04tags\x18\x04 \x03(\tR\x04tags\x12M\n" +
	"\blocation\x18\x05 \x01(\v2).buf.protoschema.test.v1.Product.LocationB\x06\xbaH\x03\xc8\x01\x01R\blocation\x1af\n" +
	"\bLocation\x12+\n" +
	"\x03lat\x18\x01 \x01(\x01B\x19\xbaH\x16\x12\x14@\x01\x19\x00\x00\x00\x00\x00\x80V@)\x00\x00\x00\x00\x00\x80V\xc0R\x03lat\x12-\n" +
	"\x04long\x18\x02 \x01(\x01B\x19\xbaH\x16\x12\x14@\x01\x19\x00\x00\x00\x00\x00\x80f@)\x00\x00\x00\x00\x00\x80f\xc0R\x04longB\x86\x02\n" +
	"\x1bcom.buf.protoschema.test.v1B\rExamplesProtoP\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_examples_proto_rawDescOnce sync.Once
	file_buf_protoschema_test_v1_examples_proto_rawDescData []byte
)

func file_buf_protoschema_test_v1_examples_proto_rawDescGZIP() []byte {
	file_buf_protoschema_test_v1_examples_proto_rawDescOnce.Do(func() {
		file_buf_protoschema_test_v1_examples_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_buf_protoschema_test_v1_examples_proto_rawDesc), len(file_buf_protoschema_test_v1_examples_proto_rawDesc)))
	})
	return file_buf_protoschema_test_v1_examples_proto_rawDescData
}

var file_buf_protoschema_test_v1_examples_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_buf_protoschema_test_v1_examples_proto_goTypes = []any{
	(*Product)(nil),          // 0: buf.protoschema.test.v1.Product
	(*Product_Location)(nil), // 1: buf.protoschema.test.v1.Product.Location
}
var file_buf_protoschema_test_v1_examples_proto_depIdxs = []int32{
	1, // 0: buf.protoschema.test.v1.Product.location:type_name -> buf.protoschema.test.v1.Product.Location
	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_buf_protoschema_test_v1_examples_proto_init() }
func file_buf_protoschema_test_v1_examples_proto_init() {
	if File_buf_protoschema_test_v1_examples_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_protoschema_test_v1_examples_proto_rawDesc), len(file_buf_protoschema_test_v1_examples_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_buf_protoschema_test_v1_examples_proto_goTypes,
		DependencyIndexes: file_buf_protoschema_test_v1_examples_proto_depIdxs,
		MessageInfos:      file_buf_protoschema_test_v1_examples_proto_msgTypes,
	}.Build()
	File_buf_protoschema_test_v1_examples_proto = out.File
	file_buf_protoschema_test_v1_examples_proto_goTypes = nil
	file_buf_protoschema_test_v1_examples_proto_depIdxs = nil
}
