// Copyright 2020-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.9
// 	protoc        (unknown)
// source: invoice/v1/invoice_service.proto

package invoicev1

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

// CreateInvoiceRequest is a request to create an invoice.
type CreateInvoiceRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// invoice is the Invoice to create.
	Invoice       *Invoice `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CreateInvoiceRequest) ProtoMessage() {}

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

func (x *CreateInvoiceRequest) GetInvoice() *Invoice {
	if x != nil {
		return x.Invoice
	}
	return nil
}

// CreateInvoiceResponse is the response from creating an invoice.
type CreateInvoiceResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// invoice_id is the id of the invoice created.
	InvoiceId string `protobuf:"bytes,1,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"`
	// version is the version of the invoice created. It is intended to be used
	// for CQRS lookups of this invoice and optimistic locking.
	Version       uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CreateInvoiceResponse) ProtoMessage() {}

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

func (x *CreateInvoiceResponse) GetInvoiceId() string {
	if x != nil {
		return x.InvoiceId
	}
	return ""
}

func (x *CreateInvoiceResponse) GetVersion() uint64 {
	if x != nil {
		return x.Version
	}
	return 0
}

var File_invoice_v1_invoice_service_proto protoreflect.FileDescriptor

const file_invoice_v1_invoice_service_proto_rawDesc = "" +
	"\n" +
	" invoice/v1/invoice_service.proto\x12\n" +
	"invoice.v1\x1a\x1bbuf/validate/validate.proto\x1a\x18invoice/v1/invoice.proto\"M\n" +
	"\x14CreateInvoiceRequest\x125\n" +
	"\ainvoice\x18\x01 \x01(\v2\x13.invoice.v1.InvoiceB\x06\xbaH\x03\xc8\x01\x01R\ainvoice\"P\n" +
	"\x15CreateInvoiceResponse\x12\x1d\n" +
	"\n" +
	"invoice_id\x18\x01 \x01(\tR\tinvoiceId\x12\x18\n" +
	"\aversion\x18\x02 \x01(\x04R\aversion2f\n" +
	"\x0eInvoiceService\x12T\n" +
	"\rCreateInvoice\x12 .invoice.v1.CreateInvoiceRequest\x1a!.invoice.v1.CreateInvoiceResponseB\xc9\x01\n" +
	"\x0ecom.invoice.v1B\x13InvoiceServiceProtoP\x01ZYgithub.com/bufbuild/buf-examples/protovalidate/connect-go/finish/gen/invoice/v1;invoicev1\xa2\x02\x03IXX\xaa\x02\n" +
	"Invoice.V1\xca\x02\n" +
	"Invoice\\V1\xe2\x02\x16Invoice\\V1\\GPBMetadata\xea\x02\vInvoice::V1b\x06proto3"

var (
	file_invoice_v1_invoice_service_proto_rawDescOnce sync.Once
	file_invoice_v1_invoice_service_proto_rawDescData []byte
)

func file_invoice_v1_invoice_service_proto_rawDescGZIP() []byte {
	file_invoice_v1_invoice_service_proto_rawDescOnce.Do(func() {
		file_invoice_v1_invoice_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_invoice_v1_invoice_service_proto_rawDesc), len(file_invoice_v1_invoice_service_proto_rawDesc)))
	})
	return file_invoice_v1_invoice_service_proto_rawDescData
}

var file_invoice_v1_invoice_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_invoice_v1_invoice_service_proto_goTypes = []any{
	(*CreateInvoiceRequest)(nil),  // 0: invoice.v1.CreateInvoiceRequest
	(*CreateInvoiceResponse)(nil), // 1: invoice.v1.CreateInvoiceResponse
	(*Invoice)(nil),               // 2: invoice.v1.Invoice
}
var file_invoice_v1_invoice_service_proto_depIdxs = []int32{
	2, // 0: invoice.v1.CreateInvoiceRequest.invoice:type_name -> invoice.v1.Invoice
	0, // 1: invoice.v1.InvoiceService.CreateInvoice:input_type -> invoice.v1.CreateInvoiceRequest
	1, // 2: invoice.v1.InvoiceService.CreateInvoice:output_type -> invoice.v1.CreateInvoiceResponse
	2, // [2:3] is the sub-list for method output_type
	1, // [1:2] 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_invoice_v1_invoice_service_proto_init() }
func file_invoice_v1_invoice_service_proto_init() {
	if File_invoice_v1_invoice_service_proto != nil {
		return
	}
	file_invoice_v1_invoice_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_invoice_v1_invoice_service_proto_rawDesc), len(file_invoice_v1_invoice_service_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_invoice_v1_invoice_service_proto_goTypes,
		DependencyIndexes: file_invoice_v1_invoice_service_proto_depIdxs,
		MessageInfos:      file_invoice_v1_invoice_service_proto_msgTypes,
	}.Build()
	File_invoice_v1_invoice_service_proto = out.File
	file_invoice_v1_invoice_service_proto_goTypes = nil
	file_invoice_v1_invoice_service_proto_depIdxs = nil
}
