// 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/cloud/discoveryengine/v1alpha/data_store_service.proto

package discoveryenginepb

import (
	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	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

const (
	DataStoreService_CreateDataStore_FullMethodName                = "/google.cloud.discoveryengine.v1alpha.DataStoreService/CreateDataStore"
	DataStoreService_GetDataStore_FullMethodName                   = "/google.cloud.discoveryengine.v1alpha.DataStoreService/GetDataStore"
	DataStoreService_ListDataStores_FullMethodName                 = "/google.cloud.discoveryengine.v1alpha.DataStoreService/ListDataStores"
	DataStoreService_DeleteDataStore_FullMethodName                = "/google.cloud.discoveryengine.v1alpha.DataStoreService/DeleteDataStore"
	DataStoreService_UpdateDataStore_FullMethodName                = "/google.cloud.discoveryengine.v1alpha.DataStoreService/UpdateDataStore"
	DataStoreService_GetDocumentProcessingConfig_FullMethodName    = "/google.cloud.discoveryengine.v1alpha.DataStoreService/GetDocumentProcessingConfig"
	DataStoreService_UpdateDocumentProcessingConfig_FullMethodName = "/google.cloud.discoveryengine.v1alpha.DataStoreService/UpdateDocumentProcessingConfig"
)

// DataStoreServiceClient is the client API for DataStoreService 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 DataStoreServiceClient interface {
	// Creates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
	//
	// DataStore is for storing
	// [Documents][google.cloud.discoveryengine.v1alpha.Document]. To serve these
	// documents for Search, or Recommendation use case, an
	// [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created
	// separately.
	CreateDataStore(ctx context.Context, in *CreateDataStoreRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Gets a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
	GetDataStore(ctx context.Context, in *GetDataStoreRequest, opts ...grpc.CallOption) (*DataStore, error)
	// Lists all the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s
	// associated with the project.
	ListDataStores(ctx context.Context, in *ListDataStoresRequest, opts ...grpc.CallOption) (*ListDataStoresResponse, error)
	// Deletes a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
	DeleteDataStore(ctx context.Context, in *DeleteDataStoreRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Updates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]
	UpdateDataStore(ctx context.Context, in *UpdateDataStoreRequest, opts ...grpc.CallOption) (*DataStore, error)
	// Gets a
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
	GetDocumentProcessingConfig(ctx context.Context, in *GetDocumentProcessingConfigRequest, opts ...grpc.CallOption) (*DocumentProcessingConfig, error)
	// Updates the
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]
	// is a singleon resource of
	// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. It's empty
	// when [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is
	// created. The first call to this method will set up
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
	UpdateDocumentProcessingConfig(ctx context.Context, in *UpdateDocumentProcessingConfigRequest, opts ...grpc.CallOption) (*DocumentProcessingConfig, error)
}

type dataStoreServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDataStoreServiceClient(cc grpc.ClientConnInterface) DataStoreServiceClient {
	return &dataStoreServiceClient{cc}
}

func (c *dataStoreServiceClient) CreateDataStore(ctx context.Context, in *CreateDataStoreRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, DataStoreService_CreateDataStore_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataStoreServiceClient) GetDataStore(ctx context.Context, in *GetDataStoreRequest, opts ...grpc.CallOption) (*DataStore, error) {
	out := new(DataStore)
	err := c.cc.Invoke(ctx, DataStoreService_GetDataStore_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataStoreServiceClient) ListDataStores(ctx context.Context, in *ListDataStoresRequest, opts ...grpc.CallOption) (*ListDataStoresResponse, error) {
	out := new(ListDataStoresResponse)
	err := c.cc.Invoke(ctx, DataStoreService_ListDataStores_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataStoreServiceClient) DeleteDataStore(ctx context.Context, in *DeleteDataStoreRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, DataStoreService_DeleteDataStore_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataStoreServiceClient) UpdateDataStore(ctx context.Context, in *UpdateDataStoreRequest, opts ...grpc.CallOption) (*DataStore, error) {
	out := new(DataStore)
	err := c.cc.Invoke(ctx, DataStoreService_UpdateDataStore_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataStoreServiceClient) GetDocumentProcessingConfig(ctx context.Context, in *GetDocumentProcessingConfigRequest, opts ...grpc.CallOption) (*DocumentProcessingConfig, error) {
	out := new(DocumentProcessingConfig)
	err := c.cc.Invoke(ctx, DataStoreService_GetDocumentProcessingConfig_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataStoreServiceClient) UpdateDocumentProcessingConfig(ctx context.Context, in *UpdateDocumentProcessingConfigRequest, opts ...grpc.CallOption) (*DocumentProcessingConfig, error) {
	out := new(DocumentProcessingConfig)
	err := c.cc.Invoke(ctx, DataStoreService_UpdateDocumentProcessingConfig_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DataStoreServiceServer is the server API for DataStoreService service.
// All implementations should embed UnimplementedDataStoreServiceServer
// for forward compatibility
type DataStoreServiceServer interface {
	// Creates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
	//
	// DataStore is for storing
	// [Documents][google.cloud.discoveryengine.v1alpha.Document]. To serve these
	// documents for Search, or Recommendation use case, an
	// [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created
	// separately.
	CreateDataStore(context.Context, *CreateDataStoreRequest) (*longrunningpb.Operation, error)
	// Gets a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
	GetDataStore(context.Context, *GetDataStoreRequest) (*DataStore, error)
	// Lists all the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s
	// associated with the project.
	ListDataStores(context.Context, *ListDataStoresRequest) (*ListDataStoresResponse, error)
	// Deletes a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
	DeleteDataStore(context.Context, *DeleteDataStoreRequest) (*longrunningpb.Operation, error)
	// Updates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]
	UpdateDataStore(context.Context, *UpdateDataStoreRequest) (*DataStore, error)
	// Gets a
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
	GetDocumentProcessingConfig(context.Context, *GetDocumentProcessingConfigRequest) (*DocumentProcessingConfig, error)
	// Updates the
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]
	// is a singleon resource of
	// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. It's empty
	// when [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is
	// created. The first call to this method will set up
	// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
	UpdateDocumentProcessingConfig(context.Context, *UpdateDocumentProcessingConfigRequest) (*DocumentProcessingConfig, error)
}

// UnimplementedDataStoreServiceServer should be embedded to have forward compatible implementations.
type UnimplementedDataStoreServiceServer struct {
}

func (UnimplementedDataStoreServiceServer) CreateDataStore(context.Context, *CreateDataStoreRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateDataStore not implemented")
}
func (UnimplementedDataStoreServiceServer) GetDataStore(context.Context, *GetDataStoreRequest) (*DataStore, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDataStore not implemented")
}
func (UnimplementedDataStoreServiceServer) ListDataStores(context.Context, *ListDataStoresRequest) (*ListDataStoresResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListDataStores not implemented")
}
func (UnimplementedDataStoreServiceServer) DeleteDataStore(context.Context, *DeleteDataStoreRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteDataStore not implemented")
}
func (UnimplementedDataStoreServiceServer) UpdateDataStore(context.Context, *UpdateDataStoreRequest) (*DataStore, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateDataStore not implemented")
}
func (UnimplementedDataStoreServiceServer) GetDocumentProcessingConfig(context.Context, *GetDocumentProcessingConfigRequest) (*DocumentProcessingConfig, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDocumentProcessingConfig not implemented")
}
func (UnimplementedDataStoreServiceServer) UpdateDocumentProcessingConfig(context.Context, *UpdateDocumentProcessingConfigRequest) (*DocumentProcessingConfig, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateDocumentProcessingConfig not implemented")
}

// UnsafeDataStoreServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DataStoreServiceServer will
// result in compilation errors.
type UnsafeDataStoreServiceServer interface {
	mustEmbedUnimplementedDataStoreServiceServer()
}

func RegisterDataStoreServiceServer(s grpc.ServiceRegistrar, srv DataStoreServiceServer) {
	s.RegisterService(&DataStoreService_ServiceDesc, srv)
}

func _DataStoreService_CreateDataStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateDataStoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataStoreServiceServer).CreateDataStore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DataStoreService_CreateDataStore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataStoreServiceServer).CreateDataStore(ctx, req.(*CreateDataStoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DataStoreService_GetDataStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDataStoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataStoreServiceServer).GetDataStore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DataStoreService_GetDataStore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataStoreServiceServer).GetDataStore(ctx, req.(*GetDataStoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DataStoreService_ListDataStores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListDataStoresRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataStoreServiceServer).ListDataStores(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DataStoreService_ListDataStores_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataStoreServiceServer).ListDataStores(ctx, req.(*ListDataStoresRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DataStoreService_DeleteDataStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteDataStoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataStoreServiceServer).DeleteDataStore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DataStoreService_DeleteDataStore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataStoreServiceServer).DeleteDataStore(ctx, req.(*DeleteDataStoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DataStoreService_UpdateDataStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateDataStoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataStoreServiceServer).UpdateDataStore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DataStoreService_UpdateDataStore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataStoreServiceServer).UpdateDataStore(ctx, req.(*UpdateDataStoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DataStoreService_GetDocumentProcessingConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDocumentProcessingConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataStoreServiceServer).GetDocumentProcessingConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DataStoreService_GetDocumentProcessingConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataStoreServiceServer).GetDocumentProcessingConfig(ctx, req.(*GetDocumentProcessingConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DataStoreService_UpdateDocumentProcessingConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateDocumentProcessingConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataStoreServiceServer).UpdateDocumentProcessingConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DataStoreService_UpdateDocumentProcessingConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataStoreServiceServer).UpdateDocumentProcessingConfig(ctx, req.(*UpdateDocumentProcessingConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// DataStoreService_ServiceDesc is the grpc.ServiceDesc for DataStoreService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DataStoreService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.cloud.discoveryengine.v1alpha.DataStoreService",
	HandlerType: (*DataStoreServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateDataStore",
			Handler:    _DataStoreService_CreateDataStore_Handler,
		},
		{
			MethodName: "GetDataStore",
			Handler:    _DataStoreService_GetDataStore_Handler,
		},
		{
			MethodName: "ListDataStores",
			Handler:    _DataStoreService_ListDataStores_Handler,
		},
		{
			MethodName: "DeleteDataStore",
			Handler:    _DataStoreService_DeleteDataStore_Handler,
		},
		{
			MethodName: "UpdateDataStore",
			Handler:    _DataStoreService_UpdateDataStore_Handler,
		},
		{
			MethodName: "GetDocumentProcessingConfig",
			Handler:    _DataStoreService_GetDocumentProcessingConfig_Handler,
		},
		{
			MethodName: "UpdateDocumentProcessingConfig",
			Handler:    _DataStoreService_UpdateDocumentProcessingConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/cloud/discoveryengine/v1alpha/data_store_service.proto",
}
