from grpclib.client import Channel

from dentity.proto.sdk.options.v1 import DentityOptions
from dentity.proto.services.connect.v1 import *
from dentity.service_base import ServiceBase


class ConnectService(ServiceBase):
    """Wrapper for the [Credentials Service](/reference/services/Credentials-service/)"""

    def __init__(
        self,
        *,
        server_config: DentityOptions | Channel = None,
    ):
        """
        Initialize a connection to the server.
        Args:
            server_config: The URL of the server, or a channel which encapsulates the connection already.
        """
        super().__init__(server_config)
        # self.client = ConnectStub(super().channel)

    # BEGIN Code generated by protoc-gen-trinsic. DO NOT EDIT.
    # target: /home/runner/work/sdk/sdk/python/dentity/connect_service.py

    # @deprecation.deprecated(details="This method is deprecated")
    # async def create_session(
    #     self, *, request: CreateSessionRequest
    # ) -> CreateSessionResponse:
    #     """
    #     This method is deprecated
    #       Create an IDVSession
    #     """

    #     return await self.client.create_session(
    #         request, metadata=self.build_metadata(request)
    #     )

    # @deprecation.deprecated(details="This method is deprecated")
    # async def cancel_session(
    #     self, *, request: CancelSessionRequest
    # ) -> CancelSessionResponse:
    #     """
    #     This method is deprecated
    #       Cancel an IDVSession
    #     """

    #     return await self.client.cancel_session(
    #         request, metadata=self.build_metadata(request)
    #     )

    # @deprecation.deprecated(details="This method is deprecated")
    # async def get_session(self, *, request: GetSessionRequest) -> GetSessionResponse:
    #     """
    #     This method is deprecated
    #       Get an IDVSession
    #     """

    #     return await self.client.get_session(
    #         request, metadata=self.build_metadata(request)
    #     )

    # @deprecation.deprecated(details="This method is deprecated")
    # async def list_sessions(
    #     self, *, request: ListSessionsRequest
    # ) -> ListSessionsResponse:
    #     """
    #     This method is deprecated
    #       List IDVSessions created by the calling wallet
    #     """

    #     return await self.client.list_sessions(
    #         request, metadata=self.build_metadata(request)
    #     )

    # @deprecation.deprecated(details="This method is deprecated")
    # async def has_valid_credential(
    #     self, *, request: HasValidCredentialRequest
    # ) -> HasValidCredentialResponse:
    #     """
    #     This method is deprecated
    #       Checks if the identity provided in the request has a wallet containing a valid reusable credential
    #     """

    #     return await self.client.has_valid_credential(
    #         request, metadata=self.build_metadata(request)
    #     )


# END Code generated by protoc-gen-trinsic. DO NOT EDIT.
