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,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.app_statistics import AppStatistics
9
+
10
+
11
+ T = TypeVar("T", bound="GenerateAppStatisticsResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class GenerateAppStatisticsResponse:
16
+ """
17
+ Attributes:
18
+ statistics (AppStatistics):
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/GenerateAppStatisticsResponse.json.
21
+ """
22
+
23
+ statistics: "AppStatistics"
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ statistics = self.statistics.to_dict()
28
+
29
+ schema = self.schema
30
+
31
+ field_dict: Dict[str, Any] = {}
32
+ field_dict.update(
33
+ {
34
+ "statistics": statistics,
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.app_statistics import AppStatistics
45
+
46
+ d = src_dict.copy()
47
+ statistics = AppStatistics.from_dict(d.pop("statistics"))
48
+
49
+ schema = d.pop("$schema", UNSET)
50
+
51
+ generate_app_statistics_response = cls(
52
+ statistics=statistics,
53
+ schema=schema,
54
+ )
55
+
56
+ return generate_app_statistics_response
@@ -0,0 +1,85 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.run_statistics import RunStatistics
9
+ from ..models.series_point import SeriesPoint
10
+ from ..models.statistics_settings import StatisticsSettings
11
+
12
+
13
+ T = TypeVar("T", bound="GenerateRunStatisticsResponse")
14
+
15
+
16
+ @attr.s(auto_attribs=True)
17
+ class GenerateRunStatisticsResponse:
18
+ """
19
+ Attributes:
20
+ series (List['SeriesPoint']):
21
+ settings (StatisticsSettings):
22
+ stats (RunStatistics):
23
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
24
+ http://localhost:8081/v1/schemas/GenerateRunStatisticsResponse.json.
25
+ """
26
+
27
+ series: List["SeriesPoint"]
28
+ settings: "StatisticsSettings"
29
+ stats: "RunStatistics"
30
+ schema: Union[Unset, str] = UNSET
31
+
32
+ def to_dict(self) -> Dict[str, Any]:
33
+ series = []
34
+ for series_item_data in self.series:
35
+ series_item = series_item_data.to_dict()
36
+
37
+ series.append(series_item)
38
+
39
+ settings = self.settings.to_dict()
40
+
41
+ stats = self.stats.to_dict()
42
+
43
+ schema = self.schema
44
+
45
+ field_dict: Dict[str, Any] = {}
46
+ field_dict.update(
47
+ {
48
+ "series": series,
49
+ "settings": settings,
50
+ "stats": stats,
51
+ }
52
+ )
53
+ if schema is not UNSET:
54
+ field_dict["$schema"] = schema
55
+
56
+ return field_dict
57
+
58
+ @classmethod
59
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
60
+ from ..models.run_statistics import RunStatistics
61
+ from ..models.series_point import SeriesPoint
62
+ from ..models.statistics_settings import StatisticsSettings
63
+
64
+ d = src_dict.copy()
65
+ series = []
66
+ _series = d.pop("series")
67
+ for series_item_data in _series:
68
+ series_item = SeriesPoint.from_dict(series_item_data)
69
+
70
+ series.append(series_item)
71
+
72
+ settings = StatisticsSettings.from_dict(d.pop("settings"))
73
+
74
+ stats = RunStatistics.from_dict(d.pop("stats"))
75
+
76
+ schema = d.pop("$schema", UNSET)
77
+
78
+ generate_run_statistics_response = cls(
79
+ series=series,
80
+ settings=settings,
81
+ stats=stats,
82
+ schema=schema,
83
+ )
84
+
85
+ return generate_run_statistics_response
@@ -0,0 +1,47 @@
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="GetRunLogLine")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class GetRunLogLine:
12
+ """
13
+ Attributes:
14
+ message (str):
15
+ timestamp (datetime.datetime):
16
+ """
17
+
18
+ message: str
19
+ timestamp: datetime.datetime
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ message = self.message
23
+ timestamp = self.timestamp.isoformat()
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(
27
+ {
28
+ "message": message,
29
+ "timestamp": timestamp,
30
+ }
31
+ )
32
+
33
+ return field_dict
34
+
35
+ @classmethod
36
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
37
+ d = src_dict.copy()
38
+ message = d.pop("message")
39
+
40
+ timestamp = isoparse(d.pop("timestamp"))
41
+
42
+ get_run_log_line = cls(
43
+ message=message,
44
+ timestamp=timestamp,
45
+ )
46
+
47
+ return get_run_log_line
@@ -0,0 +1,65 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.get_run_log_line import GetRunLogLine
9
+
10
+
11
+ T = TypeVar("T", bound="GetRunLogsOutputBody")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class GetRunLogsOutputBody:
16
+ """
17
+ Attributes:
18
+ log_lines (List['GetRunLogLine']):
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/GetRunLogsOutputBody.json.
21
+ """
22
+
23
+ log_lines: List["GetRunLogLine"]
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ log_lines = []
28
+ for log_lines_item_data in self.log_lines:
29
+ log_lines_item = log_lines_item_data.to_dict()
30
+
31
+ log_lines.append(log_lines_item)
32
+
33
+ schema = self.schema
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(
37
+ {
38
+ "log_lines": log_lines,
39
+ }
40
+ )
41
+ if schema is not UNSET:
42
+ field_dict["$schema"] = schema
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
48
+ from ..models.get_run_log_line import GetRunLogLine
49
+
50
+ d = src_dict.copy()
51
+ log_lines = []
52
+ _log_lines = d.pop("log_lines")
53
+ for log_lines_item_data in _log_lines:
54
+ log_lines_item = GetRunLogLine.from_dict(log_lines_item_data)
55
+
56
+ log_lines.append(log_lines_item)
57
+
58
+ schema = d.pop("$schema", UNSET)
59
+
60
+ get_run_logs_output_body = cls(
61
+ log_lines=log_lines,
62
+ schema=schema,
63
+ )
64
+
65
+ return get_run_logs_output_body
@@ -0,0 +1,58 @@
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="InviteTeamMemberParams")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class InviteTeamMemberParams:
12
+ """
13
+ Attributes:
14
+ emails (str): The email addresses of the people to invite. It can be a list in any format (comma separated,
15
+ newline separated, etc.) and it will be parsed into individual addresses
16
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
17
+ http://localhost:8081/v1/schemas/InviteTeamMemberParams.json.
18
+ message (Union[Unset, str]): Optional message to include in the invite email
19
+ """
20
+
21
+ emails: str
22
+ schema: Union[Unset, str] = UNSET
23
+ message: Union[Unset, str] = UNSET
24
+
25
+ def to_dict(self) -> Dict[str, Any]:
26
+ emails = self.emails
27
+ schema = self.schema
28
+ message = self.message
29
+
30
+ field_dict: Dict[str, Any] = {}
31
+ field_dict.update(
32
+ {
33
+ "emails": emails,
34
+ }
35
+ )
36
+ if schema is not UNSET:
37
+ field_dict["$schema"] = schema
38
+ if message is not UNSET:
39
+ field_dict["message"] = message
40
+
41
+ return field_dict
42
+
43
+ @classmethod
44
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
45
+ d = src_dict.copy()
46
+ emails = d.pop("emails")
47
+
48
+ schema = d.pop("$schema", UNSET)
49
+
50
+ message = d.pop("message", UNSET)
51
+
52
+ invite_team_member_params = cls(
53
+ emails=emails,
54
+ schema=schema,
55
+ message=message,
56
+ )
57
+
58
+ return invite_team_member_params
@@ -0,0 +1,65 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.team_invitation import TeamInvitation
9
+
10
+
11
+ T = TypeVar("T", bound="InviteTeamMemberResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class InviteTeamMemberResponse:
16
+ """
17
+ Attributes:
18
+ team_invitations (List['TeamInvitation']): The team invitation that you created
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/InviteTeamMemberResponse.json.
21
+ """
22
+
23
+ team_invitations: List["TeamInvitation"]
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ team_invitations = []
28
+ for team_invitations_item_data in self.team_invitations:
29
+ team_invitations_item = team_invitations_item_data.to_dict()
30
+
31
+ team_invitations.append(team_invitations_item)
32
+
33
+ schema = self.schema
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(
37
+ {
38
+ "team_invitations": team_invitations,
39
+ }
40
+ )
41
+ if schema is not UNSET:
42
+ field_dict["$schema"] = schema
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
48
+ from ..models.team_invitation import TeamInvitation
49
+
50
+ d = src_dict.copy()
51
+ team_invitations = []
52
+ _team_invitations = d.pop("team_invitations")
53
+ for team_invitations_item_data in _team_invitations:
54
+ team_invitations_item = TeamInvitation.from_dict(team_invitations_item_data)
55
+
56
+ team_invitations.append(team_invitations_item)
57
+
58
+ schema = d.pop("$schema", UNSET)
59
+
60
+ invite_team_member_response = cls(
61
+ team_invitations=team_invitations,
62
+ schema=schema,
63
+ )
64
+
65
+ return invite_team_member_response
@@ -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.team import Team
9
+
10
+
11
+ T = TypeVar("T", bound="LeaveTeamResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class LeaveTeamResponse:
16
+ """
17
+ Attributes:
18
+ team (Team):
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/LeaveTeamResponse.json.
21
+ """
22
+
23
+ team: "Team"
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ team = self.team.to_dict()
28
+
29
+ schema = self.schema
30
+
31
+ field_dict: Dict[str, Any] = {}
32
+ field_dict.update(
33
+ {
34
+ "team": team,
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.team import Team
45
+
46
+ d = src_dict.copy()
47
+ team = Team.from_dict(d.pop("team"))
48
+
49
+ schema = d.pop("$schema", UNSET)
50
+
51
+ leave_team_response = cls(
52
+ team=team,
53
+ schema=schema,
54
+ )
55
+
56
+ return leave_team_response
@@ -0,0 +1,65 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.api_key import APIKey
9
+
10
+
11
+ T = TypeVar("T", bound="ListAPIKeysResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class ListAPIKeysResponse:
16
+ """
17
+ Attributes:
18
+ api_keys (List['APIKey']): List of API keys
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/ListAPIKeysResponse.json.
21
+ """
22
+
23
+ api_keys: List["APIKey"]
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ api_keys = []
28
+ for api_keys_item_data in self.api_keys:
29
+ api_keys_item = api_keys_item_data.to_dict()
30
+
31
+ api_keys.append(api_keys_item)
32
+
33
+ schema = self.schema
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(
37
+ {
38
+ "api_keys": api_keys,
39
+ }
40
+ )
41
+ if schema is not UNSET:
42
+ field_dict["$schema"] = schema
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
48
+ from ..models.api_key import APIKey
49
+
50
+ d = src_dict.copy()
51
+ api_keys = []
52
+ _api_keys = d.pop("api_keys")
53
+ for api_keys_item_data in _api_keys:
54
+ api_keys_item = APIKey.from_dict(api_keys_item_data)
55
+
56
+ api_keys.append(api_keys_item)
57
+
58
+ schema = d.pop("$schema", UNSET)
59
+
60
+ list_api_keys_response = cls(
61
+ api_keys=api_keys,
62
+ schema=schema,
63
+ )
64
+
65
+ return list_api_keys_response
@@ -0,0 +1,50 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ T = TypeVar("T", bound="ListAppEnvironmentsResponse")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class ListAppEnvironmentsResponse:
12
+ """
13
+ Attributes:
14
+ environments (List[str]):
15
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
16
+ http://localhost:8081/v1/schemas/ListAppEnvironmentsResponse.json.
17
+ """
18
+
19
+ environments: List[str]
20
+ schema: Union[Unset, str] = UNSET
21
+
22
+ def to_dict(self) -> Dict[str, Any]:
23
+ environments = self.environments
24
+
25
+ schema = self.schema
26
+
27
+ field_dict: Dict[str, Any] = {}
28
+ field_dict.update(
29
+ {
30
+ "environments": environments,
31
+ }
32
+ )
33
+ if schema is not UNSET:
34
+ field_dict["$schema"] = schema
35
+
36
+ return field_dict
37
+
38
+ @classmethod
39
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
40
+ d = src_dict.copy()
41
+ environments = cast(List[str], d.pop("environments"))
42
+
43
+ schema = d.pop("$schema", UNSET)
44
+
45
+ list_app_environments_response = cls(
46
+ environments=environments,
47
+ schema=schema,
48
+ )
49
+
50
+ return list_app_environments_response
@@ -0,0 +1,65 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.app_version import AppVersion
9
+
10
+
11
+ T = TypeVar("T", bound="ListAppVersionsResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class ListAppVersionsResponse:
16
+ """
17
+ Attributes:
18
+ versions (List['AppVersion']):
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/ListAppVersionsResponse.json.
21
+ """
22
+
23
+ versions: List["AppVersion"]
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ versions = []
28
+ for versions_item_data in self.versions:
29
+ versions_item = versions_item_data.to_dict()
30
+
31
+ versions.append(versions_item)
32
+
33
+ schema = self.schema
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(
37
+ {
38
+ "versions": versions,
39
+ }
40
+ )
41
+ if schema is not UNSET:
42
+ field_dict["$schema"] = schema
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
48
+ from ..models.app_version import AppVersion
49
+
50
+ d = src_dict.copy()
51
+ versions = []
52
+ _versions = d.pop("versions")
53
+ for versions_item_data in _versions:
54
+ versions_item = AppVersion.from_dict(versions_item_data)
55
+
56
+ versions.append(versions_item)
57
+
58
+ schema = d.pop("$schema", UNSET)
59
+
60
+ list_app_versions_response = cls(
61
+ versions=versions,
62
+ schema=schema,
63
+ )
64
+
65
+ return list_app_versions_response
@@ -0,0 +1,75 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
+
3
+ import attr
4
+
5
+ from ..types import UNSET, Unset
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.app_summary import AppSummary
9
+ from ..models.pagination import Pagination
10
+
11
+
12
+ T = TypeVar("T", bound="ListAppsResponse")
13
+
14
+
15
+ @attr.s(auto_attribs=True)
16
+ class ListAppsResponse:
17
+ """
18
+ Attributes:
19
+ apps (List['AppSummary']):
20
+ pages (Pagination):
21
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
22
+ http://localhost:8081/v1/schemas/ListAppsResponse.json.
23
+ """
24
+
25
+ apps: List["AppSummary"]
26
+ pages: "Pagination"
27
+ schema: Union[Unset, str] = UNSET
28
+
29
+ def to_dict(self) -> Dict[str, Any]:
30
+ apps = []
31
+ for apps_item_data in self.apps:
32
+ apps_item = apps_item_data.to_dict()
33
+
34
+ apps.append(apps_item)
35
+
36
+ pages = self.pages.to_dict()
37
+
38
+ schema = self.schema
39
+
40
+ field_dict: Dict[str, Any] = {}
41
+ field_dict.update(
42
+ {
43
+ "apps": apps,
44
+ "pages": pages,
45
+ }
46
+ )
47
+ if schema is not UNSET:
48
+ field_dict["$schema"] = schema
49
+
50
+ return field_dict
51
+
52
+ @classmethod
53
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
54
+ from ..models.app_summary import AppSummary
55
+ from ..models.pagination import Pagination
56
+
57
+ d = src_dict.copy()
58
+ apps = []
59
+ _apps = d.pop("apps")
60
+ for apps_item_data in _apps:
61
+ apps_item = AppSummary.from_dict(apps_item_data)
62
+
63
+ apps.append(apps_item)
64
+
65
+ pages = Pagination.from_dict(d.pop("pages"))
66
+
67
+ schema = d.pop("$schema", UNSET)
68
+
69
+ list_apps_response = cls(
70
+ apps=apps,
71
+ pages=pages,
72
+ schema=schema,
73
+ )
74
+
75
+ return list_apps_response
@@ -0,0 +1,11 @@
1
+ from enum import Enum
2
+
3
+
4
+ class ListAppsStatusItem(str, Enum):
5
+ ACTIVE = "active"
6
+ FAILED = "failed"
7
+ DISABLED = "disabled"
8
+ RUNNING = "running"
9
+
10
+ def __str__(self) -> str:
11
+ return str(self.value)