// 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/completion_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 (
	CompletionService_CompleteQuery_FullMethodName                   = "/google.cloud.discoveryengine.v1alpha.CompletionService/CompleteQuery"
	CompletionService_ImportSuggestionDenyListEntries_FullMethodName = "/google.cloud.discoveryengine.v1alpha.CompletionService/ImportSuggestionDenyListEntries"
	CompletionService_PurgeSuggestionDenyListEntries_FullMethodName  = "/google.cloud.discoveryengine.v1alpha.CompletionService/PurgeSuggestionDenyListEntries"
	CompletionService_ImportCompletionSuggestions_FullMethodName     = "/google.cloud.discoveryengine.v1alpha.CompletionService/ImportCompletionSuggestions"
	CompletionService_PurgeCompletionSuggestions_FullMethodName      = "/google.cloud.discoveryengine.v1alpha.CompletionService/PurgeCompletionSuggestions"
)

// CompletionServiceClient is the client API for CompletionService 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 CompletionServiceClient interface {
	// Completes the specified user input with keyword suggestions.
	CompleteQuery(ctx context.Context, in *CompleteQueryRequest, opts ...grpc.CallOption) (*CompleteQueryResponse, error)
	// Imports all
	// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry]
	// for a DataStore.
	ImportSuggestionDenyListEntries(ctx context.Context, in *ImportSuggestionDenyListEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Permanently deletes all
	// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry]
	// for a DataStore.
	PurgeSuggestionDenyListEntries(ctx context.Context, in *PurgeSuggestionDenyListEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Imports
	// [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
	// for a DataStore.
	ImportCompletionSuggestions(ctx context.Context, in *ImportCompletionSuggestionsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Permanently deletes all
	// [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
	// for a DataStore.
	PurgeCompletionSuggestions(ctx context.Context, in *PurgeCompletionSuggestionsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
}

type completionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCompletionServiceClient(cc grpc.ClientConnInterface) CompletionServiceClient {
	return &completionServiceClient{cc}
}

func (c *completionServiceClient) CompleteQuery(ctx context.Context, in *CompleteQueryRequest, opts ...grpc.CallOption) (*CompleteQueryResponse, error) {
	out := new(CompleteQueryResponse)
	err := c.cc.Invoke(ctx, CompletionService_CompleteQuery_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *completionServiceClient) ImportSuggestionDenyListEntries(ctx context.Context, in *ImportSuggestionDenyListEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, CompletionService_ImportSuggestionDenyListEntries_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *completionServiceClient) PurgeSuggestionDenyListEntries(ctx context.Context, in *PurgeSuggestionDenyListEntriesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, CompletionService_PurgeSuggestionDenyListEntries_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *completionServiceClient) ImportCompletionSuggestions(ctx context.Context, in *ImportCompletionSuggestionsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, CompletionService_ImportCompletionSuggestions_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *completionServiceClient) PurgeCompletionSuggestions(ctx context.Context, in *PurgeCompletionSuggestionsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, CompletionService_PurgeCompletionSuggestions_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CompletionServiceServer is the server API for CompletionService service.
// All implementations should embed UnimplementedCompletionServiceServer
// for forward compatibility
type CompletionServiceServer interface {
	// Completes the specified user input with keyword suggestions.
	CompleteQuery(context.Context, *CompleteQueryRequest) (*CompleteQueryResponse, error)
	// Imports all
	// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry]
	// for a DataStore.
	ImportSuggestionDenyListEntries(context.Context, *ImportSuggestionDenyListEntriesRequest) (*longrunningpb.Operation, error)
	// Permanently deletes all
	// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry]
	// for a DataStore.
	PurgeSuggestionDenyListEntries(context.Context, *PurgeSuggestionDenyListEntriesRequest) (*longrunningpb.Operation, error)
	// Imports
	// [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
	// for a DataStore.
	ImportCompletionSuggestions(context.Context, *ImportCompletionSuggestionsRequest) (*longrunningpb.Operation, error)
	// Permanently deletes all
	// [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
	// for a DataStore.
	PurgeCompletionSuggestions(context.Context, *PurgeCompletionSuggestionsRequest) (*longrunningpb.Operation, error)
}

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

func (UnimplementedCompletionServiceServer) CompleteQuery(context.Context, *CompleteQueryRequest) (*CompleteQueryResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CompleteQuery not implemented")
}
func (UnimplementedCompletionServiceServer) ImportSuggestionDenyListEntries(context.Context, *ImportSuggestionDenyListEntriesRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ImportSuggestionDenyListEntries not implemented")
}
func (UnimplementedCompletionServiceServer) PurgeSuggestionDenyListEntries(context.Context, *PurgeSuggestionDenyListEntriesRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PurgeSuggestionDenyListEntries not implemented")
}
func (UnimplementedCompletionServiceServer) ImportCompletionSuggestions(context.Context, *ImportCompletionSuggestionsRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ImportCompletionSuggestions not implemented")
}
func (UnimplementedCompletionServiceServer) PurgeCompletionSuggestions(context.Context, *PurgeCompletionSuggestionsRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PurgeCompletionSuggestions not implemented")
}

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

func RegisterCompletionServiceServer(s grpc.ServiceRegistrar, srv CompletionServiceServer) {
	s.RegisterService(&CompletionService_ServiceDesc, srv)
}

func _CompletionService_CompleteQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CompleteQueryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CompletionServiceServer).CompleteQuery(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CompletionService_CompleteQuery_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CompletionServiceServer).CompleteQuery(ctx, req.(*CompleteQueryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CompletionService_ImportSuggestionDenyListEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ImportSuggestionDenyListEntriesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CompletionServiceServer).ImportSuggestionDenyListEntries(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CompletionService_ImportSuggestionDenyListEntries_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CompletionServiceServer).ImportSuggestionDenyListEntries(ctx, req.(*ImportSuggestionDenyListEntriesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CompletionService_PurgeSuggestionDenyListEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PurgeSuggestionDenyListEntriesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CompletionServiceServer).PurgeSuggestionDenyListEntries(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CompletionService_PurgeSuggestionDenyListEntries_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CompletionServiceServer).PurgeSuggestionDenyListEntries(ctx, req.(*PurgeSuggestionDenyListEntriesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CompletionService_ImportCompletionSuggestions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ImportCompletionSuggestionsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CompletionServiceServer).ImportCompletionSuggestions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CompletionService_ImportCompletionSuggestions_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CompletionServiceServer).ImportCompletionSuggestions(ctx, req.(*ImportCompletionSuggestionsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CompletionService_PurgeCompletionSuggestions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PurgeCompletionSuggestionsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CompletionServiceServer).PurgeCompletionSuggestions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CompletionService_PurgeCompletionSuggestions_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CompletionServiceServer).PurgeCompletionSuggestions(ctx, req.(*PurgeCompletionSuggestionsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CompletionService_ServiceDesc is the grpc.ServiceDesc for CompletionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CompletionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.cloud.discoveryengine.v1alpha.CompletionService",
	HandlerType: (*CompletionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CompleteQuery",
			Handler:    _CompletionService_CompleteQuery_Handler,
		},
		{
			MethodName: "ImportSuggestionDenyListEntries",
			Handler:    _CompletionService_ImportSuggestionDenyListEntries_Handler,
		},
		{
			MethodName: "PurgeSuggestionDenyListEntries",
			Handler:    _CompletionService_PurgeSuggestionDenyListEntries_Handler,
		},
		{
			MethodName: "ImportCompletionSuggestions",
			Handler:    _CompletionService_ImportCompletionSuggestions_Handler,
		},
		{
			MethodName: "PurgeCompletionSuggestions",
			Handler:    _CompletionService_PurgeCompletionSuggestions_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/cloud/discoveryengine/v1alpha/completion_service.proto",
}
