# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: shell.proto
# plugin: python-betterproto
# This file has been @generated

from dataclasses import dataclass
from typing import (
    TYPE_CHECKING,
    Dict,
    Optional,
)

import betterproto
import grpc
from betterproto.grpcstub.grpcio_client import SyncServiceStub
from betterproto.grpcstub.grpclib_server import ServiceBase


if TYPE_CHECKING:
    import grpclib.server
    from betterproto.grpcstub.grpclib_client import MetadataLike
    from grpclib.metadata import Deadline


@dataclass(eq=False, repr=False)
class CreateStandaloneShellRequest(betterproto.Message):
    stub_id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class CreateStandaloneShellResponse(betterproto.Message):
    ok: bool = betterproto.bool_field(1)
    container_id: str = betterproto.string_field(2)
    username: str = betterproto.string_field(3)
    password: str = betterproto.string_field(4)
    err_msg: str = betterproto.string_field(5)


@dataclass(eq=False, repr=False)
class CreateShellInExistingContainerRequest(betterproto.Message):
    container_id: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class CreateShellInExistingContainerResponse(betterproto.Message):
    ok: bool = betterproto.bool_field(1)
    username: str = betterproto.string_field(2)
    password: str = betterproto.string_field(3)
    stub_id: str = betterproto.string_field(4)
    err_msg: str = betterproto.string_field(5)


class ShellServiceStub(SyncServiceStub):
    def create_standalone_shell(
        self, create_standalone_shell_request: "CreateStandaloneShellRequest"
    ) -> "CreateStandaloneShellResponse":
        return self._unary_unary(
            "/shell.ShellService/CreateStandaloneShell",
            CreateStandaloneShellRequest,
            CreateStandaloneShellResponse,
        )(create_standalone_shell_request)

    def create_shell_in_existing_container(
        self,
        create_shell_in_existing_container_request: "CreateShellInExistingContainerRequest",
    ) -> "CreateShellInExistingContainerResponse":
        return self._unary_unary(
            "/shell.ShellService/CreateShellInExistingContainer",
            CreateShellInExistingContainerRequest,
            CreateShellInExistingContainerResponse,
        )(create_shell_in_existing_container_request)
