| 1 |
// Copyright 2025 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// - protoc-gen-go-grpc v1.3.0 |
| 18 |
// - protoc v4.25.7 |
| 19 |
// source: google/shopping/merchant/datasources/v1beta/fileuploads.proto |
| 20 |
|
| 21 |
package datasourcespb |
| 22 |
|
| 23 |
import ( |
| 24 |
context "context" |
| 25 |
grpc "google.golang.org/grpc" |
| 26 |
codes "google.golang.org/grpc/codes" |
| 27 |
status "google.golang.org/grpc/status" |
| 28 |
) |
| 29 |
|
| 30 |
// This is a compile-time assertion to ensure that this generated file |
| 31 |
// is compatible with the grpc package it is being compiled against. |
| 32 |
// Requires gRPC-Go v1.32.0 or later. |
| 33 |
const _ = grpc.SupportPackageIsVersion7 |
| 34 |
|
| 35 |
const ( |
| 36 |
FileUploadsService_GetFileUpload_FullMethodName = "/google.shopping.merchant.datasources.v1beta.FileUploadsService/GetFileUpload" |
| 37 |
) |
| 38 |
|
| 39 |
// FileUploadsServiceClient is the client API for FileUploadsService service. |
| 40 |
// |
| 41 |
// 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. |
| 42 |
type FileUploadsServiceClient interface { |
| 43 |
// Gets the latest data source file upload. Only the `latest` alias is |
| 44 |
// accepted for a file upload. |
| 45 |
GetFileUpload(ctx context.Context, in *GetFileUploadRequest, opts ...grpc.CallOption) (*FileUpload, error) |
| 46 |
} |
| 47 |
|
| 48 |
type fileUploadsServiceClient struct { |
| 49 |
cc grpc.ClientConnInterface |
| 50 |
} |
| 51 |
|
| 52 |
func NewFileUploadsServiceClient(cc grpc.ClientConnInterface) FileUploadsServiceClient { |
| 53 |
return &fileUploadsServiceClient{cc} |
| 54 |
} |
| 55 |
|
| 56 |
func (c *fileUploadsServiceClient) GetFileUpload(ctx context.Context, in *GetFileUploadRequest, opts ...grpc.CallOption) (*FileUpload, error) { |
| 57 |
out := new(FileUpload) |
| 58 |
err := c.cc.Invoke(ctx, FileUploadsService_GetFileUpload_FullMethodName, in, out, opts...) |
| 59 |
if err != nil { |
| 60 |
return nil, err |
| 61 |
} |
| 62 |
return out, nil |
| 63 |
} |
| 64 |
|
| 65 |
// FileUploadsServiceServer is the server API for FileUploadsService service. |
| 66 |
// All implementations should embed UnimplementedFileUploadsServiceServer |
| 67 |
// for forward compatibility |
| 68 |
type FileUploadsServiceServer interface { |
| 69 |
// Gets the latest data source file upload. Only the `latest` alias is |
| 70 |
// accepted for a file upload. |
| 71 |
GetFileUpload(context.Context, *GetFileUploadRequest) (*FileUpload, error) |
| 72 |
} |
| 73 |
|
| 74 |
// UnimplementedFileUploadsServiceServer should be embedded to have forward compatible implementations. |
| 75 |
type UnimplementedFileUploadsServiceServer struct { |
| 76 |
} |
| 77 |
|
| 78 |
func (UnimplementedFileUploadsServiceServer) GetFileUpload(context.Context, *GetFileUploadRequest) (*FileUpload, error) { |
| 79 |
return nil, status.Errorf(codes.Unimplemented, "method GetFileUpload not implemented") |
| 80 |
} |
| 81 |
|
| 82 |
// UnsafeFileUploadsServiceServer may be embedded to opt out of forward compatibility for this service. |
| 83 |
// Use of this interface is not recommended, as added methods to FileUploadsServiceServer will |
| 84 |
// result in compilation errors. |
| 85 |
type UnsafeFileUploadsServiceServer interface { |
| 86 |
mustEmbedUnimplementedFileUploadsServiceServer() |
| 87 |
} |
| 88 |
|
| 89 |
func RegisterFileUploadsServiceServer(s grpc.ServiceRegistrar, srv FileUploadsServiceServer) { |
| 90 |
s.RegisterService(&FileUploadsService_ServiceDesc, srv) |
| 91 |
} |
| 92 |
|
| 93 |
func _FileUploadsService_GetFileUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 94 |
in := new(GetFileUploadRequest) |
| 95 |
if err := dec(in); err != nil { |
| 96 |
return nil, err |
| 97 |
} |
| 98 |
if interceptor == nil { |
| 99 |
return srv.(FileUploadsServiceServer).GetFileUpload(ctx, in) |
| 100 |
} |
| 101 |
info := &grpc.UnaryServerInfo{ |
| 102 |
Server: srv, |
| 103 |
FullMethod: FileUploadsService_GetFileUpload_FullMethodName, |
| 104 |
} |
| 105 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 106 |
return srv.(FileUploadsServiceServer).GetFileUpload(ctx, req.(*GetFileUploadRequest)) |
| 107 |
} |
| 108 |
return interceptor(ctx, in, info, handler) |
| 109 |
} |
| 110 |
|
| 111 |
// FileUploadsService_ServiceDesc is the grpc.ServiceDesc for FileUploadsService service. |
| 112 |
// It's only intended for direct use with grpc.RegisterService, |
| 113 |
// and not to be introspected or modified (even as a copy) |
| 114 |
var FileUploadsService_ServiceDesc = grpc.ServiceDesc{ |
| 115 |
ServiceName: "google.shopping.merchant.datasources.v1beta.FileUploadsService", |
| 116 |
HandlerType: (*FileUploadsServiceServer)(nil), |
| 117 |
Methods: []grpc.MethodDesc{ |
| 118 |
{ |
| 119 |
MethodName: "GetFileUpload", |
| 120 |
Handler: _FileUploadsService_GetFileUpload_Handler, |
| 121 |
}, |
| 122 |
}, |
| 123 |
Streams: []grpc.StreamDesc{}, |
| 124 |
Metadata: "google/shopping/merchant/datasources/v1beta/fileuploads.proto", |
| 125 |
} |