tower 0.3.4__py3-none-linux_armv6l.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. tower/__init__.py +4 -0
  2. tower/__main__.py +38 -0
  3. tower/client.py +115 -0
  4. tower/tower_api_client/__init__.py +7 -0
  5. tower/tower_api_client/api/__init__.py +1 -0
  6. tower/tower_api_client/api/default/__init__.py +0 -0
  7. tower/tower_api_client/api/default/accept_invitation.py +150 -0
  8. tower/tower_api_client/api/default/cancel_run.py +159 -0
  9. tower/tower_api_client/api/default/claim_device_login_ticket.py +154 -0
  10. tower/tower_api_client/api/default/create_account.py +150 -0
  11. tower/tower_api_client/api/default/create_api_key.py +142 -0
  12. tower/tower_api_client/api/default/create_apps.py +150 -0
  13. tower/tower_api_client/api/default/create_device_login_ticket.py +131 -0
  14. tower/tower_api_client/api/default/create_secret.py +150 -0
  15. tower/tower_api_client/api/default/create_session.py +150 -0
  16. tower/tower_api_client/api/default/create_team.py +150 -0
  17. tower/tower_api_client/api/default/delete_api_key.py +142 -0
  18. tower/tower_api_client/api/default/delete_app.py +146 -0
  19. tower/tower_api_client/api/default/delete_secret.py +104 -0
  20. tower/tower_api_client/api/default/delete_team.py +150 -0
  21. tower/tower_api_client/api/default/delete_team_invitation.py +167 -0
  22. tower/tower_api_client/api/default/deploy_app.py +166 -0
  23. tower/tower_api_client/api/default/describe_app.py +165 -0
  24. tower/tower_api_client/api/default/describe_app_version.py +163 -0
  25. tower/tower_api_client/api/default/describe_device_login_session.py +154 -0
  26. tower/tower_api_client/api/default/describe_run.py +172 -0
  27. tower/tower_api_client/api/default/describe_secrets_key.py +160 -0
  28. tower/tower_api_client/api/default/describe_session.py +125 -0
  29. tower/tower_api_client/api/default/export_secrets.py +218 -0
  30. tower/tower_api_client/api/default/generate_app_statistics.py +129 -0
  31. tower/tower_api_client/api/default/generate_run_statistics.py +160 -0
  32. tower/tower_api_client/api/default/get_app_run_logs.py +159 -0
  33. tower/tower_api_client/api/default/invite_team_member.py +163 -0
  34. tower/tower_api_client/api/default/leave_team.py +150 -0
  35. tower/tower_api_client/api/default/list_api_keys.py +125 -0
  36. tower/tower_api_client/api/default/list_app_environments.py +150 -0
  37. tower/tower_api_client/api/default/list_app_versions.py +146 -0
  38. tower/tower_api_client/api/default/list_apps.py +247 -0
  39. tower/tower_api_client/api/default/list_my_team_invitations.py +129 -0
  40. tower/tower_api_client/api/default/list_runs.py +184 -0
  41. tower/tower_api_client/api/default/list_secret_environments.py +129 -0
  42. tower/tower_api_client/api/default/list_secrets.py +201 -0
  43. tower/tower_api_client/api/default/list_team_invitations.py +150 -0
  44. tower/tower_api_client/api/default/list_team_members.py +146 -0
  45. tower/tower_api_client/api/default/list_teams.py +125 -0
  46. tower/tower_api_client/api/default/refresh_session.py +129 -0
  47. tower/tower_api_client/api/default/remove_team_member.py +163 -0
  48. tower/tower_api_client/api/default/resend_team_invitation.py +167 -0
  49. tower/tower_api_client/api/default/run_app.py +176 -0
  50. tower/tower_api_client/api/default/stream_app_run_logs.py +100 -0
  51. tower/tower_api_client/api/default/update_account_slug.py +163 -0
  52. tower/tower_api_client/api/default/update_my_team_invitation.py +154 -0
  53. tower/tower_api_client/api/default/update_team.py +167 -0
  54. tower/tower_api_client/api/default/update_user.py +150 -0
  55. tower/tower_api_client/client.py +51 -0
  56. tower/tower_api_client/models/__init__.py +193 -0
  57. tower/tower_api_client/models/accept_invitation_params.py +49 -0
  58. tower/tower_api_client/models/accept_invitation_response.py +56 -0
  59. tower/tower_api_client/models/account.py +45 -0
  60. tower/tower_api_client/models/api_key.py +67 -0
  61. tower/tower_api_client/models/app.py +122 -0
  62. tower/tower_api_client/models/app_statistics.py +66 -0
  63. tower/tower_api_client/models/app_summary.py +81 -0
  64. tower/tower_api_client/models/app_version.py +71 -0
  65. tower/tower_api_client/models/cancel_run_response.py +56 -0
  66. tower/tower_api_client/models/claim_device_login_ticket_params.py +49 -0
  67. tower/tower_api_client/models/claim_device_login_ticket_response.py +49 -0
  68. tower/tower_api_client/models/create_account_params.py +91 -0
  69. tower/tower_api_client/models/create_account_params_flags_struct.py +38 -0
  70. tower/tower_api_client/models/create_account_response.py +56 -0
  71. tower/tower_api_client/models/create_api_key_params.py +49 -0
  72. tower/tower_api_client/models/create_api_key_response.py +56 -0
  73. tower/tower_api_client/models/create_app_params.py +57 -0
  74. tower/tower_api_client/models/create_app_response.py +56 -0
  75. tower/tower_api_client/models/create_device_login_ticket_response.py +94 -0
  76. tower/tower_api_client/models/create_secret_params.py +70 -0
  77. tower/tower_api_client/models/create_secret_response.py +56 -0
  78. tower/tower_api_client/models/create_session_params.py +56 -0
  79. tower/tower_api_client/models/create_session_response.py +56 -0
  80. tower/tower_api_client/models/create_team_params.py +56 -0
  81. tower/tower_api_client/models/create_team_response.py +56 -0
  82. tower/tower_api_client/models/delete_api_key_params.py +49 -0
  83. tower/tower_api_client/models/delete_api_key_response.py +56 -0
  84. tower/tower_api_client/models/delete_app_response.py +56 -0
  85. tower/tower_api_client/models/delete_team_invitation_params.py +49 -0
  86. tower/tower_api_client/models/delete_team_invitation_response.py +56 -0
  87. tower/tower_api_client/models/delete_team_params.py +49 -0
  88. tower/tower_api_client/models/delete_team_response.py +56 -0
  89. tower/tower_api_client/models/deploy_app_response.py +56 -0
  90. tower/tower_api_client/models/describe_app_response.py +75 -0
  91. tower/tower_api_client/models/describe_app_version_response.py +56 -0
  92. tower/tower_api_client/models/describe_device_login_session_response.py +56 -0
  93. tower/tower_api_client/models/describe_run_response.py +56 -0
  94. tower/tower_api_client/models/describe_secrets_key_response.py +49 -0
  95. tower/tower_api_client/models/describe_session_response.py +56 -0
  96. tower/tower_api_client/models/error_detail.py +54 -0
  97. tower/tower_api_client/models/error_model.py +109 -0
  98. tower/tower_api_client/models/export_secrets_response.py +75 -0
  99. tower/tower_api_client/models/export_user_secrets_params.py +49 -0
  100. tower/tower_api_client/models/exported_secret.py +62 -0
  101. tower/tower_api_client/models/generate_app_statistics_response.py +56 -0
  102. tower/tower_api_client/models/generate_run_statistics_response.py +85 -0
  103. tower/tower_api_client/models/get_run_log_line.py +47 -0
  104. tower/tower_api_client/models/get_run_logs_output_body.py +65 -0
  105. tower/tower_api_client/models/invite_team_member_params.py +58 -0
  106. tower/tower_api_client/models/invite_team_member_response.py +65 -0
  107. tower/tower_api_client/models/leave_team_response.py +56 -0
  108. tower/tower_api_client/models/list_api_keys_response.py +65 -0
  109. tower/tower_api_client/models/list_app_environments_response.py +50 -0
  110. tower/tower_api_client/models/list_app_versions_response.py +65 -0
  111. tower/tower_api_client/models/list_apps_response.py +75 -0
  112. tower/tower_api_client/models/list_apps_status_item.py +11 -0
  113. tower/tower_api_client/models/list_my_team_invitations_response.py +65 -0
  114. tower/tower_api_client/models/list_runs_response.py +75 -0
  115. tower/tower_api_client/models/list_secret_environments_response.py +50 -0
  116. tower/tower_api_client/models/list_secrets_response.py +75 -0
  117. tower/tower_api_client/models/list_team_invitations_response.py +65 -0
  118. tower/tower_api_client/models/list_team_members_response.py +65 -0
  119. tower/tower_api_client/models/list_teams_response.py +65 -0
  120. tower/tower_api_client/models/log_line.py +62 -0
  121. tower/tower_api_client/models/log_line_error.py +47 -0
  122. tower/tower_api_client/models/pagination.py +59 -0
  123. tower/tower_api_client/models/parameter.py +52 -0
  124. tower/tower_api_client/models/refresh_session_response.py +66 -0
  125. tower/tower_api_client/models/remove_team_member_params.py +49 -0
  126. tower/tower_api_client/models/remove_team_member_response.py +56 -0
  127. tower/tower_api_client/models/resend_team_invitation_params.py +57 -0
  128. tower/tower_api_client/models/resend_team_invitation_response.py +56 -0
  129. tower/tower_api_client/models/run.py +129 -0
  130. tower/tower_api_client/models/run_app_params.py +72 -0
  131. tower/tower_api_client/models/run_app_params_parameters.py +43 -0
  132. tower/tower_api_client/models/run_app_response.py +56 -0
  133. tower/tower_api_client/models/run_results.py +73 -0
  134. tower/tower_api_client/models/run_statistics.py +52 -0
  135. tower/tower_api_client/models/secret.py +62 -0
  136. tower/tower_api_client/models/series_point.py +52 -0
  137. tower/tower_api_client/models/session.py +73 -0
  138. tower/tower_api_client/models/statistics_settings.py +38 -0
  139. tower/tower_api_client/models/team.py +75 -0
  140. tower/tower_api_client/models/team_invitation.py +61 -0
  141. tower/tower_api_client/models/token.py +38 -0
  142. tower/tower_api_client/models/update_account_slug_params.py +49 -0
  143. tower/tower_api_client/models/update_account_slug_response.py +56 -0
  144. tower/tower_api_client/models/update_my_team_invitation_params.py +56 -0
  145. tower/tower_api_client/models/update_my_team_invitation_response.py +39 -0
  146. tower/tower_api_client/models/update_team_params.py +58 -0
  147. tower/tower_api_client/models/update_team_response.py +56 -0
  148. tower/tower_api_client/models/update_user_params.py +71 -0
  149. tower/tower_api_client/models/update_user_response.py +56 -0
  150. tower/tower_api_client/models/user.py +90 -0
  151. tower/tower_api_client/types.py +44 -0
  152. tower-0.3.4.data/scripts/tower +0 -0
  153. tower-0.3.4.dist-info/METADATA +115 -0
  154. tower-0.3.4.dist-info/RECORD +156 -0
  155. tower-0.3.4.dist-info/WHEEL +4 -0
  156. tower-0.3.4.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,52 @@
1
+ from typing import Any, Dict, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="RunStatistics")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class RunStatistics:
10
+ """
11
+ Attributes:
12
+ failed_runs (int):
13
+ successful_runs (int):
14
+ total_runs (int):
15
+ """
16
+
17
+ failed_runs: int
18
+ successful_runs: int
19
+ total_runs: int
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ failed_runs = self.failed_runs
23
+ successful_runs = self.successful_runs
24
+ total_runs = self.total_runs
25
+
26
+ field_dict: Dict[str, Any] = {}
27
+ field_dict.update(
28
+ {
29
+ "failed_runs": failed_runs,
30
+ "successful_runs": successful_runs,
31
+ "total_runs": total_runs,
32
+ }
33
+ )
34
+
35
+ return field_dict
36
+
37
+ @classmethod
38
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
39
+ d = src_dict.copy()
40
+ failed_runs = d.pop("failed_runs")
41
+
42
+ successful_runs = d.pop("successful_runs")
43
+
44
+ total_runs = d.pop("total_runs")
45
+
46
+ run_statistics = cls(
47
+ failed_runs=failed_runs,
48
+ successful_runs=successful_runs,
49
+ total_runs=total_runs,
50
+ )
51
+
52
+ return run_statistics
@@ -0,0 +1,62 @@
1
+ import datetime
2
+ from typing import Any, Dict, Type, TypeVar
3
+
4
+ import attr
5
+ from dateutil.parser import isoparse
6
+
7
+ T = TypeVar("T", bound="Secret")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class Secret:
12
+ """
13
+ Attributes:
14
+ created_at (datetime.datetime):
15
+ environment (str):
16
+ name (str):
17
+ preview (str):
18
+ """
19
+
20
+ created_at: datetime.datetime
21
+ environment: str
22
+ name: str
23
+ preview: str
24
+
25
+ def to_dict(self) -> Dict[str, Any]:
26
+ created_at = self.created_at.isoformat()
27
+
28
+ environment = self.environment
29
+ name = self.name
30
+ preview = self.preview
31
+
32
+ field_dict: Dict[str, Any] = {}
33
+ field_dict.update(
34
+ {
35
+ "created_at": created_at,
36
+ "environment": environment,
37
+ "name": name,
38
+ "preview": preview,
39
+ }
40
+ )
41
+
42
+ return field_dict
43
+
44
+ @classmethod
45
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
46
+ d = src_dict.copy()
47
+ created_at = isoparse(d.pop("created_at"))
48
+
49
+ environment = d.pop("environment")
50
+
51
+ name = d.pop("name")
52
+
53
+ preview = d.pop("preview")
54
+
55
+ secret = cls(
56
+ created_at=created_at,
57
+ environment=environment,
58
+ name=name,
59
+ preview=preview,
60
+ )
61
+
62
+ return secret
@@ -0,0 +1,52 @@
1
+ from typing import Any, Dict, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="SeriesPoint")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class SeriesPoint:
10
+ """
11
+ Attributes:
12
+ failed (int):
13
+ key (str):
14
+ successful (int):
15
+ """
16
+
17
+ failed: int
18
+ key: str
19
+ successful: int
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ failed = self.failed
23
+ key = self.key
24
+ successful = self.successful
25
+
26
+ field_dict: Dict[str, Any] = {}
27
+ field_dict.update(
28
+ {
29
+ "failed": failed,
30
+ "key": key,
31
+ "successful": successful,
32
+ }
33
+ )
34
+
35
+ return field_dict
36
+
37
+ @classmethod
38
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
39
+ d = src_dict.copy()
40
+ failed = d.pop("failed")
41
+
42
+ key = d.pop("key")
43
+
44
+ successful = d.pop("successful")
45
+
46
+ series_point = cls(
47
+ failed=failed,
48
+ key=key,
49
+ successful=successful,
50
+ )
51
+
52
+ return series_point
@@ -0,0 +1,73 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ if TYPE_CHECKING:
6
+ from ..models.team import Team
7
+ from ..models.token import Token
8
+ from ..models.user import User
9
+
10
+
11
+ T = TypeVar("T", bound="Session")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class Session:
16
+ """
17
+ Attributes:
18
+ teams (List['Team']):
19
+ token (Token):
20
+ user (User):
21
+ """
22
+
23
+ teams: List["Team"]
24
+ token: "Token"
25
+ user: "User"
26
+
27
+ def to_dict(self) -> Dict[str, Any]:
28
+ teams = []
29
+ for teams_item_data in self.teams:
30
+ teams_item = teams_item_data.to_dict()
31
+
32
+ teams.append(teams_item)
33
+
34
+ token = self.token.to_dict()
35
+
36
+ user = self.user.to_dict()
37
+
38
+ field_dict: Dict[str, Any] = {}
39
+ field_dict.update(
40
+ {
41
+ "teams": teams,
42
+ "token": token,
43
+ "user": user,
44
+ }
45
+ )
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
51
+ from ..models.team import Team
52
+ from ..models.token import Token
53
+ from ..models.user import User
54
+
55
+ d = src_dict.copy()
56
+ teams = []
57
+ _teams = d.pop("teams")
58
+ for teams_item_data in _teams:
59
+ teams_item = Team.from_dict(teams_item_data)
60
+
61
+ teams.append(teams_item)
62
+
63
+ token = Token.from_dict(d.pop("token"))
64
+
65
+ user = User.from_dict(d.pop("user"))
66
+
67
+ session = cls(
68
+ teams=teams,
69
+ token=token,
70
+ user=user,
71
+ )
72
+
73
+ return session
@@ -0,0 +1,38 @@
1
+ from typing import Any, Dict, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="StatisticsSettings")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class StatisticsSettings:
10
+ """
11
+ Attributes:
12
+ period (str):
13
+ """
14
+
15
+ period: str
16
+
17
+ def to_dict(self) -> Dict[str, Any]:
18
+ period = self.period
19
+
20
+ field_dict: Dict[str, Any] = {}
21
+ field_dict.update(
22
+ {
23
+ "period": period,
24
+ }
25
+ )
26
+
27
+ return field_dict
28
+
29
+ @classmethod
30
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
31
+ d = src_dict.copy()
32
+ period = d.pop("period")
33
+
34
+ statistics_settings = cls(
35
+ period=period,
36
+ )
37
+
38
+ return statistics_settings
@@ -0,0 +1,75 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.token import Token
9
+
10
+
11
+ T = TypeVar("T", bound="Team")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class Team:
16
+ """
17
+ Attributes:
18
+ name (str):
19
+ slug (str):
20
+ type (str): The type of team, either 'personal' or 'team'.
21
+ token (Union[Unset, Token]):
22
+ """
23
+
24
+ name: str
25
+ slug: str
26
+ type: str
27
+ token: Union[Unset, "Token"] = UNSET
28
+
29
+ def to_dict(self) -> Dict[str, Any]:
30
+ name = self.name
31
+ slug = self.slug
32
+ type = self.type
33
+ token: Union[Unset, Dict[str, Any]] = UNSET
34
+ if not isinstance(self.token, Unset):
35
+ token = self.token.to_dict()
36
+
37
+ field_dict: Dict[str, Any] = {}
38
+ field_dict.update(
39
+ {
40
+ "name": name,
41
+ "slug": slug,
42
+ "type": type,
43
+ }
44
+ )
45
+ if token is not UNSET:
46
+ field_dict["token"] = token
47
+
48
+ return field_dict
49
+
50
+ @classmethod
51
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
52
+ from ..models.token import Token
53
+
54
+ d = src_dict.copy()
55
+ name = d.pop("name")
56
+
57
+ slug = d.pop("slug")
58
+
59
+ type = d.pop("type")
60
+
61
+ _token = d.pop("token", UNSET)
62
+ token: Union[Unset, Token]
63
+ if isinstance(_token, Unset):
64
+ token = UNSET
65
+ else:
66
+ token = Token.from_dict(_token)
67
+
68
+ team = cls(
69
+ name=name,
70
+ slug=slug,
71
+ type=type,
72
+ token=token,
73
+ )
74
+
75
+ return team
@@ -0,0 +1,61 @@
1
+ import datetime
2
+ from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar
3
+
4
+ import attr
5
+ from dateutil.parser import isoparse
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.team import Team
9
+
10
+
11
+ T = TypeVar("T", bound="TeamInvitation")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class TeamInvitation:
16
+ """
17
+ Attributes:
18
+ email (str):
19
+ invitation_sent_at (datetime.datetime):
20
+ team (Team):
21
+ """
22
+
23
+ email: str
24
+ invitation_sent_at: datetime.datetime
25
+ team: "Team"
26
+
27
+ def to_dict(self) -> Dict[str, Any]:
28
+ email = self.email
29
+ invitation_sent_at = self.invitation_sent_at.isoformat()
30
+
31
+ team = self.team.to_dict()
32
+
33
+ field_dict: Dict[str, Any] = {}
34
+ field_dict.update(
35
+ {
36
+ "email": email,
37
+ "invitation_sent_at": invitation_sent_at,
38
+ "team": team,
39
+ }
40
+ )
41
+
42
+ return field_dict
43
+
44
+ @classmethod
45
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
46
+ from ..models.team import Team
47
+
48
+ d = src_dict.copy()
49
+ email = d.pop("email")
50
+
51
+ invitation_sent_at = isoparse(d.pop("invitation_sent_at"))
52
+
53
+ team = Team.from_dict(d.pop("team"))
54
+
55
+ team_invitation = cls(
56
+ email=email,
57
+ invitation_sent_at=invitation_sent_at,
58
+ team=team,
59
+ )
60
+
61
+ return team_invitation
@@ -0,0 +1,38 @@
1
+ from typing import Any, Dict, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="Token")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class Token:
10
+ """
11
+ Attributes:
12
+ jwt (str):
13
+ """
14
+
15
+ jwt: str
16
+
17
+ def to_dict(self) -> Dict[str, Any]:
18
+ jwt = self.jwt
19
+
20
+ field_dict: Dict[str, Any] = {}
21
+ field_dict.update(
22
+ {
23
+ "jwt": jwt,
24
+ }
25
+ )
26
+
27
+ return field_dict
28
+
29
+ @classmethod
30
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
31
+ d = src_dict.copy()
32
+ jwt = d.pop("jwt")
33
+
34
+ token = cls(
35
+ jwt=jwt,
36
+ )
37
+
38
+ return token
@@ -0,0 +1,49 @@
1
+ from typing import Any, Dict, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ T = TypeVar("T", bound="UpdateAccountSlugParams")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class UpdateAccountSlugParams:
12
+ """
13
+ Attributes:
14
+ new_slug (str): The new slug for the account
15
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
16
+ http://localhost:8081/v1/schemas/UpdateAccountSlugParams.json.
17
+ """
18
+
19
+ new_slug: str
20
+ schema: Union[Unset, str] = UNSET
21
+
22
+ def to_dict(self) -> Dict[str, Any]:
23
+ new_slug = self.new_slug
24
+ schema = self.schema
25
+
26
+ field_dict: Dict[str, Any] = {}
27
+ field_dict.update(
28
+ {
29
+ "new_slug": new_slug,
30
+ }
31
+ )
32
+ if schema is not UNSET:
33
+ field_dict["$schema"] = schema
34
+
35
+ return field_dict
36
+
37
+ @classmethod
38
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
39
+ d = src_dict.copy()
40
+ new_slug = d.pop("new_slug")
41
+
42
+ schema = d.pop("$schema", UNSET)
43
+
44
+ update_account_slug_params = cls(
45
+ new_slug=new_slug,
46
+ schema=schema,
47
+ )
48
+
49
+ return update_account_slug_params
@@ -0,0 +1,56 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.account import Account
9
+
10
+
11
+ T = TypeVar("T", bound="UpdateAccountSlugResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class UpdateAccountSlugResponse:
16
+ """
17
+ Attributes:
18
+ account (Account):
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/UpdateAccountSlugResponse.json.
21
+ """
22
+
23
+ account: "Account"
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ account = self.account.to_dict()
28
+
29
+ schema = self.schema
30
+
31
+ field_dict: Dict[str, Any] = {}
32
+ field_dict.update(
33
+ {
34
+ "account": account,
35
+ }
36
+ )
37
+ if schema is not UNSET:
38
+ field_dict["$schema"] = schema
39
+
40
+ return field_dict
41
+
42
+ @classmethod
43
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
44
+ from ..models.account import Account
45
+
46
+ d = src_dict.copy()
47
+ account = Account.from_dict(d.pop("account"))
48
+
49
+ schema = d.pop("$schema", UNSET)
50
+
51
+ update_account_slug_response = cls(
52
+ account=account,
53
+ schema=schema,
54
+ )
55
+
56
+ return update_account_slug_response
@@ -0,0 +1,56 @@
1
+ from typing import Any, Dict, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ T = TypeVar("T", bound="UpdateMyTeamInvitationParams")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class UpdateMyTeamInvitationParams:
12
+ """
13
+ Attributes:
14
+ accepted (bool): Whether or not the invitation was accepted. If false, it's considered rejected.
15
+ slug (str): The slug of the team invitation to update
16
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
17
+ http://localhost:8081/v1/schemas/UpdateMyTeamInvitationParams.json.
18
+ """
19
+
20
+ accepted: bool
21
+ slug: str
22
+ schema: Union[Unset, str] = UNSET
23
+
24
+ def to_dict(self) -> Dict[str, Any]:
25
+ accepted = self.accepted
26
+ slug = self.slug
27
+ schema = self.schema
28
+
29
+ field_dict: Dict[str, Any] = {}
30
+ field_dict.update(
31
+ {
32
+ "accepted": accepted,
33
+ "slug": slug,
34
+ }
35
+ )
36
+ if schema is not UNSET:
37
+ field_dict["$schema"] = schema
38
+
39
+ return field_dict
40
+
41
+ @classmethod
42
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
43
+ d = src_dict.copy()
44
+ accepted = d.pop("accepted")
45
+
46
+ slug = d.pop("slug")
47
+
48
+ schema = d.pop("$schema", UNSET)
49
+
50
+ update_my_team_invitation_params = cls(
51
+ accepted=accepted,
52
+ slug=slug,
53
+ schema=schema,
54
+ )
55
+
56
+ return update_my_team_invitation_params
@@ -0,0 +1,39 @@
1
+ from typing import Any, Dict, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ T = TypeVar("T", bound="UpdateMyTeamInvitationResponse")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class UpdateMyTeamInvitationResponse:
12
+ """
13
+ Attributes:
14
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
15
+ http://localhost:8081/v1/schemas/UpdateMyTeamInvitationResponse.json.
16
+ """
17
+
18
+ schema: Union[Unset, str] = UNSET
19
+
20
+ def to_dict(self) -> Dict[str, Any]:
21
+ schema = self.schema
22
+
23
+ field_dict: Dict[str, Any] = {}
24
+ field_dict.update({})
25
+ if schema is not UNSET:
26
+ field_dict["$schema"] = schema
27
+
28
+ return field_dict
29
+
30
+ @classmethod
31
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
32
+ d = src_dict.copy()
33
+ schema = d.pop("$schema", UNSET)
34
+
35
+ update_my_team_invitation_response = cls(
36
+ schema=schema,
37
+ )
38
+
39
+ return update_my_team_invitation_response