This commit is contained in:
2022-05-31 09:30:19 +02:00
parent 9de85ee1ec
commit ccc96319a3
72 changed files with 11971 additions and 4 deletions
@@ -0,0 +1,211 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: pet/v1/pet.proto
package petv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// PetStoreServiceClient is the client API for PetStoreService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PetStoreServiceClient interface {
GetPet(ctx context.Context, in *GetPetRequest, opts ...grpc.CallOption) (*GetPetResponse, error)
PutPet(ctx context.Context, in *PutPetRequest, opts ...grpc.CallOption) (*PutPetResponse, error)
DeletePet(ctx context.Context, in *DeletePetRequest, opts ...grpc.CallOption) (*DeletePetResponse, error)
PurchasePet(ctx context.Context, in *PurchasePetRequest, opts ...grpc.CallOption) (*PurchasePetResponse, error)
}
type petStoreServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPetStoreServiceClient(cc grpc.ClientConnInterface) PetStoreServiceClient {
return &petStoreServiceClient{cc}
}
func (c *petStoreServiceClient) GetPet(ctx context.Context, in *GetPetRequest, opts ...grpc.CallOption) (*GetPetResponse, error) {
out := new(GetPetResponse)
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/GetPet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *petStoreServiceClient) PutPet(ctx context.Context, in *PutPetRequest, opts ...grpc.CallOption) (*PutPetResponse, error) {
out := new(PutPetResponse)
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/PutPet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *petStoreServiceClient) DeletePet(ctx context.Context, in *DeletePetRequest, opts ...grpc.CallOption) (*DeletePetResponse, error) {
out := new(DeletePetResponse)
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/DeletePet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *petStoreServiceClient) PurchasePet(ctx context.Context, in *PurchasePetRequest, opts ...grpc.CallOption) (*PurchasePetResponse, error) {
out := new(PurchasePetResponse)
err := c.cc.Invoke(ctx, "/pet.v1.PetStoreService/PurchasePet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PetStoreServiceServer is the server API for PetStoreService service.
// All implementations should embed UnimplementedPetStoreServiceServer
// for forward compatibility
type PetStoreServiceServer interface {
GetPet(context.Context, *GetPetRequest) (*GetPetResponse, error)
PutPet(context.Context, *PutPetRequest) (*PutPetResponse, error)
DeletePet(context.Context, *DeletePetRequest) (*DeletePetResponse, error)
PurchasePet(context.Context, *PurchasePetRequest) (*PurchasePetResponse, error)
}
// UnimplementedPetStoreServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPetStoreServiceServer struct {
}
func (UnimplementedPetStoreServiceServer) GetPet(context.Context, *GetPetRequest) (*GetPetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPet not implemented")
}
func (UnimplementedPetStoreServiceServer) PutPet(context.Context, *PutPetRequest) (*PutPetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PutPet not implemented")
}
func (UnimplementedPetStoreServiceServer) DeletePet(context.Context, *DeletePetRequest) (*DeletePetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletePet not implemented")
}
func (UnimplementedPetStoreServiceServer) PurchasePet(context.Context, *PurchasePetRequest) (*PurchasePetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PurchasePet not implemented")
}
// UnsafePetStoreServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PetStoreServiceServer will
// result in compilation errors.
type UnsafePetStoreServiceServer interface {
mustEmbedUnimplementedPetStoreServiceServer()
}
func RegisterPetStoreServiceServer(s grpc.ServiceRegistrar, srv PetStoreServiceServer) {
s.RegisterService(&PetStoreService_ServiceDesc, srv)
}
func _PetStoreService_GetPet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PetStoreServiceServer).GetPet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pet.v1.PetStoreService/GetPet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PetStoreServiceServer).GetPet(ctx, req.(*GetPetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PetStoreService_PutPet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PutPetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PetStoreServiceServer).PutPet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pet.v1.PetStoreService/PutPet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PetStoreServiceServer).PutPet(ctx, req.(*PutPetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PetStoreService_DeletePet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PetStoreServiceServer).DeletePet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pet.v1.PetStoreService/DeletePet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PetStoreServiceServer).DeletePet(ctx, req.(*DeletePetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PetStoreService_PurchasePet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PurchasePetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PetStoreServiceServer).PurchasePet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pet.v1.PetStoreService/PurchasePet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PetStoreServiceServer).PurchasePet(ctx, req.(*PurchasePetRequest))
}
return interceptor(ctx, in, info, handler)
}
// PetStoreService_ServiceDesc is the grpc.ServiceDesc for PetStoreService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PetStoreService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pet.v1.PetStoreService",
HandlerType: (*PetStoreServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPet",
Handler: _PetStoreService_GetPet_Handler,
},
{
MethodName: "PutPet",
Handler: _PetStoreService_PutPet_Handler,
},
{
MethodName: "DeletePet",
Handler: _PetStoreService_DeletePet_Handler,
},
{
MethodName: "PurchasePet",
Handler: _PetStoreService_PurchasePet_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pet/v1/pet.proto",
}
@@ -0,0 +1,170 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: printer/v1/pdf_invoice.proto
/*
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package v1
import (
"context"
"io"
"net/http"
extV1 "git.deineagentur.biz/payment-backoffice/protobuf/gen/proto/go/printer/v1"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, client extV1.PrinterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq extV1.Invoice
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.InvoiceGen(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, server extV1.PrinterServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq extV1.Invoice
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.InvoiceGen(ctx, &protoReq)
return msg, metadata, err
}
// RegisterPrinterServiceHandlerServer registers the http handlers for service PrinterService to "mux".
// UnaryRPC :call PrinterServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPrinterServiceHandlerFromEndpoint instead.
func RegisterPrinterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extV1.PrinterServiceServer) error {
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterPrinterServiceHandlerFromEndpoint is same as RegisterPrinterServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPrinterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterPrinterServiceHandler(ctx, mux, conn)
}
// RegisterPrinterServiceHandler registers the http handlers for service PrinterService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterPrinterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterPrinterServiceHandlerClient(ctx, mux, extV1.NewPrinterServiceClient(conn))
}
// RegisterPrinterServiceHandlerClient registers the http handlers for service PrinterService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extV1.PrinterServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extV1.PrinterServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "extV1.PrinterServiceClient" to call the correct interceptors.
func RegisterPrinterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extV1.PrinterServiceClient) error {
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_PrinterService_InvoiceGen_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "printer", "invoice"}, ""))
)
var (
forward_PrinterService_InvoiceGen_0 = runtime.ForwardResponseMessage
)
@@ -0,0 +1,103 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: printer/v1/pdf_invoice.proto
package v1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// PrinterServiceClient is the client API for PrinterService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PrinterServiceClient interface {
InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error)
}
type printerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPrinterServiceClient(cc grpc.ClientConnInterface) PrinterServiceClient {
return &printerServiceClient{cc}
}
func (c *printerServiceClient) InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error) {
out := new(DocumentResponse)
err := c.cc.Invoke(ctx, "/printer.v1.invoice.PrinterService/InvoiceGen", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PrinterServiceServer is the server API for PrinterService service.
// All implementations should embed UnimplementedPrinterServiceServer
// for forward compatibility
type PrinterServiceServer interface {
InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error)
}
// UnimplementedPrinterServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPrinterServiceServer struct {
}
func (UnimplementedPrinterServiceServer) InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method InvoiceGen not implemented")
}
// UnsafePrinterServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PrinterServiceServer will
// result in compilation errors.
type UnsafePrinterServiceServer interface {
mustEmbedUnimplementedPrinterServiceServer()
}
func RegisterPrinterServiceServer(s grpc.ServiceRegistrar, srv PrinterServiceServer) {
s.RegisterService(&PrinterService_ServiceDesc, srv)
}
func _PrinterService_InvoiceGen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Invoice)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PrinterServiceServer).InvoiceGen(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/printer.v1.invoice.PrinterService/InvoiceGen",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrinterServiceServer).InvoiceGen(ctx, req.(*Invoice))
}
return interceptor(ctx, in, info, handler)
}
// PrinterService_ServiceDesc is the grpc.ServiceDesc for PrinterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PrinterService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "printer.v1.invoice.PrinterService",
HandlerType: (*PrinterServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "InvoiceGen",
Handler: _PrinterService_InvoiceGen_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "printer/v1/pdf_invoice.proto",
}
@@ -0,0 +1,211 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: shop/v1/shop.proto
package shopv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ShopServiceClient is the client API for ShopService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ShopServiceClient interface {
List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
}
type shopServiceClient struct {
cc grpc.ClientConnInterface
}
func NewShopServiceClient(cc grpc.ClientConnInterface) ShopServiceClient {
return &shopServiceClient{cc}
}
func (c *shopServiceClient) List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *shopServiceClient) Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Add", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *shopServiceClient) Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *shopServiceClient) Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ShopServiceServer is the server API for ShopService service.
// All implementations should embed UnimplementedShopServiceServer
// for forward compatibility
type ShopServiceServer interface {
List(context.Context, *Shop) (*Shop, error)
Add(context.Context, *Shop) (*Shop, error)
Update(context.Context, *Shop) (*Shop, error)
Delete(context.Context, *Shop) (*Shop, error)
}
// UnimplementedShopServiceServer should be embedded to have forward compatible implementations.
type UnimplementedShopServiceServer struct {
}
func (UnimplementedShopServiceServer) List(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedShopServiceServer) Add(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
}
func (UnimplementedShopServiceServer) Update(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedShopServiceServer) Delete(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
// UnsafeShopServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ShopServiceServer will
// result in compilation errors.
type UnsafeShopServiceServer interface {
mustEmbedUnimplementedShopServiceServer()
}
func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer) {
s.RegisterService(&ShopService_ServiceDesc, srv)
}
func _ShopService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).List(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
func _ShopService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).Add(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/Add",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).Add(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
func _ShopService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).Update(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
func _ShopService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).Delete(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
// ShopService_ServiceDesc is the grpc.ServiceDesc for ShopService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ShopService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "shop.v1.ShopService",
HandlerType: (*ShopServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "List",
Handler: _ShopService_List_Handler,
},
{
MethodName: "Add",
Handler: _ShopService_Add_Handler,
},
{
MethodName: "Update",
Handler: _ShopService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _ShopService_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "shop/v1/shop.proto",
}
+939
View File
@@ -0,0 +1,939 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc (unknown)
// source: printer/v1/pdf_invoice.proto
package v1
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
datetime "google.golang.org/genproto/googleapis/type/datetime"
_ "google.golang.org/genproto/googleapis/type/money"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// PaymentProvider represents the supported set
// of payment providers.
type InvoiceType int32
const (
InvoiceType_INVOICE_TYPE_UNSPECIFIED InvoiceType = 0
InvoiceType_INVOICE_TYPE_PAID InvoiceType = 1
InvoiceType_INVOICE_TYPE_OPEN InvoiceType = 2
)
// Enum value maps for InvoiceType.
var (
InvoiceType_name = map[int32]string{
0: "INVOICE_TYPE_UNSPECIFIED",
1: "INVOICE_TYPE_PAID",
2: "INVOICE_TYPE_OPEN",
}
InvoiceType_value = map[string]int32{
"INVOICE_TYPE_UNSPECIFIED": 0,
"INVOICE_TYPE_PAID": 1,
"INVOICE_TYPE_OPEN": 2,
}
)
func (x InvoiceType) Enum() *InvoiceType {
p := new(InvoiceType)
*p = x
return p
}
func (x InvoiceType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InvoiceType) Descriptor() protoreflect.EnumDescriptor {
return file_printer_v1_pdf_invoice_proto_enumTypes[0].Descriptor()
}
func (InvoiceType) Type() protoreflect.EnumType {
return &file_printer_v1_pdf_invoice_proto_enumTypes[0]
}
func (x InvoiceType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InvoiceType.Descriptor instead.
func (InvoiceType) EnumDescriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{0}
}
type OrderType int32
const (
OrderType_ORDER_TYPE_UNSPECIFIED OrderType = 0
OrderType_ORDER_TYPE_PHONE OrderType = 1
OrderType_ORDER_TYPE_WWW OrderType = 2
OrderType_ORDER_TYPE_EMAIL OrderType = 3
)
// Enum value maps for OrderType.
var (
OrderType_name = map[int32]string{
0: "ORDER_TYPE_UNSPECIFIED",
1: "ORDER_TYPE_PHONE",
2: "ORDER_TYPE_WWW",
3: "ORDER_TYPE_EMAIL",
}
OrderType_value = map[string]int32{
"ORDER_TYPE_UNSPECIFIED": 0,
"ORDER_TYPE_PHONE": 1,
"ORDER_TYPE_WWW": 2,
"ORDER_TYPE_EMAIL": 3,
}
)
func (x OrderType) Enum() *OrderType {
p := new(OrderType)
*p = x
return p
}
func (x OrderType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OrderType) Descriptor() protoreflect.EnumDescriptor {
return file_printer_v1_pdf_invoice_proto_enumTypes[1].Descriptor()
}
func (OrderType) Type() protoreflect.EnumType {
return &file_printer_v1_pdf_invoice_proto_enumTypes[1]
}
func (x OrderType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OrderType.Descriptor instead.
func (OrderType) EnumDescriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{1}
}
type InvoiceInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
InvoiceId string `protobuf:"bytes,1,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"`
InvoiceDate *datetime.DateTime `protobuf:"bytes,2,opt,name=invoice_date,json=invoiceDate,proto3" json:"invoice_date,omitempty"`
InvoiceDueDate *datetime.DateTime `protobuf:"bytes,3,opt,name=invoice_due_date,json=invoiceDueDate,proto3" json:"invoice_due_date,omitempty"`
InvoiceType InvoiceType `protobuf:"varint,4,opt,name=invoice_type,json=invoiceType,proto3,enum=printer.v1.invoice.InvoiceType" json:"invoice_type,omitempty"`
}
func (x *InvoiceInfo) Reset() {
*x = InvoiceInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InvoiceInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InvoiceInfo) ProtoMessage() {}
func (x *InvoiceInfo) ProtoReflect() protoreflect.Message {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InvoiceInfo.ProtoReflect.Descriptor instead.
func (*InvoiceInfo) Descriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{0}
}
func (x *InvoiceInfo) GetInvoiceId() string {
if x != nil {
return x.InvoiceId
}
return ""
}
func (x *InvoiceInfo) GetInvoiceDate() *datetime.DateTime {
if x != nil {
return x.InvoiceDate
}
return nil
}
func (x *InvoiceInfo) GetInvoiceDueDate() *datetime.DateTime {
if x != nil {
return x.InvoiceDueDate
}
return nil
}
func (x *InvoiceInfo) GetInvoiceType() InvoiceType {
if x != nil {
return x.InvoiceType
}
return InvoiceType_INVOICE_TYPE_UNSPECIFIED
}
type OrderInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
OrderDate *datetime.DateTime `protobuf:"bytes,2,opt,name=order_date,json=orderDate,proto3" json:"order_date,omitempty"`
OrderDueDate *datetime.DateTime `protobuf:"bytes,3,opt,name=order_due_date,json=orderDueDate,proto3" json:"order_due_date,omitempty"`
OrderType OrderType `protobuf:"varint,4,opt,name=order_type,json=orderType,proto3,enum=printer.v1.invoice.OrderType" json:"order_type,omitempty"`
OrderItems []*OrderItem `protobuf:"bytes,5,rep,name=order_items,json=orderItems,proto3" json:"order_items,omitempty"`
OrderVatItems []*OrderVatItem `protobuf:"bytes,6,rep,name=order_vat_items,json=orderVatItems,proto3" json:"order_vat_items,omitempty"`
Deposit *float64 `protobuf:"fixed64,7,opt,name=deposit,proto3,oneof" json:"deposit,omitempty"`
}
func (x *OrderInfo) Reset() {
*x = OrderInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderInfo) ProtoMessage() {}
func (x *OrderInfo) ProtoReflect() protoreflect.Message {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderInfo.ProtoReflect.Descriptor instead.
func (*OrderInfo) Descriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{1}
}
func (x *OrderInfo) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *OrderInfo) GetOrderDate() *datetime.DateTime {
if x != nil {
return x.OrderDate
}
return nil
}
func (x *OrderInfo) GetOrderDueDate() *datetime.DateTime {
if x != nil {
return x.OrderDueDate
}
return nil
}
func (x *OrderInfo) GetOrderType() OrderType {
if x != nil {
return x.OrderType
}
return OrderType_ORDER_TYPE_UNSPECIFIED
}
func (x *OrderInfo) GetOrderItems() []*OrderItem {
if x != nil {
return x.OrderItems
}
return nil
}
func (x *OrderInfo) GetOrderVatItems() []*OrderVatItem {
if x != nil {
return x.OrderVatItems
}
return nil
}
func (x *OrderInfo) GetDeposit() float64 {
if x != nil && x.Deposit != nil {
return *x.Deposit
}
return 0
}
type OfferInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OfferId string `protobuf:"bytes,1,opt,name=offer_id,json=offerId,proto3" json:"offer_id,omitempty"`
OfferDate *datetime.DateTime `protobuf:"bytes,2,opt,name=offer_date,json=offerDate,proto3" json:"offer_date,omitempty"`
OfferDueDate *datetime.DateTime `protobuf:"bytes,3,opt,name=offer_due_date,json=offerDueDate,proto3" json:"offer_due_date,omitempty"`
}
func (x *OfferInfo) Reset() {
*x = OfferInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OfferInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OfferInfo) ProtoMessage() {}
func (x *OfferInfo) ProtoReflect() protoreflect.Message {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OfferInfo.ProtoReflect.Descriptor instead.
func (*OfferInfo) Descriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{2}
}
func (x *OfferInfo) GetOfferId() string {
if x != nil {
return x.OfferId
}
return ""
}
func (x *OfferInfo) GetOfferDate() *datetime.DateTime {
if x != nil {
return x.OfferDate
}
return nil
}
func (x *OfferInfo) GetOfferDueDate() *datetime.DateTime {
if x != nil {
return x.OfferDueDate
}
return nil
}
type OrderItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Vat float64 `protobuf:"fixed64,2,opt,name=vat,proto3" json:"vat,omitempty"`
Count uint64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
PriceSingle float64 `protobuf:"fixed64,4,opt,name=price_single,json=priceSingle,proto3" json:"price_single,omitempty"`
PriceSum float64 `protobuf:"fixed64,5,opt,name=price_sum,json=priceSum,proto3" json:"price_sum,omitempty"`
PriceNet bool `protobuf:"varint,6,opt,name=price_net,json=priceNet,proto3" json:"price_net,omitempty"`
}
func (x *OrderItem) Reset() {
*x = OrderItem{}
if protoimpl.UnsafeEnabled {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderItem) ProtoMessage() {}
func (x *OrderItem) ProtoReflect() protoreflect.Message {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderItem.ProtoReflect.Descriptor instead.
func (*OrderItem) Descriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{3}
}
func (x *OrderItem) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *OrderItem) GetVat() float64 {
if x != nil {
return x.Vat
}
return 0
}
func (x *OrderItem) GetCount() uint64 {
if x != nil {
return x.Count
}
return 0
}
func (x *OrderItem) GetPriceSingle() float64 {
if x != nil {
return x.PriceSingle
}
return 0
}
func (x *OrderItem) GetPriceSum() float64 {
if x != nil {
return x.PriceSum
}
return 0
}
func (x *OrderItem) GetPriceNet() bool {
if x != nil {
return x.PriceNet
}
return false
}
type OrderVatItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Vat float64 `protobuf:"fixed64,2,opt,name=vat,proto3" json:"vat,omitempty"`
VatMoneySum float64 `protobuf:"fixed64,3,opt,name=vat_money_sum,json=vatMoneySum,proto3" json:"vat_money_sum,omitempty"`
ItemsCount uint64 `protobuf:"varint,4,opt,name=items_count,json=itemsCount,proto3" json:"items_count,omitempty"`
}
func (x *OrderVatItem) Reset() {
*x = OrderVatItem{}
if protoimpl.UnsafeEnabled {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderVatItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderVatItem) ProtoMessage() {}
func (x *OrderVatItem) ProtoReflect() protoreflect.Message {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderVatItem.ProtoReflect.Descriptor instead.
func (*OrderVatItem) Descriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{4}
}
func (x *OrderVatItem) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *OrderVatItem) GetVat() float64 {
if x != nil {
return x.Vat
}
return 0
}
func (x *OrderVatItem) GetVatMoneySum() float64 {
if x != nil {
return x.VatMoneySum
}
return 0
}
func (x *OrderVatItem) GetItemsCount() uint64 {
if x != nil {
return x.ItemsCount
}
return 0
}
// Invoice
type Invoice struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Order *OrderInfo `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
Offer *OfferInfo `protobuf:"bytes,2,opt,name=offer,proto3" json:"offer,omitempty"`
Info *InvoiceInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
}
func (x *Invoice) Reset() {
*x = Invoice{}
if protoimpl.UnsafeEnabled {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Invoice) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Invoice) ProtoMessage() {}
func (x *Invoice) ProtoReflect() protoreflect.Message {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Invoice.ProtoReflect.Descriptor instead.
func (*Invoice) Descriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{5}
}
func (x *Invoice) GetOrder() *OrderInfo {
if x != nil {
return x.Order
}
return nil
}
func (x *Invoice) GetOffer() *OfferInfo {
if x != nil {
return x.Offer
}
return nil
}
func (x *Invoice) GetInfo() *InvoiceInfo {
if x != nil {
return x.Info
}
return nil
}
// PDF Response
type DocumentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Document []byte `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
Sha512 string `protobuf:"bytes,3,opt,name=sha512,proto3" json:"sha512,omitempty"`
}
func (x *DocumentResponse) Reset() {
*x = DocumentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DocumentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DocumentResponse) ProtoMessage() {}
func (x *DocumentResponse) ProtoReflect() protoreflect.Message {
mi := &file_printer_v1_pdf_invoice_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DocumentResponse.ProtoReflect.Descriptor instead.
func (*DocumentResponse) Descriptor() ([]byte, []int) {
return file_printer_v1_pdf_invoice_proto_rawDescGZIP(), []int{6}
}
func (x *DocumentResponse) GetDocument() []byte {
if x != nil {
return x.Document
}
return nil
}
func (x *DocumentResponse) GetSignature() string {
if x != nil {
return x.Signature
}
return ""
}
func (x *DocumentResponse) GetSha512() string {
if x != nil {
return x.Sha512
}
return ""
}
var File_printer_v1_pdf_invoice_proto protoreflect.FileDescriptor
var file_printer_v1_pdf_invoice_proto_rawDesc = []byte{
0x0a, 0x1c, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x64, 0x66,
0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12,
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f,
0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f,
0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x3f,
0x0a, 0x10, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x64, 0x61,
0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x52,
0x0e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x75, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12,
0x42, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e,
0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x54,
0x79, 0x70, 0x65, 0x22, 0x8c, 0x03, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0a,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x61,
0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x75, 0x65, 0x5f,
0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x75, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12,
0x3c, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31,
0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79,
0x70, 0x65, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a,
0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e,
0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x74, 0x65,
0x6d, 0x52, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x48, 0x0a,
0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x56, 0x61, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x56,
0x61, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f,
0x73, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x19, 0x0a, 0x08, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x6f,
0x66, 0x66, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61,
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x44, 0x61, 0x74,
0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x64,
0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
0x52, 0x0c, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x44, 0x75, 0x65, 0x44, 0x61, 0x74, 0x65, 0x22, 0xb2,
0x01, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x20, 0x0a, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10,
0x0a, 0x03, 0x76, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x76, 0x61, 0x74,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f,
0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x72,
0x69, 0x63, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x69,
0x63, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x70, 0x72,
0x69, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f,
0x6e, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x72, 0x69, 0x63, 0x65,
0x4e, 0x65, 0x74, 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x56, 0x61, 0x74,
0x49, 0x74, 0x65, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x01, 0x52, 0x03, 0x76, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x61, 0x74, 0x5f,
0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52,
0x0b, 0x76, 0x61, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x53, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa8, 0x01,
0x0a, 0x07, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x72,
0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x33,
0x0a, 0x05, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x2e, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6f, 0x66,
0x66, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08,
0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67,
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x35, 0x31, 0x32,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x35, 0x31, 0x32, 0x2a, 0x59,
0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a,
0x18, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x49,
0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x44,
0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x02, 0x2a, 0x67, 0x0a, 0x09, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x52, 0x44, 0x45,
0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x57, 0x57, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10,
0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4d, 0x41, 0x49, 0x4c,
0x10, 0x03, 0x32, 0x81, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x0a, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
0x47, 0x65, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31,
0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
0x1a, 0x24, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e,
0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x13,
0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x6f,
0x69, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0xdd, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x70,
0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63,
0x65, 0x42, 0x0f, 0x50, 0x64, 0x66, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x2e, 0x64, 0x65, 0x69, 0x6e, 0x65, 0x61,
0x67, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x2e, 0x62, 0x69, 0x7a, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x2d, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0xa2, 0x02,
0x03, 0x50, 0x56, 0x49, 0xaa, 0x02, 0x12, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x56,
0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0xca, 0x02, 0x12, 0x50, 0x72, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0xe2, 0x02,
0x1e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x49, 0x6e, 0x76, 0x6f,
0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x14, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x3a, 0x3a, 0x49,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_printer_v1_pdf_invoice_proto_rawDescOnce sync.Once
file_printer_v1_pdf_invoice_proto_rawDescData = file_printer_v1_pdf_invoice_proto_rawDesc
)
func file_printer_v1_pdf_invoice_proto_rawDescGZIP() []byte {
file_printer_v1_pdf_invoice_proto_rawDescOnce.Do(func() {
file_printer_v1_pdf_invoice_proto_rawDescData = protoimpl.X.CompressGZIP(file_printer_v1_pdf_invoice_proto_rawDescData)
})
return file_printer_v1_pdf_invoice_proto_rawDescData
}
var file_printer_v1_pdf_invoice_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_printer_v1_pdf_invoice_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_printer_v1_pdf_invoice_proto_goTypes = []interface{}{
(InvoiceType)(0), // 0: printer.v1.invoice.InvoiceType
(OrderType)(0), // 1: printer.v1.invoice.OrderType
(*InvoiceInfo)(nil), // 2: printer.v1.invoice.InvoiceInfo
(*OrderInfo)(nil), // 3: printer.v1.invoice.OrderInfo
(*OfferInfo)(nil), // 4: printer.v1.invoice.OfferInfo
(*OrderItem)(nil), // 5: printer.v1.invoice.OrderItem
(*OrderVatItem)(nil), // 6: printer.v1.invoice.OrderVatItem
(*Invoice)(nil), // 7: printer.v1.invoice.Invoice
(*DocumentResponse)(nil), // 8: printer.v1.invoice.DocumentResponse
(*datetime.DateTime)(nil), // 9: google.type.DateTime
}
var file_printer_v1_pdf_invoice_proto_depIdxs = []int32{
9, // 0: printer.v1.invoice.InvoiceInfo.invoice_date:type_name -> google.type.DateTime
9, // 1: printer.v1.invoice.InvoiceInfo.invoice_due_date:type_name -> google.type.DateTime
0, // 2: printer.v1.invoice.InvoiceInfo.invoice_type:type_name -> printer.v1.invoice.InvoiceType
9, // 3: printer.v1.invoice.OrderInfo.order_date:type_name -> google.type.DateTime
9, // 4: printer.v1.invoice.OrderInfo.order_due_date:type_name -> google.type.DateTime
1, // 5: printer.v1.invoice.OrderInfo.order_type:type_name -> printer.v1.invoice.OrderType
5, // 6: printer.v1.invoice.OrderInfo.order_items:type_name -> printer.v1.invoice.OrderItem
6, // 7: printer.v1.invoice.OrderInfo.order_vat_items:type_name -> printer.v1.invoice.OrderVatItem
9, // 8: printer.v1.invoice.OfferInfo.offer_date:type_name -> google.type.DateTime
9, // 9: printer.v1.invoice.OfferInfo.offer_due_date:type_name -> google.type.DateTime
3, // 10: printer.v1.invoice.Invoice.order:type_name -> printer.v1.invoice.OrderInfo
4, // 11: printer.v1.invoice.Invoice.offer:type_name -> printer.v1.invoice.OfferInfo
2, // 12: printer.v1.invoice.Invoice.info:type_name -> printer.v1.invoice.InvoiceInfo
7, // 13: printer.v1.invoice.PrinterService.InvoiceGen:input_type -> printer.v1.invoice.Invoice
8, // 14: printer.v1.invoice.PrinterService.InvoiceGen:output_type -> printer.v1.invoice.DocumentResponse
14, // [14:15] is the sub-list for method output_type
13, // [13:14] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
}
func init() { file_printer_v1_pdf_invoice_proto_init() }
func file_printer_v1_pdf_invoice_proto_init() {
if File_printer_v1_pdf_invoice_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_printer_v1_pdf_invoice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InvoiceInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_printer_v1_pdf_invoice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_printer_v1_pdf_invoice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OfferInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_printer_v1_pdf_invoice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_printer_v1_pdf_invoice_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderVatItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_printer_v1_pdf_invoice_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Invoice); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_printer_v1_pdf_invoice_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DocumentResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_printer_v1_pdf_invoice_proto_msgTypes[1].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_printer_v1_pdf_invoice_proto_rawDesc,
NumEnums: 2,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_printer_v1_pdf_invoice_proto_goTypes,
DependencyIndexes: file_printer_v1_pdf_invoice_proto_depIdxs,
EnumInfos: file_printer_v1_pdf_invoice_proto_enumTypes,
MessageInfos: file_printer_v1_pdf_invoice_proto_msgTypes,
}.Build()
File_printer_v1_pdf_invoice_proto = out.File
file_printer_v1_pdf_invoice_proto_rawDesc = nil
file_printer_v1_pdf_invoice_proto_goTypes = nil
file_printer_v1_pdf_invoice_proto_depIdxs = nil
}
@@ -0,0 +1,170 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: printer/v1/pdf_invoice.proto
/*
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package v1
import (
"context"
"io"
"net/http"
extV1 "git.deineagentur.biz/payment-backoffice/protobuf/gen/proto/go/printer/v1"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, client extV1.PrinterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq extV1.Invoice
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.InvoiceGen(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_PrinterService_InvoiceGen_0(ctx context.Context, marshaler runtime.Marshaler, server extV1.PrinterServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq extV1.Invoice
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.InvoiceGen(ctx, &protoReq)
return msg, metadata, err
}
// RegisterPrinterServiceHandlerServer registers the http handlers for service PrinterService to "mux".
// UnaryRPC :call PrinterServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPrinterServiceHandlerFromEndpoint instead.
func RegisterPrinterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extV1.PrinterServiceServer) error {
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterPrinterServiceHandlerFromEndpoint is same as RegisterPrinterServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPrinterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterPrinterServiceHandler(ctx, mux, conn)
}
// RegisterPrinterServiceHandler registers the http handlers for service PrinterService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterPrinterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterPrinterServiceHandlerClient(ctx, mux, extV1.NewPrinterServiceClient(conn))
}
// RegisterPrinterServiceHandlerClient registers the http handlers for service PrinterService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extV1.PrinterServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extV1.PrinterServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "extV1.PrinterServiceClient" to call the correct interceptors.
func RegisterPrinterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extV1.PrinterServiceClient) error {
mux.Handle("POST", pattern_PrinterService_InvoiceGen_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/printer.v1.invoice.PrinterService/InvoiceGen", runtime.WithHTTPPathPattern("/v1/printer/invoice"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PrinterService_InvoiceGen_0(ctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PrinterService_InvoiceGen_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_PrinterService_InvoiceGen_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "printer", "invoice"}, ""))
)
var (
forward_PrinterService_InvoiceGen_0 = runtime.ForwardResponseMessage
)
@@ -0,0 +1,103 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: printer/v1/pdf_invoice.proto
package v1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// PrinterServiceClient is the client API for PrinterService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PrinterServiceClient interface {
InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error)
}
type printerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPrinterServiceClient(cc grpc.ClientConnInterface) PrinterServiceClient {
return &printerServiceClient{cc}
}
func (c *printerServiceClient) InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error) {
out := new(DocumentResponse)
err := c.cc.Invoke(ctx, "/printer.v1.invoice.PrinterService/InvoiceGen", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PrinterServiceServer is the server API for PrinterService service.
// All implementations should embed UnimplementedPrinterServiceServer
// for forward compatibility
type PrinterServiceServer interface {
InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error)
}
// UnimplementedPrinterServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPrinterServiceServer struct {
}
func (UnimplementedPrinterServiceServer) InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method InvoiceGen not implemented")
}
// UnsafePrinterServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PrinterServiceServer will
// result in compilation errors.
type UnsafePrinterServiceServer interface {
mustEmbedUnimplementedPrinterServiceServer()
}
func RegisterPrinterServiceServer(s grpc.ServiceRegistrar, srv PrinterServiceServer) {
s.RegisterService(&PrinterService_ServiceDesc, srv)
}
func _PrinterService_InvoiceGen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Invoice)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PrinterServiceServer).InvoiceGen(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/printer.v1.invoice.PrinterService/InvoiceGen",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrinterServiceServer).InvoiceGen(ctx, req.(*Invoice))
}
return interceptor(ctx, in, info, handler)
}
// PrinterService_ServiceDesc is the grpc.ServiceDesc for PrinterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PrinterService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "printer.v1.invoice.PrinterService",
HandlerType: (*PrinterServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "InvoiceGen",
Handler: _PrinterService_InvoiceGen_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "printer/v1/pdf_invoice.proto",
}
+333
View File
@@ -0,0 +1,333 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc (unknown)
// source: shop/v1/shop.proto
package shopv1
import (
_ "google.golang.org/genproto/googleapis/type/datetime"
_ "google.golang.org/genproto/googleapis/type/money"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// PaymentProvider represents the supported set
// of payment providers.
type ShopType int32
const (
ShopType_SHOP_TYPE_UNSPECIFIED ShopType = 0
ShopType_SHOP_TYPE_DIGITAL ShopType = 1
ShopType_SHOP_TYPE_RETAIL ShopType = 2
)
// Enum value maps for ShopType.
var (
ShopType_name = map[int32]string{
0: "SHOP_TYPE_UNSPECIFIED",
1: "SHOP_TYPE_DIGITAL",
2: "SHOP_TYPE_RETAIL",
}
ShopType_value = map[string]int32{
"SHOP_TYPE_UNSPECIFIED": 0,
"SHOP_TYPE_DIGITAL": 1,
"SHOP_TYPE_RETAIL": 2,
}
)
func (x ShopType) Enum() *ShopType {
p := new(ShopType)
*p = x
return p
}
func (x ShopType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ShopType) Descriptor() protoreflect.EnumDescriptor {
return file_shop_v1_shop_proto_enumTypes[0].Descriptor()
}
func (ShopType) Type() protoreflect.EnumType {
return &file_shop_v1_shop_proto_enumTypes[0]
}
func (x ShopType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ShopType.Descriptor instead.
func (ShopType) EnumDescriptor() ([]byte, []int) {
return file_shop_v1_shop_proto_rawDescGZIP(), []int{0}
}
// Order represents a monetary order.
type Shop struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ShopId *string `protobuf:"bytes,1,opt,name=shop_id,json=shopId,proto3,oneof" json:"shop_id,omitempty"`
ShopName string `protobuf:"bytes,2,opt,name=shop_name,json=shopName,proto3" json:"shop_name,omitempty"`
ShopType ShopType `protobuf:"varint,3,opt,name=shop_type,json=shopType,proto3,enum=shop.v1.ShopType" json:"shop_type,omitempty"`
ShopUrlWww string `protobuf:"bytes,4,opt,name=shop_url_www,json=shopUrlWww,proto3" json:"shop_url_www,omitempty"`
ShopUrlLogo string `protobuf:"bytes,5,opt,name=shop_url_logo,json=shopUrlLogo,proto3" json:"shop_url_logo,omitempty"`
ShopUrlApi string `protobuf:"bytes,6,opt,name=shop_url_api,json=shopUrlApi,proto3" json:"shop_url_api,omitempty"`
ShopCurrency string `protobuf:"bytes,7,opt,name=shop_currency,json=shopCurrency,proto3" json:"shop_currency,omitempty"`
ShopPrefixOrder string `protobuf:"bytes,8,opt,name=shop_prefix_order,json=shopPrefixOrder,proto3" json:"shop_prefix_order,omitempty"`
ShopPrefixInvoice string `protobuf:"bytes,9,opt,name=shop_prefix_invoice,json=shopPrefixInvoice,proto3" json:"shop_prefix_invoice,omitempty"`
ShopPrefixOffer string `protobuf:"bytes,10,opt,name=shop_prefix_offer,json=shopPrefixOffer,proto3" json:"shop_prefix_offer,omitempty"`
}
func (x *Shop) Reset() {
*x = Shop{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_v1_shop_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Shop) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Shop) ProtoMessage() {}
func (x *Shop) ProtoReflect() protoreflect.Message {
mi := &file_shop_v1_shop_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Shop.ProtoReflect.Descriptor instead.
func (*Shop) Descriptor() ([]byte, []int) {
return file_shop_v1_shop_proto_rawDescGZIP(), []int{0}
}
func (x *Shop) GetShopId() string {
if x != nil && x.ShopId != nil {
return *x.ShopId
}
return ""
}
func (x *Shop) GetShopName() string {
if x != nil {
return x.ShopName
}
return ""
}
func (x *Shop) GetShopType() ShopType {
if x != nil {
return x.ShopType
}
return ShopType_SHOP_TYPE_UNSPECIFIED
}
func (x *Shop) GetShopUrlWww() string {
if x != nil {
return x.ShopUrlWww
}
return ""
}
func (x *Shop) GetShopUrlLogo() string {
if x != nil {
return x.ShopUrlLogo
}
return ""
}
func (x *Shop) GetShopUrlApi() string {
if x != nil {
return x.ShopUrlApi
}
return ""
}
func (x *Shop) GetShopCurrency() string {
if x != nil {
return x.ShopCurrency
}
return ""
}
func (x *Shop) GetShopPrefixOrder() string {
if x != nil {
return x.ShopPrefixOrder
}
return ""
}
func (x *Shop) GetShopPrefixInvoice() string {
if x != nil {
return x.ShopPrefixInvoice
}
return ""
}
func (x *Shop) GetShopPrefixOffer() string {
if x != nil {
return x.ShopPrefixOffer
}
return ""
}
var File_shop_v1_shop_proto protoreflect.FileDescriptor
var file_shop_v1_shop_proto_rawDesc = []byte{
0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74,
0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x92, 0x03, 0x0a, 0x04, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x1c, 0x0a, 0x07, 0x73,
0x68, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06,
0x73, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f,
0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x68,
0x6f, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x73, 0x68, 0x6f, 0x70,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x73, 0x68,
0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x75,
0x72, 0x6c, 0x5f, 0x77, 0x77, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68,
0x6f, 0x70, 0x55, 0x72, 0x6c, 0x57, 0x77, 0x77, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x68, 0x6f, 0x70,
0x5f, 0x75, 0x72, 0x6c, 0x5f, 0x6c, 0x6f, 0x67, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x73, 0x68, 0x6f, 0x70, 0x55, 0x72, 0x6c, 0x4c, 0x6f, 0x67, 0x6f, 0x12, 0x20, 0x0a, 0x0c,
0x73, 0x68, 0x6f, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x06, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x70, 0x55, 0x72, 0x6c, 0x41, 0x70, 0x69, 0x12, 0x23,
0x0a, 0x0d, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x68, 0x6f, 0x70, 0x43, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x63, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66,
0x69, 0x78, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
0x73, 0x68, 0x6f, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12,
0x2e, 0x0a, 0x13, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x69,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x68,
0x6f, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12,
0x2a, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6f,
0x66, 0x66, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x68, 0x6f, 0x70,
0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x73, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x2a, 0x52, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54,
0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15,
0x0a, 0x11, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x47, 0x49,
0x54, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x52, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x32, 0xa8, 0x01, 0x0a, 0x0b,
0x53, 0x68, 0x6f, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x4c,
0x69, 0x73, 0x74, 0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68,
0x6f, 0x70, 0x1a, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f,
0x70, 0x12, 0x23, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e,
0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x1a, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76,
0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x1a,
0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x26,
0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e,
0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x1a, 0x0d, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x76,
0x31, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x42, 0xa3, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x73,
0x68, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x53, 0x68, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x2e, 0x64, 0x65, 0x69, 0x6e, 0x65, 0x61, 0x67,
0x65, 0x6e, 0x74, 0x75, 0x72, 0x2e, 0x62, 0x69, 0x7a, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x2d, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x67, 0x6f, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x68, 0x6f, 0x70, 0x76,
0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x2e, 0x56,
0x31, 0xca, 0x02, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x53, 0x68,
0x6f, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_shop_v1_shop_proto_rawDescOnce sync.Once
file_shop_v1_shop_proto_rawDescData = file_shop_v1_shop_proto_rawDesc
)
func file_shop_v1_shop_proto_rawDescGZIP() []byte {
file_shop_v1_shop_proto_rawDescOnce.Do(func() {
file_shop_v1_shop_proto_rawDescData = protoimpl.X.CompressGZIP(file_shop_v1_shop_proto_rawDescData)
})
return file_shop_v1_shop_proto_rawDescData
}
var file_shop_v1_shop_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_shop_v1_shop_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_shop_v1_shop_proto_goTypes = []interface{}{
(ShopType)(0), // 0: shop.v1.ShopType
(*Shop)(nil), // 1: shop.v1.Shop
}
var file_shop_v1_shop_proto_depIdxs = []int32{
0, // 0: shop.v1.Shop.shop_type:type_name -> shop.v1.ShopType
1, // 1: shop.v1.ShopService.List:input_type -> shop.v1.Shop
1, // 2: shop.v1.ShopService.Add:input_type -> shop.v1.Shop
1, // 3: shop.v1.ShopService.Update:input_type -> shop.v1.Shop
1, // 4: shop.v1.ShopService.Delete:input_type -> shop.v1.Shop
1, // 5: shop.v1.ShopService.List:output_type -> shop.v1.Shop
1, // 6: shop.v1.ShopService.Add:output_type -> shop.v1.Shop
1, // 7: shop.v1.ShopService.Update:output_type -> shop.v1.Shop
1, // 8: shop.v1.ShopService.Delete:output_type -> shop.v1.Shop
5, // [5:9] is the sub-list for method output_type
1, // [1:5] 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_shop_v1_shop_proto_init() }
func file_shop_v1_shop_proto_init() {
if File_shop_v1_shop_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_shop_v1_shop_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Shop); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_shop_v1_shop_proto_msgTypes[0].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_shop_v1_shop_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_shop_v1_shop_proto_goTypes,
DependencyIndexes: file_shop_v1_shop_proto_depIdxs,
EnumInfos: file_shop_v1_shop_proto_enumTypes,
MessageInfos: file_shop_v1_shop_proto_msgTypes,
}.Build()
File_shop_v1_shop_proto = out.File
file_shop_v1_shop_proto_rawDesc = nil
file_shop_v1_shop_proto_goTypes = nil
file_shop_v1_shop_proto_depIdxs = nil
}
+211
View File
@@ -0,0 +1,211 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: shop/v1/shop.proto
package shopv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ShopServiceClient is the client API for ShopService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ShopServiceClient interface {
List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error)
}
type shopServiceClient struct {
cc grpc.ClientConnInterface
}
func NewShopServiceClient(cc grpc.ClientConnInterface) ShopServiceClient {
return &shopServiceClient{cc}
}
func (c *shopServiceClient) List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *shopServiceClient) Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Add", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *shopServiceClient) Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *shopServiceClient) Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) {
out := new(Shop)
err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ShopServiceServer is the server API for ShopService service.
// All implementations should embed UnimplementedShopServiceServer
// for forward compatibility
type ShopServiceServer interface {
List(context.Context, *Shop) (*Shop, error)
Add(context.Context, *Shop) (*Shop, error)
Update(context.Context, *Shop) (*Shop, error)
Delete(context.Context, *Shop) (*Shop, error)
}
// UnimplementedShopServiceServer should be embedded to have forward compatible implementations.
type UnimplementedShopServiceServer struct {
}
func (UnimplementedShopServiceServer) List(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedShopServiceServer) Add(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
}
func (UnimplementedShopServiceServer) Update(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedShopServiceServer) Delete(context.Context, *Shop) (*Shop, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
// UnsafeShopServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ShopServiceServer will
// result in compilation errors.
type UnsafeShopServiceServer interface {
mustEmbedUnimplementedShopServiceServer()
}
func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer) {
s.RegisterService(&ShopService_ServiceDesc, srv)
}
func _ShopService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).List(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
func _ShopService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).Add(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/Add",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).Add(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
func _ShopService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).Update(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
func _ShopService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Shop)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ShopServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/shop.v1.ShopService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShopServiceServer).Delete(ctx, req.(*Shop))
}
return interceptor(ctx, in, info, handler)
}
// ShopService_ServiceDesc is the grpc.ServiceDesc for ShopService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ShopService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "shop.v1.ShopService",
HandlerType: (*ShopServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "List",
Handler: _ShopService_List_Handler,
},
{
MethodName: "Add",
Handler: _ShopService_Add_Handler,
},
{
MethodName: "Update",
Handler: _ShopService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _ShopService_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "shop/v1/shop.proto",
}
Binary file not shown.
+151
View File
@@ -0,0 +1,151 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: payment/v1/payment.proto
namespace Payment\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Order represents a monetary order.
*
* Generated from protobuf message <code>payment.v1.Order</code>
*/
class Order extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
*/
protected $order_id = '';
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
*/
protected $recipient_id = '';
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
*/
protected $amount = null;
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
*/
protected $payment_provider = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $order_id
* @type string $recipient_id
* @type \Google\Type\Money $amount
* @type int $payment_provider
* }
*/
public function __construct($data = NULL) {
\Payment\V1\GPBMetadata\Payment::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @return string
*/
public function getOrderId()
{
return $this->order_id;
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @param string $var
* @return $this
*/
public function setOrderId($var)
{
GPBUtil::checkString($var, True);
$this->order_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
* @return string
*/
public function getRecipientId()
{
return $this->recipient_id;
}
/**
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
* @param string $var
* @return $this
*/
public function setRecipientId($var)
{
GPBUtil::checkString($var, True);
$this->recipient_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
* @return \Google\Type\Money|null
*/
public function getAmount()
{
return $this->amount;
}
public function hasAmount()
{
return isset($this->amount);
}
public function clearAmount()
{
unset($this->amount);
}
/**
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
* @param \Google\Type\Money $var
* @return $this
*/
public function setAmount($var)
{
GPBUtil::checkMessage($var, \Google\Type\Money::class);
$this->amount = $var;
return $this;
}
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
* @return int
*/
public function getPaymentProvider()
{
return $this->payment_provider;
}
/**
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
* @param int $var
* @return $this
*/
public function setPaymentProvider($var)
{
GPBUtil::checkEnum($var, \Payment\V1\PaymentProvider::class);
$this->payment_provider = $var;
return $this;
}
}
@@ -0,0 +1,61 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: payment/v1/payment.proto
namespace Payment\V1;
use UnexpectedValueException;
/**
* PaymentProvider represents the supported set
* of payment providers.
*
* Protobuf type <code>payment.v1.PaymentProvider</code>
*/
class PaymentProvider
{
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_UNSPECIFIED = 0;</code>
*/
const PAYMENT_PROVIDER_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_STRIPE = 1;</code>
*/
const PAYMENT_PROVIDER_STRIPE = 1;
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_PAYPAL = 2;</code>
*/
const PAYMENT_PROVIDER_PAYPAL = 2;
/**
* Generated from protobuf enum <code>PAYMENT_PROVIDER_APPLE = 3;</code>
*/
const PAYMENT_PROVIDER_APPLE = 3;
private static $valueToName = [
self::PAYMENT_PROVIDER_UNSPECIFIED => 'PAYMENT_PROVIDER_UNSPECIFIED',
self::PAYMENT_PROVIDER_STRIPE => 'PAYMENT_PROVIDER_STRIPE',
self::PAYMENT_PROVIDER_PAYPAL => 'PAYMENT_PROVIDER_PAYPAL',
self::PAYMENT_PROVIDER_APPLE => 'PAYMENT_PROVIDER_APPLE',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
+58
View File
@@ -0,0 +1,58 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.DeletePetRequest</code>
*/
class DeletePetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pet_id
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
}
@@ -0,0 +1,31 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.DeletePetResponse</code>
*/
class DeletePetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
}
Binary file not shown.
+58
View File
@@ -0,0 +1,58 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.GetPetRequest</code>
*/
class GetPetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pet_id
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
}
+68
View File
@@ -0,0 +1,68 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.GetPetResponse</code>
*/
class GetPetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
*/
protected $pet = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Pet\V1\Pet $pet
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @return \Pet\V1\Pet|null
*/
public function getPet()
{
return $this->pet;
}
public function hasPet()
{
return isset($this->pet);
}
public function clearPet()
{
unset($this->pet);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @param \Pet\V1\Pet $var
* @return $this
*/
public function setPet($var)
{
GPBUtil::checkMessage($var, \Pet\V1\Pet::class);
$this->pet = $var;
return $this;
}
}
+151
View File
@@ -0,0 +1,151 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Pet represents a pet in the pet store.
*
* Generated from protobuf message <code>pet.v1.Pet</code>
*/
class Pet extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
*/
protected $pet_type = 0;
/**
* Generated from protobuf field <code>string pet_id = 2 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Generated from protobuf field <code>string name = 3 [json_name = "name"];</code>
*/
protected $name = '';
/**
* Generated from protobuf field <code>.google.type.DateTime created_at = 4 [json_name = "createdAt"];</code>
*/
protected $created_at = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $pet_type
* @type string $pet_id
* @type string $name
* @type \Google\Type\DateTime $created_at
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @return int
*/
public function getPetType()
{
return $this->pet_type;
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @param int $var
* @return $this
*/
public function setPetType($var)
{
GPBUtil::checkEnum($var, \Pet\V1\PetType::class);
$this->pet_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>string pet_id = 2 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 2 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>string name = 3 [json_name = "name"];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Generated from protobuf field <code>string name = 3 [json_name = "name"];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime created_at = 4 [json_name = "createdAt"];</code>
* @return \Google\Type\DateTime|null
*/
public function getCreatedAt()
{
return $this->created_at;
}
public function hasCreatedAt()
{
return isset($this->created_at);
}
public function clearCreatedAt()
{
unset($this->created_at);
}
/**
* Generated from protobuf field <code>.google.type.DateTime created_at = 4 [json_name = "createdAt"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setCreatedAt($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->created_at = $var;
return $this;
}
}
+65
View File
@@ -0,0 +1,65 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use UnexpectedValueException;
/**
* PetType represents the different types of pets in the pet store.
*
* Protobuf type <code>pet.v1.PetType</code>
*/
class PetType
{
/**
* Generated from protobuf enum <code>PET_TYPE_UNSPECIFIED = 0;</code>
*/
const PET_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>PET_TYPE_CAT = 1;</code>
*/
const PET_TYPE_CAT = 1;
/**
* Generated from protobuf enum <code>PET_TYPE_DOG = 2;</code>
*/
const PET_TYPE_DOG = 2;
/**
* Generated from protobuf enum <code>PET_TYPE_SNAKE = 3;</code>
*/
const PET_TYPE_SNAKE = 3;
/**
* Generated from protobuf enum <code>PET_TYPE_HAMSTER = 4;</code>
*/
const PET_TYPE_HAMSTER = 4;
private static $valueToName = [
self::PET_TYPE_UNSPECIFIED => 'PET_TYPE_UNSPECIFIED',
self::PET_TYPE_CAT => 'PET_TYPE_CAT',
self::PET_TYPE_DOG => 'PET_TYPE_DOG',
self::PET_TYPE_SNAKE => 'PET_TYPE_SNAKE',
self::PET_TYPE_HAMSTER => 'PET_TYPE_HAMSTER',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
@@ -0,0 +1,95 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PurchasePetRequest</code>
*/
class PurchasePetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
*/
protected $pet_id = '';
/**
* Generated from protobuf field <code>.payment.v1.Order order = 2 [json_name = "order"];</code>
*/
protected $order = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pet_id
* @type \Payment\V1\Order $order
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @return string
*/
public function getPetId()
{
return $this->pet_id;
}
/**
* Generated from protobuf field <code>string pet_id = 1 [json_name = "petId"];</code>
* @param string $var
* @return $this
*/
public function setPetId($var)
{
GPBUtil::checkString($var, True);
$this->pet_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.payment.v1.Order order = 2 [json_name = "order"];</code>
* @return \Payment\V1\Order|null
*/
public function getOrder()
{
return $this->order;
}
public function hasOrder()
{
return isset($this->order);
}
public function clearOrder()
{
unset($this->order);
}
/**
* Generated from protobuf field <code>.payment.v1.Order order = 2 [json_name = "order"];</code>
* @param \Payment\V1\Order $var
* @return $this
*/
public function setOrder($var)
{
GPBUtil::checkMessage($var, \Payment\V1\Order::class);
$this->order = $var;
return $this;
}
}
@@ -0,0 +1,31 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PurchasePetResponse</code>
*/
class PurchasePetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
}
+85
View File
@@ -0,0 +1,85 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PutPetRequest</code>
*/
class PutPetRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
*/
protected $pet_type = 0;
/**
* Generated from protobuf field <code>string name = 2 [json_name = "name"];</code>
*/
protected $name = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $pet_type
* @type string $name
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @return int
*/
public function getPetType()
{
return $this->pet_type;
}
/**
* Generated from protobuf field <code>.pet.v1.PetType pet_type = 1 [json_name = "petType"];</code>
* @param int $var
* @return $this
*/
public function setPetType($var)
{
GPBUtil::checkEnum($var, \Pet\V1\PetType::class);
$this->pet_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>string name = 2 [json_name = "name"];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Generated from protobuf field <code>string name = 2 [json_name = "name"];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
}
+68
View File
@@ -0,0 +1,68 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
namespace Pet\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>pet.v1.PutPetResponse</code>
*/
class PutPetResponse extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
*/
protected $pet = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Pet\V1\Pet $pet
* }
*/
public function __construct($data = NULL) {
\Pet\V1\GPBMetadata\Pet::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @return \Pet\V1\Pet|null
*/
public function getPet()
{
return $this->pet;
}
public function hasPet()
{
return isset($this->pet);
}
public function clearPet()
{
unset($this->pet);
}
/**
* Generated from protobuf field <code>.pet.v1.Pet pet = 1 [json_name = "pet"];</code>
* @param \Pet\V1\Pet $var
* @return $this
*/
public function setPet($var)
{
GPBUtil::checkMessage($var, \Pet\V1\Pet::class);
$this->pet = $var;
return $this;
}
}
@@ -0,0 +1,114 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* PDF Response
*
* Generated from protobuf message <code>printer.v1.invoice.DocumentResponse</code>
*/
class DocumentResponse extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>bytes document = 1 [json_name = "document"];</code>
*/
protected $document = '';
/**
* Generated from protobuf field <code>string signature = 2 [json_name = "signature"];</code>
*/
protected $signature = '';
/**
* Generated from protobuf field <code>string sha512 = 3 [json_name = "sha512"];</code>
*/
protected $sha512 = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $document
* @type string $signature
* @type string $sha512
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>bytes document = 1 [json_name = "document"];</code>
* @return string
*/
public function getDocument()
{
return $this->document;
}
/**
* Generated from protobuf field <code>bytes document = 1 [json_name = "document"];</code>
* @param string $var
* @return $this
*/
public function setDocument($var)
{
GPBUtil::checkString($var, False);
$this->document = $var;
return $this;
}
/**
* Generated from protobuf field <code>string signature = 2 [json_name = "signature"];</code>
* @return string
*/
public function getSignature()
{
return $this->signature;
}
/**
* Generated from protobuf field <code>string signature = 2 [json_name = "signature"];</code>
* @param string $var
* @return $this
*/
public function setSignature($var)
{
GPBUtil::checkString($var, True);
$this->signature = $var;
return $this;
}
/**
* Generated from protobuf field <code>string sha512 = 3 [json_name = "sha512"];</code>
* @return string
*/
public function getSha512()
{
return $this->sha512;
}
/**
* Generated from protobuf field <code>string sha512 = 3 [json_name = "sha512"];</code>
* @param string $var
* @return $this
*/
public function setSha512($var)
{
GPBUtil::checkString($var, True);
$this->sha512 = $var;
return $this;
}
}
@@ -0,0 +1,144 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Invoice
*
* Generated from protobuf message <code>printer.v1.invoice.Invoice</code>
*/
class Invoice extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderInfo order = 1 [json_name = "order"];</code>
*/
protected $order = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.OfferInfo offer = 2 [json_name = "offer"];</code>
*/
protected $offer = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceInfo info = 3 [json_name = "info"];</code>
*/
protected $info = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Printer\V1\Invoice\OrderInfo $order
* @type \Printer\V1\Invoice\OfferInfo $offer
* @type \Printer\V1\Invoice\InvoiceInfo $info
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderInfo order = 1 [json_name = "order"];</code>
* @return \Printer\V1\Invoice\OrderInfo|null
*/
public function getOrder()
{
return $this->order;
}
public function hasOrder()
{
return isset($this->order);
}
public function clearOrder()
{
unset($this->order);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderInfo order = 1 [json_name = "order"];</code>
* @param \Printer\V1\Invoice\OrderInfo $var
* @return $this
*/
public function setOrder($var)
{
GPBUtil::checkMessage($var, \Printer\V1\Invoice\OrderInfo::class);
$this->order = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OfferInfo offer = 2 [json_name = "offer"];</code>
* @return \Printer\V1\Invoice\OfferInfo|null
*/
public function getOffer()
{
return $this->offer;
}
public function hasOffer()
{
return isset($this->offer);
}
public function clearOffer()
{
unset($this->offer);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OfferInfo offer = 2 [json_name = "offer"];</code>
* @param \Printer\V1\Invoice\OfferInfo $var
* @return $this
*/
public function setOffer($var)
{
GPBUtil::checkMessage($var, \Printer\V1\Invoice\OfferInfo::class);
$this->offer = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceInfo info = 3 [json_name = "info"];</code>
* @return \Printer\V1\Invoice\InvoiceInfo|null
*/
public function getInfo()
{
return $this->info;
}
public function hasInfo()
{
return isset($this->info);
}
public function clearInfo()
{
unset($this->info);
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceInfo info = 3 [json_name = "info"];</code>
* @param \Printer\V1\Invoice\InvoiceInfo $var
* @return $this
*/
public function setInfo($var)
{
GPBUtil::checkMessage($var, \Printer\V1\Invoice\InvoiceInfo::class);
$this->info = $var;
return $this;
}
}
@@ -0,0 +1,159 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.InvoiceInfo</code>
*/
class InvoiceInfo extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string invoice_id = 1 [json_name = "invoiceId"];</code>
*/
protected $invoice_id = '';
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_date = 2 [json_name = "invoiceDate"];</code>
*/
protected $invoice_date = null;
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_due_date = 3 [json_name = "invoiceDueDate"];</code>
*/
protected $invoice_due_date = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceType invoice_type = 4 [json_name = "invoiceType"];</code>
*/
protected $invoice_type = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $invoice_id
* @type \Google\Type\DateTime $invoice_date
* @type \Google\Type\DateTime $invoice_due_date
* @type int $invoice_type
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string invoice_id = 1 [json_name = "invoiceId"];</code>
* @return string
*/
public function getInvoiceId()
{
return $this->invoice_id;
}
/**
* Generated from protobuf field <code>string invoice_id = 1 [json_name = "invoiceId"];</code>
* @param string $var
* @return $this
*/
public function setInvoiceId($var)
{
GPBUtil::checkString($var, True);
$this->invoice_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_date = 2 [json_name = "invoiceDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getInvoiceDate()
{
return $this->invoice_date;
}
public function hasInvoiceDate()
{
return isset($this->invoice_date);
}
public function clearInvoiceDate()
{
unset($this->invoice_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_date = 2 [json_name = "invoiceDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setInvoiceDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->invoice_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_due_date = 3 [json_name = "invoiceDueDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getInvoiceDueDate()
{
return $this->invoice_due_date;
}
public function hasInvoiceDueDate()
{
return isset($this->invoice_due_date);
}
public function clearInvoiceDueDate()
{
unset($this->invoice_due_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime invoice_due_date = 3 [json_name = "invoiceDueDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setInvoiceDueDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->invoice_due_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceType invoice_type = 4 [json_name = "invoiceType"];</code>
* @return int
*/
public function getInvoiceType()
{
return $this->invoice_type;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.InvoiceType invoice_type = 4 [json_name = "invoiceType"];</code>
* @param int $var
* @return $this
*/
public function setInvoiceType($var)
{
GPBUtil::checkEnum($var, \Printer\V1\Invoice\InvoiceType::class);
$this->invoice_type = $var;
return $this;
}
}
@@ -0,0 +1,56 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use UnexpectedValueException;
/**
* PaymentProvider represents the supported set
* of payment providers.
*
* Protobuf type <code>printer.v1.invoice.InvoiceType</code>
*/
class InvoiceType
{
/**
* Generated from protobuf enum <code>INVOICE_TYPE_UNSPECIFIED = 0;</code>
*/
const INVOICE_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>INVOICE_TYPE_PAID = 1;</code>
*/
const INVOICE_TYPE_PAID = 1;
/**
* Generated from protobuf enum <code>INVOICE_TYPE_OPEN = 2;</code>
*/
const INVOICE_TYPE_OPEN = 2;
private static $valueToName = [
self::INVOICE_TYPE_UNSPECIFIED => 'INVOICE_TYPE_UNSPECIFIED',
self::INVOICE_TYPE_PAID => 'INVOICE_TYPE_PAID',
self::INVOICE_TYPE_OPEN => 'INVOICE_TYPE_OPEN',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
@@ -0,0 +1,132 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OfferInfo</code>
*/
class OfferInfo extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string offer_id = 1 [json_name = "offerId"];</code>
*/
protected $offer_id = '';
/**
* Generated from protobuf field <code>.google.type.DateTime offer_date = 2 [json_name = "offerDate"];</code>
*/
protected $offer_date = null;
/**
* Generated from protobuf field <code>.google.type.DateTime offer_due_date = 3 [json_name = "offerDueDate"];</code>
*/
protected $offer_due_date = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $offer_id
* @type \Google\Type\DateTime $offer_date
* @type \Google\Type\DateTime $offer_due_date
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string offer_id = 1 [json_name = "offerId"];</code>
* @return string
*/
public function getOfferId()
{
return $this->offer_id;
}
/**
* Generated from protobuf field <code>string offer_id = 1 [json_name = "offerId"];</code>
* @param string $var
* @return $this
*/
public function setOfferId($var)
{
GPBUtil::checkString($var, True);
$this->offer_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_date = 2 [json_name = "offerDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOfferDate()
{
return $this->offer_date;
}
public function hasOfferDate()
{
return isset($this->offer_date);
}
public function clearOfferDate()
{
unset($this->offer_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_date = 2 [json_name = "offerDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOfferDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->offer_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_due_date = 3 [json_name = "offerDueDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOfferDueDate()
{
return $this->offer_due_date;
}
public function hasOfferDueDate()
{
return isset($this->offer_due_date);
}
public function clearOfferDueDate()
{
unset($this->offer_due_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime offer_due_date = 3 [json_name = "offerDueDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOfferDueDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->offer_due_date = $var;
return $this;
}
}
@@ -0,0 +1,250 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OrderInfo</code>
*/
class OrderInfo extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
*/
protected $order_id = '';
/**
* Generated from protobuf field <code>.google.type.DateTime order_date = 2 [json_name = "orderDate"];</code>
*/
protected $order_date = null;
/**
* Generated from protobuf field <code>.google.type.DateTime order_due_date = 3 [json_name = "orderDueDate"];</code>
*/
protected $order_due_date = null;
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderType order_type = 4 [json_name = "orderType"];</code>
*/
protected $order_type = 0;
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderItem order_items = 5 [json_name = "orderItems"];</code>
*/
private $order_items;
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderVatItem order_vat_items = 6 [json_name = "orderVatItems"];</code>
*/
private $order_vat_items;
/**
* Generated from protobuf field <code>optional double deposit = 7 [json_name = "deposit"];</code>
*/
protected $deposit = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $order_id
* @type \Google\Type\DateTime $order_date
* @type \Google\Type\DateTime $order_due_date
* @type int $order_type
* @type \Printer\V1\Invoice\OrderItem[]|\Google\Protobuf\Internal\RepeatedField $order_items
* @type \Printer\V1\Invoice\OrderVatItem[]|\Google\Protobuf\Internal\RepeatedField $order_vat_items
* @type float $deposit
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @return string
*/
public function getOrderId()
{
return $this->order_id;
}
/**
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
* @param string $var
* @return $this
*/
public function setOrderId($var)
{
GPBUtil::checkString($var, True);
$this->order_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_date = 2 [json_name = "orderDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOrderDate()
{
return $this->order_date;
}
public function hasOrderDate()
{
return isset($this->order_date);
}
public function clearOrderDate()
{
unset($this->order_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_date = 2 [json_name = "orderDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOrderDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->order_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_due_date = 3 [json_name = "orderDueDate"];</code>
* @return \Google\Type\DateTime|null
*/
public function getOrderDueDate()
{
return $this->order_due_date;
}
public function hasOrderDueDate()
{
return isset($this->order_due_date);
}
public function clearOrderDueDate()
{
unset($this->order_due_date);
}
/**
* Generated from protobuf field <code>.google.type.DateTime order_due_date = 3 [json_name = "orderDueDate"];</code>
* @param \Google\Type\DateTime $var
* @return $this
*/
public function setOrderDueDate($var)
{
GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
$this->order_due_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderType order_type = 4 [json_name = "orderType"];</code>
* @return int
*/
public function getOrderType()
{
return $this->order_type;
}
/**
* Generated from protobuf field <code>.printer.v1.invoice.OrderType order_type = 4 [json_name = "orderType"];</code>
* @param int $var
* @return $this
*/
public function setOrderType($var)
{
GPBUtil::checkEnum($var, \Printer\V1\Invoice\OrderType::class);
$this->order_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderItem order_items = 5 [json_name = "orderItems"];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOrderItems()
{
return $this->order_items;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderItem order_items = 5 [json_name = "orderItems"];</code>
* @param \Printer\V1\Invoice\OrderItem[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOrderItems($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Printer\V1\Invoice\OrderItem::class);
$this->order_items = $arr;
return $this;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderVatItem order_vat_items = 6 [json_name = "orderVatItems"];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOrderVatItems()
{
return $this->order_vat_items;
}
/**
* Generated from protobuf field <code>repeated .printer.v1.invoice.OrderVatItem order_vat_items = 6 [json_name = "orderVatItems"];</code>
* @param \Printer\V1\Invoice\OrderVatItem[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOrderVatItems($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Printer\V1\Invoice\OrderVatItem::class);
$this->order_vat_items = $arr;
return $this;
}
/**
* Generated from protobuf field <code>optional double deposit = 7 [json_name = "deposit"];</code>
* @return float
*/
public function getDeposit()
{
return isset($this->deposit) ? $this->deposit : 0.0;
}
public function hasDeposit()
{
return isset($this->deposit);
}
public function clearDeposit()
{
unset($this->deposit);
}
/**
* Generated from protobuf field <code>optional double deposit = 7 [json_name = "deposit"];</code>
* @param float $var
* @return $this
*/
public function setDeposit($var)
{
GPBUtil::checkDouble($var);
$this->deposit = $var;
return $this;
}
}
@@ -0,0 +1,193 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OrderItem</code>
*/
class OrderItem extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
*/
protected $description = '';
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
*/
protected $vat = 0.0;
/**
* Generated from protobuf field <code>uint64 count = 3 [json_name = "count"];</code>
*/
protected $count = 0;
/**
* Generated from protobuf field <code>double price_single = 4 [json_name = "priceSingle"];</code>
*/
protected $price_single = 0.0;
/**
* Generated from protobuf field <code>double price_sum = 5 [json_name = "priceSum"];</code>
*/
protected $price_sum = 0.0;
/**
* Generated from protobuf field <code>bool price_net = 6 [json_name = "priceNet"];</code>
*/
protected $price_net = false;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $description
* @type float $vat
* @type int|string $count
* @type float $price_single
* @type float $price_sum
* @type bool $price_net
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @return float
*/
public function getVat()
{
return $this->vat;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @param float $var
* @return $this
*/
public function setVat($var)
{
GPBUtil::checkDouble($var);
$this->vat = $var;
return $this;
}
/**
* Generated from protobuf field <code>uint64 count = 3 [json_name = "count"];</code>
* @return int|string
*/
public function getCount()
{
return $this->count;
}
/**
* Generated from protobuf field <code>uint64 count = 3 [json_name = "count"];</code>
* @param int|string $var
* @return $this
*/
public function setCount($var)
{
GPBUtil::checkUint64($var);
$this->count = $var;
return $this;
}
/**
* Generated from protobuf field <code>double price_single = 4 [json_name = "priceSingle"];</code>
* @return float
*/
public function getPriceSingle()
{
return $this->price_single;
}
/**
* Generated from protobuf field <code>double price_single = 4 [json_name = "priceSingle"];</code>
* @param float $var
* @return $this
*/
public function setPriceSingle($var)
{
GPBUtil::checkDouble($var);
$this->price_single = $var;
return $this;
}
/**
* Generated from protobuf field <code>double price_sum = 5 [json_name = "priceSum"];</code>
* @return float
*/
public function getPriceSum()
{
return $this->price_sum;
}
/**
* Generated from protobuf field <code>double price_sum = 5 [json_name = "priceSum"];</code>
* @param float $var
* @return $this
*/
public function setPriceSum($var)
{
GPBUtil::checkDouble($var);
$this->price_sum = $var;
return $this;
}
/**
* Generated from protobuf field <code>bool price_net = 6 [json_name = "priceNet"];</code>
* @return bool
*/
public function getPriceNet()
{
return $this->price_net;
}
/**
* Generated from protobuf field <code>bool price_net = 6 [json_name = "priceNet"];</code>
* @param bool $var
* @return $this
*/
public function setPriceNet($var)
{
GPBUtil::checkBool($var);
$this->price_net = $var;
return $this;
}
}
@@ -0,0 +1,58 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use UnexpectedValueException;
/**
* Protobuf type <code>printer.v1.invoice.OrderType</code>
*/
class OrderType
{
/**
* Generated from protobuf enum <code>ORDER_TYPE_UNSPECIFIED = 0;</code>
*/
const ORDER_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>ORDER_TYPE_PHONE = 1;</code>
*/
const ORDER_TYPE_PHONE = 1;
/**
* Generated from protobuf enum <code>ORDER_TYPE_WWW = 2;</code>
*/
const ORDER_TYPE_WWW = 2;
/**
* Generated from protobuf enum <code>ORDER_TYPE_EMAIL = 3;</code>
*/
const ORDER_TYPE_EMAIL = 3;
private static $valueToName = [
self::ORDER_TYPE_UNSPECIFIED => 'ORDER_TYPE_UNSPECIFIED',
self::ORDER_TYPE_PHONE => 'ORDER_TYPE_PHONE',
self::ORDER_TYPE_WWW => 'ORDER_TYPE_WWW',
self::ORDER_TYPE_EMAIL => 'ORDER_TYPE_EMAIL',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
@@ -0,0 +1,139 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: printer/v1/pdf_invoice.proto
namespace Printer\V1\Invoice;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>printer.v1.invoice.OrderVatItem</code>
*/
class OrderVatItem extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
*/
protected $description = '';
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
*/
protected $vat = 0.0;
/**
* Generated from protobuf field <code>double vat_money_sum = 3 [json_name = "vatMoneySum"];</code>
*/
protected $vat_money_sum = 0.0;
/**
* Generated from protobuf field <code>uint64 items_count = 4 [json_name = "itemsCount"];</code>
*/
protected $items_count = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $description
* @type float $vat
* @type float $vat_money_sum
* @type int|string $items_count
* }
*/
public function __construct($data = NULL) {
\Printer\V1\Invoice\GPBMetadata\PdfInvoice::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Generated from protobuf field <code>string description = 1 [json_name = "description"];</code>
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @return float
*/
public function getVat()
{
return $this->vat;
}
/**
* Generated from protobuf field <code>double vat = 2 [json_name = "vat"];</code>
* @param float $var
* @return $this
*/
public function setVat($var)
{
GPBUtil::checkDouble($var);
$this->vat = $var;
return $this;
}
/**
* Generated from protobuf field <code>double vat_money_sum = 3 [json_name = "vatMoneySum"];</code>
* @return float
*/
public function getVatMoneySum()
{
return $this->vat_money_sum;
}
/**
* Generated from protobuf field <code>double vat_money_sum = 3 [json_name = "vatMoneySum"];</code>
* @param float $var
* @return $this
*/
public function setVatMoneySum($var)
{
GPBUtil::checkDouble($var);
$this->vat_money_sum = $var;
return $this;
}
/**
* Generated from protobuf field <code>uint64 items_count = 4 [json_name = "itemsCount"];</code>
* @return int|string
*/
public function getItemsCount()
{
return $this->items_count;
}
/**
* Generated from protobuf field <code>uint64 items_count = 4 [json_name = "itemsCount"];</code>
* @param int|string $var
* @return $this
*/
public function setItemsCount($var)
{
GPBUtil::checkUint64($var);
$this->items_count = $var;
return $this;
}
}
Binary file not shown.
+313
View File
@@ -0,0 +1,313 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: shop/v1/shop.proto
namespace Shop\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Order represents a monetary order.
*
* Generated from protobuf message <code>shop.v1.Shop</code>
*/
class Shop extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string shop_id = 1 [json_name = "shopId"];</code>
*/
protected $shop_id = null;
/**
* Generated from protobuf field <code>string shop_name = 2 [json_name = "shopName"];</code>
*/
protected $shop_name = '';
/**
* Generated from protobuf field <code>.shop.v1.ShopType shop_type = 3 [json_name = "shopType"];</code>
*/
protected $shop_type = 0;
/**
* Generated from protobuf field <code>string shop_url_www = 4 [json_name = "shopUrlWww"];</code>
*/
protected $shop_url_www = '';
/**
* Generated from protobuf field <code>string shop_url_logo = 5 [json_name = "shopUrlLogo"];</code>
*/
protected $shop_url_logo = '';
/**
* Generated from protobuf field <code>string shop_url_api = 6 [json_name = "shopUrlApi"];</code>
*/
protected $shop_url_api = '';
/**
* Generated from protobuf field <code>string shop_currency = 7 [json_name = "shopCurrency"];</code>
*/
protected $shop_currency = '';
/**
* Generated from protobuf field <code>string shop_prefix_order = 8 [json_name = "shopPrefixOrder"];</code>
*/
protected $shop_prefix_order = '';
/**
* Generated from protobuf field <code>string shop_prefix_invoice = 9 [json_name = "shopPrefixInvoice"];</code>
*/
protected $shop_prefix_invoice = '';
/**
* Generated from protobuf field <code>string shop_prefix_offer = 10 [json_name = "shopPrefixOffer"];</code>
*/
protected $shop_prefix_offer = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $shop_id
* @type string $shop_name
* @type int $shop_type
* @type string $shop_url_www
* @type string $shop_url_logo
* @type string $shop_url_api
* @type string $shop_currency
* @type string $shop_prefix_order
* @type string $shop_prefix_invoice
* @type string $shop_prefix_offer
* }
*/
public function __construct($data = NULL) {
\Shop\V1\GPBMetadata\Shop::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string shop_id = 1 [json_name = "shopId"];</code>
* @return string
*/
public function getShopId()
{
return isset($this->shop_id) ? $this->shop_id : '';
}
public function hasShopId()
{
return isset($this->shop_id);
}
public function clearShopId()
{
unset($this->shop_id);
}
/**
* Generated from protobuf field <code>optional string shop_id = 1 [json_name = "shopId"];</code>
* @param string $var
* @return $this
*/
public function setShopId($var)
{
GPBUtil::checkString($var, True);
$this->shop_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_name = 2 [json_name = "shopName"];</code>
* @return string
*/
public function getShopName()
{
return $this->shop_name;
}
/**
* Generated from protobuf field <code>string shop_name = 2 [json_name = "shopName"];</code>
* @param string $var
* @return $this
*/
public function setShopName($var)
{
GPBUtil::checkString($var, True);
$this->shop_name = $var;
return $this;
}
/**
* Generated from protobuf field <code>.shop.v1.ShopType shop_type = 3 [json_name = "shopType"];</code>
* @return int
*/
public function getShopType()
{
return $this->shop_type;
}
/**
* Generated from protobuf field <code>.shop.v1.ShopType shop_type = 3 [json_name = "shopType"];</code>
* @param int $var
* @return $this
*/
public function setShopType($var)
{
GPBUtil::checkEnum($var, \Shop\V1\ShopType::class);
$this->shop_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_url_www = 4 [json_name = "shopUrlWww"];</code>
* @return string
*/
public function getShopUrlWww()
{
return $this->shop_url_www;
}
/**
* Generated from protobuf field <code>string shop_url_www = 4 [json_name = "shopUrlWww"];</code>
* @param string $var
* @return $this
*/
public function setShopUrlWww($var)
{
GPBUtil::checkString($var, True);
$this->shop_url_www = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_url_logo = 5 [json_name = "shopUrlLogo"];</code>
* @return string
*/
public function getShopUrlLogo()
{
return $this->shop_url_logo;
}
/**
* Generated from protobuf field <code>string shop_url_logo = 5 [json_name = "shopUrlLogo"];</code>
* @param string $var
* @return $this
*/
public function setShopUrlLogo($var)
{
GPBUtil::checkString($var, True);
$this->shop_url_logo = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_url_api = 6 [json_name = "shopUrlApi"];</code>
* @return string
*/
public function getShopUrlApi()
{
return $this->shop_url_api;
}
/**
* Generated from protobuf field <code>string shop_url_api = 6 [json_name = "shopUrlApi"];</code>
* @param string $var
* @return $this
*/
public function setShopUrlApi($var)
{
GPBUtil::checkString($var, True);
$this->shop_url_api = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_currency = 7 [json_name = "shopCurrency"];</code>
* @return string
*/
public function getShopCurrency()
{
return $this->shop_currency;
}
/**
* Generated from protobuf field <code>string shop_currency = 7 [json_name = "shopCurrency"];</code>
* @param string $var
* @return $this
*/
public function setShopCurrency($var)
{
GPBUtil::checkString($var, True);
$this->shop_currency = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_prefix_order = 8 [json_name = "shopPrefixOrder"];</code>
* @return string
*/
public function getShopPrefixOrder()
{
return $this->shop_prefix_order;
}
/**
* Generated from protobuf field <code>string shop_prefix_order = 8 [json_name = "shopPrefixOrder"];</code>
* @param string $var
* @return $this
*/
public function setShopPrefixOrder($var)
{
GPBUtil::checkString($var, True);
$this->shop_prefix_order = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_prefix_invoice = 9 [json_name = "shopPrefixInvoice"];</code>
* @return string
*/
public function getShopPrefixInvoice()
{
return $this->shop_prefix_invoice;
}
/**
* Generated from protobuf field <code>string shop_prefix_invoice = 9 [json_name = "shopPrefixInvoice"];</code>
* @param string $var
* @return $this
*/
public function setShopPrefixInvoice($var)
{
GPBUtil::checkString($var, True);
$this->shop_prefix_invoice = $var;
return $this;
}
/**
* Generated from protobuf field <code>string shop_prefix_offer = 10 [json_name = "shopPrefixOffer"];</code>
* @return string
*/
public function getShopPrefixOffer()
{
return $this->shop_prefix_offer;
}
/**
* Generated from protobuf field <code>string shop_prefix_offer = 10 [json_name = "shopPrefixOffer"];</code>
* @param string $var
* @return $this
*/
public function setShopPrefixOffer($var)
{
GPBUtil::checkString($var, True);
$this->shop_prefix_offer = $var;
return $this;
}
}
+56
View File
@@ -0,0 +1,56 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: shop/v1/shop.proto
namespace Shop\V1;
use UnexpectedValueException;
/**
* PaymentProvider represents the supported set
* of payment providers.
*
* Protobuf type <code>shop.v1.ShopType</code>
*/
class ShopType
{
/**
* Generated from protobuf enum <code>SHOP_TYPE_UNSPECIFIED = 0;</code>
*/
const SHOP_TYPE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum <code>SHOP_TYPE_DIGITAL = 1;</code>
*/
const SHOP_TYPE_DIGITAL = 1;
/**
* Generated from protobuf enum <code>SHOP_TYPE_RETAIL = 2;</code>
*/
const SHOP_TYPE_RETAIL = 2;
private static $valueToName = [
self::SHOP_TYPE_UNSPECIFIED => 'SHOP_TYPE_UNSPECIFIED',
self::SHOP_TYPE_DIGITAL => 'SHOP_TYPE_DIGITAL',
self::SHOP_TYPE_RETAIL => 'SHOP_TYPE_RETAIL',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}