// Copyright 2025 AGNTCY Contributors (https://github.com/agntcy)
// SPDX-License-Identifier: Apache-2.0

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: agntcy/identity/service/v1alpha1/settings_service.proto

package identity_service_sdk_go

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	SettingsService_GetSettings_FullMethodName = "/agntcy.identity.service.v1alpha1.SettingsService/GetSettings"
	SettingsService_SetApiKey_FullMethodName   = "/agntcy.identity.service.v1alpha1.SettingsService/SetApiKey"
	SettingsService_SetIssuer_FullMethodName   = "/agntcy.identity.service.v1alpha1.SettingsService/SetIssuer"
)

// SettingsServiceClient is the client API for SettingsService 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.
//
// SettingsService manages settings.
type SettingsServiceClient interface {
	// Get Settings
	GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error)
	// Set up API Key
	SetApiKey(ctx context.Context, in *SetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error)
	// Set up Issuer
	SetIssuer(ctx context.Context, in *SetIssuerRequest, opts ...grpc.CallOption) (*IssuerSettings, error)
}

type settingsServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSettingsServiceClient(cc grpc.ClientConnInterface) SettingsServiceClient {
	return &settingsServiceClient{cc}
}

func (c *settingsServiceClient) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Settings)
	err := c.cc.Invoke(ctx, SettingsService_GetSettings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *settingsServiceClient) SetApiKey(ctx context.Context, in *SetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ApiKey)
	err := c.cc.Invoke(ctx, SettingsService_SetApiKey_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *settingsServiceClient) SetIssuer(ctx context.Context, in *SetIssuerRequest, opts ...grpc.CallOption) (*IssuerSettings, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IssuerSettings)
	err := c.cc.Invoke(ctx, SettingsService_SetIssuer_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SettingsServiceServer is the server API for SettingsService service.
// All implementations should embed UnimplementedSettingsServiceServer
// for forward compatibility.
//
// SettingsService manages settings.
type SettingsServiceServer interface {
	// Get Settings
	GetSettings(context.Context, *GetSettingsRequest) (*Settings, error)
	// Set up API Key
	SetApiKey(context.Context, *SetApiKeyRequest) (*ApiKey, error)
	// Set up Issuer
	SetIssuer(context.Context, *SetIssuerRequest) (*IssuerSettings, error)
}

// UnimplementedSettingsServiceServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSettingsServiceServer struct{}

func (UnimplementedSettingsServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented")
}
func (UnimplementedSettingsServiceServer) SetApiKey(context.Context, *SetApiKeyRequest) (*ApiKey, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetApiKey not implemented")
}
func (UnimplementedSettingsServiceServer) SetIssuer(context.Context, *SetIssuerRequest) (*IssuerSettings, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetIssuer not implemented")
}
func (UnimplementedSettingsServiceServer) testEmbeddedByValue() {}

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

func RegisterSettingsServiceServer(s grpc.ServiceRegistrar, srv SettingsServiceServer) {
	// If the following call pancis, it indicates UnimplementedSettingsServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&SettingsService_ServiceDesc, srv)
}

func _SettingsService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetSettingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SettingsServiceServer).GetSettings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SettingsService_GetSettings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SettingsServiceServer).GetSettings(ctx, req.(*GetSettingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SettingsService_SetApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetApiKeyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SettingsServiceServer).SetApiKey(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SettingsService_SetApiKey_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SettingsServiceServer).SetApiKey(ctx, req.(*SetApiKeyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SettingsService_SetIssuer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetIssuerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SettingsServiceServer).SetIssuer(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SettingsService_SetIssuer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SettingsServiceServer).SetIssuer(ctx, req.(*SetIssuerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SettingsService_ServiceDesc is the grpc.ServiceDesc for SettingsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SettingsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agntcy.identity.service.v1alpha1.SettingsService",
	HandlerType: (*SettingsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSettings",
			Handler:    _SettingsService_GetSettings_Handler,
		},
		{
			MethodName: "SetApiKey",
			Handler:    _SettingsService_SetApiKey_Handler,
		},
		{
			MethodName: "SetIssuer",
			Handler:    _SettingsService_SetIssuer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "agntcy/identity/service/v1alpha1/settings_service.proto",
}
