// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/shopping/merchant/datasources/v1beta/datasources.proto package datasourcespb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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 const ( DataSourcesService_GetDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/GetDataSource" DataSourcesService_ListDataSources_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/ListDataSources" DataSourcesService_CreateDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/CreateDataSource" DataSourcesService_UpdateDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/UpdateDataSource" DataSourcesService_DeleteDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/DeleteDataSource" DataSourcesService_FetchDataSource_FullMethodName = "/google.shopping.merchant.datasources.v1beta.DataSourcesService/FetchDataSource" ) // DataSourcesServiceClient is the client API for DataSourcesService 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 DataSourcesServiceClient interface { // Retrieves the data source configuration for the given account. GetDataSource(ctx context.Context, in *GetDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) // Lists the configurations for data sources for the given account. ListDataSources(ctx context.Context, in *ListDataSourcesRequest, opts ...grpc.CallOption) (*ListDataSourcesResponse, error) // Creates the new data source configuration for the given account. CreateDataSource(ctx context.Context, in *CreateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) // Updates the existing data source configuration. The fields that are // set in the update mask but not provided in the resource will be deleted. UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) // Deletes a data source from your Merchant Center account. DeleteDataSource(ctx context.Context, in *DeleteDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Performs the data fetch immediately (even outside fetch schedule) on a // data source from your Merchant Center Account. If you need to call // this method more than once per day, you should use the Products service to // update your product data instead. // This method only works on data sources with a file input set. FetchDataSource(ctx context.Context, in *FetchDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type dataSourcesServiceClient struct { cc grpc.ClientConnInterface } func NewDataSourcesServiceClient(cc grpc.ClientConnInterface) DataSourcesServiceClient { return &dataSourcesServiceClient{cc} } func (c *dataSourcesServiceClient) GetDataSource(ctx context.Context, in *GetDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) { out := new(DataSource) err := c.cc.Invoke(ctx, DataSourcesService_GetDataSource_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dataSourcesServiceClient) ListDataSources(ctx context.Context, in *ListDataSourcesRequest, opts ...grpc.CallOption) (*ListDataSourcesResponse, error) { out := new(ListDataSourcesResponse) err := c.cc.Invoke(ctx, DataSourcesService_ListDataSources_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dataSourcesServiceClient) CreateDataSource(ctx context.Context, in *CreateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) { out := new(DataSource) err := c.cc.Invoke(ctx, DataSourcesService_CreateDataSource_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dataSourcesServiceClient) UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*DataSource, error) { out := new(DataSource) err := c.cc.Invoke(ctx, DataSourcesService_UpdateDataSource_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dataSourcesServiceClient) DeleteDataSource(ctx context.Context, in *DeleteDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, DataSourcesService_DeleteDataSource_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dataSourcesServiceClient) FetchDataSource(ctx context.Context, in *FetchDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, DataSourcesService_FetchDataSource_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // DataSourcesServiceServer is the server API for DataSourcesService service. // All implementations should embed UnimplementedDataSourcesServiceServer // for forward compatibility type DataSourcesServiceServer interface { // Retrieves the data source configuration for the given account. GetDataSource(context.Context, *GetDataSourceRequest) (*DataSource, error) // Lists the configurations for data sources for the given account. ListDataSources(context.Context, *ListDataSourcesRequest) (*ListDataSourcesResponse, error) // Creates the new data source configuration for the given account. CreateDataSource(context.Context, *CreateDataSourceRequest) (*DataSource, error) // Updates the existing data source configuration. The fields that are // set in the update mask but not provided in the resource will be deleted. UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*DataSource, error) // Deletes a data source from your Merchant Center account. DeleteDataSource(context.Context, *DeleteDataSourceRequest) (*emptypb.Empty, error) // Performs the data fetch immediately (even outside fetch schedule) on a // data source from your Merchant Center Account. If you need to call // this method more than once per day, you should use the Products service to // update your product data instead. // This method only works on data sources with a file input set. FetchDataSource(context.Context, *FetchDataSourceRequest) (*emptypb.Empty, error) } // UnimplementedDataSourcesServiceServer should be embedded to have forward compatible implementations. type UnimplementedDataSourcesServiceServer struct { } func (UnimplementedDataSourcesServiceServer) GetDataSource(context.Context, *GetDataSourceRequest) (*DataSource, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDataSource not implemented") } func (UnimplementedDataSourcesServiceServer) ListDataSources(context.Context, *ListDataSourcesRequest) (*ListDataSourcesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDataSources not implemented") } func (UnimplementedDataSourcesServiceServer) CreateDataSource(context.Context, *CreateDataSourceRequest) (*DataSource, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDataSource not implemented") } func (UnimplementedDataSourcesServiceServer) UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*DataSource, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateDataSource not implemented") } func (UnimplementedDataSourcesServiceServer) DeleteDataSource(context.Context, *DeleteDataSourceRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteDataSource not implemented") } func (UnimplementedDataSourcesServiceServer) FetchDataSource(context.Context, *FetchDataSourceRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method FetchDataSource not implemented") } // UnsafeDataSourcesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DataSourcesServiceServer will // result in compilation errors. type UnsafeDataSourcesServiceServer interface { mustEmbedUnimplementedDataSourcesServiceServer() } func RegisterDataSourcesServiceServer(s grpc.ServiceRegistrar, srv DataSourcesServiceServer) { s.RegisterService(&DataSourcesService_ServiceDesc, srv) } func _DataSourcesService_GetDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetDataSourceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DataSourcesServiceServer).GetDataSource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DataSourcesService_GetDataSource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DataSourcesServiceServer).GetDataSource(ctx, req.(*GetDataSourceRequest)) } return interceptor(ctx, in, info, handler) } func _DataSourcesService_ListDataSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListDataSourcesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DataSourcesServiceServer).ListDataSources(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DataSourcesService_ListDataSources_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DataSourcesServiceServer).ListDataSources(ctx, req.(*ListDataSourcesRequest)) } return interceptor(ctx, in, info, handler) } func _DataSourcesService_CreateDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateDataSourceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DataSourcesServiceServer).CreateDataSource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DataSourcesService_CreateDataSource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DataSourcesServiceServer).CreateDataSource(ctx, req.(*CreateDataSourceRequest)) } return interceptor(ctx, in, info, handler) } func _DataSourcesService_UpdateDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateDataSourceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DataSourcesServiceServer).UpdateDataSource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DataSourcesService_UpdateDataSource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DataSourcesServiceServer).UpdateDataSource(ctx, req.(*UpdateDataSourceRequest)) } return interceptor(ctx, in, info, handler) } func _DataSourcesService_DeleteDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteDataSourceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DataSourcesServiceServer).DeleteDataSource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DataSourcesService_DeleteDataSource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DataSourcesServiceServer).DeleteDataSource(ctx, req.(*DeleteDataSourceRequest)) } return interceptor(ctx, in, info, handler) } func _DataSourcesService_FetchDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FetchDataSourceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DataSourcesServiceServer).FetchDataSource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DataSourcesService_FetchDataSource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DataSourcesServiceServer).FetchDataSource(ctx, req.(*FetchDataSourceRequest)) } return interceptor(ctx, in, info, handler) } // DataSourcesService_ServiceDesc is the grpc.ServiceDesc for DataSourcesService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var DataSourcesService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.shopping.merchant.datasources.v1beta.DataSourcesService", HandlerType: (*DataSourcesServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetDataSource", Handler: _DataSourcesService_GetDataSource_Handler, }, { MethodName: "ListDataSources", Handler: _DataSourcesService_ListDataSources_Handler, }, { MethodName: "CreateDataSource", Handler: _DataSourcesService_CreateDataSource_Handler, }, { MethodName: "UpdateDataSource", Handler: _DataSourcesService_UpdateDataSource_Handler, }, { MethodName: "DeleteDataSource", Handler: _DataSourcesService_DeleteDataSource_Handler, }, { MethodName: "FetchDataSource", Handler: _DataSourcesService_FetchDataSource_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/shopping/merchant/datasources/v1beta/datasources.proto", }