wallaroo.wallaroo_ml_ops_api_client.models.users_invite_json_body

 1from typing import Any, Dict, List, Type, TypeVar, Union
 2
 3import attr
 4
 5from ..types import UNSET, Unset
 6
 7T = TypeVar("T", bound="UsersInviteJsonBody")
 8
 9@attr.s(auto_attribs=True)
10class UsersInviteJsonBody:
11    """ Invitation request for a new user.
12
13    Attributes:
14        email (str):  New user's email address.
15        password (Union[Unset, None, str]):  Optional initial password to send.
16    """
17
18    email: str
19    password: Union[Unset, None, str] = UNSET
20    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
21
22
23    def to_dict(self) -> Dict[str, Any]:
24        email = self.email
25        password = self.password
26
27        field_dict: Dict[str, Any] = {}
28        field_dict.update(self.additional_properties)
29        field_dict.update({
30            "email": email,
31        })
32        if password is not UNSET:
33            field_dict["password"] = password
34
35        return field_dict
36
37
38
39    @classmethod
40    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
41        d = src_dict.copy()
42        email = d.pop("email")
43
44        password = d.pop("password", UNSET)
45
46        users_invite_json_body = cls(
47            email=email,
48            password=password,
49        )
50
51        users_invite_json_body.additional_properties = d
52        return users_invite_json_body
53
54    @property
55    def additional_keys(self) -> List[str]:
56        return list(self.additional_properties.keys())
57
58    def __getitem__(self, key: str) -> Any:
59        return self.additional_properties[key]
60
61    def __setitem__(self, key: str, value: Any) -> None:
62        self.additional_properties[key] = value
63
64    def __delitem__(self, key: str) -> None:
65        del self.additional_properties[key]
66
67    def __contains__(self, key: str) -> bool:
68        return key in self.additional_properties
@attr.s(auto_attribs=True)
class UsersInviteJsonBody:
10@attr.s(auto_attribs=True)
11class UsersInviteJsonBody:
12    """ Invitation request for a new user.
13
14    Attributes:
15        email (str):  New user's email address.
16        password (Union[Unset, None, str]):  Optional initial password to send.
17    """
18
19    email: str
20    password: Union[Unset, None, str] = UNSET
21    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
22
23
24    def to_dict(self) -> Dict[str, Any]:
25        email = self.email
26        password = self.password
27
28        field_dict: Dict[str, Any] = {}
29        field_dict.update(self.additional_properties)
30        field_dict.update({
31            "email": email,
32        })
33        if password is not UNSET:
34            field_dict["password"] = password
35
36        return field_dict
37
38
39
40    @classmethod
41    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
42        d = src_dict.copy()
43        email = d.pop("email")
44
45        password = d.pop("password", UNSET)
46
47        users_invite_json_body = cls(
48            email=email,
49            password=password,
50        )
51
52        users_invite_json_body.additional_properties = d
53        return users_invite_json_body
54
55    @property
56    def additional_keys(self) -> List[str]:
57        return list(self.additional_properties.keys())
58
59    def __getitem__(self, key: str) -> Any:
60        return self.additional_properties[key]
61
62    def __setitem__(self, key: str, value: Any) -> None:
63        self.additional_properties[key] = value
64
65    def __delitem__(self, key: str) -> None:
66        del self.additional_properties[key]
67
68    def __contains__(self, key: str) -> bool:
69        return key in self.additional_properties

Invitation request for a new user.

Attributes: email (str): New user's email address. password (Union[Unset, None, str]): Optional initial password to send.

UsersInviteJsonBody( email: str, password: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
2def __init__(self, email, password=attr_dict['password'].default):
3    self.email = email
4    self.password = password
5    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class UsersInviteJsonBody.

def to_dict(self) -> Dict[str, Any]:
24    def to_dict(self) -> Dict[str, Any]:
25        email = self.email
26        password = self.password
27
28        field_dict: Dict[str, Any] = {}
29        field_dict.update(self.additional_properties)
30        field_dict.update({
31            "email": email,
32        })
33        if password is not UNSET:
34            field_dict["password"] = password
35
36        return field_dict
@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
40    @classmethod
41    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
42        d = src_dict.copy()
43        email = d.pop("email")
44
45        password = d.pop("password", UNSET)
46
47        users_invite_json_body = cls(
48            email=email,
49            password=password,
50        )
51
52        users_invite_json_body.additional_properties = d
53        return users_invite_json_body
additional_keys: List[str]