from __future__ import annotations

from collections.abc import Mapping
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator

from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..types import UNSET, Unset







T = TypeVar("T", bound="WorkspaceOpenRequest")



@_attrs_define
class WorkspaceOpenRequest:
    """ Request to open a workspace and get a workspace-scoped JWT.

        Attributes:
            workspace_key (str):
     """

    workspace_key: str





    def to_dict(self) -> dict[str, Any]:
        workspace_key = self.workspace_key


        field_dict: dict[str, Any] = {}

        field_dict.update({
            "workspace_key": workspace_key,
        })

        return field_dict



    @classmethod
    def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
        d = dict(src_dict)
        workspace_key = d.pop("workspace_key")

        workspace_open_request = cls(
            workspace_key=workspace_key,
        )

        return workspace_open_request

