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,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="ListMyTeamInvitationsResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class ListMyTeamInvitationsResponse:
16
+ """
17
+ Attributes:
18
+ team_invitations (List['TeamInvitation']): All of team invitations
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/ListMyTeamInvitationsResponse.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
+ list_my_team_invitations_response = cls(
61
+ team_invitations=team_invitations,
62
+ schema=schema,
63
+ )
64
+
65
+ return list_my_team_invitations_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.pagination import Pagination
9
+ from ..models.run import Run
10
+
11
+
12
+ T = TypeVar("T", bound="ListRunsResponse")
13
+
14
+
15
+ @attr.s(auto_attribs=True)
16
+ class ListRunsResponse:
17
+ """
18
+ Attributes:
19
+ pages (Pagination):
20
+ runs (List['Run']):
21
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
22
+ http://localhost:8081/v1/schemas/ListRunsResponse.json.
23
+ """
24
+
25
+ pages: "Pagination"
26
+ runs: List["Run"]
27
+ schema: Union[Unset, str] = UNSET
28
+
29
+ def to_dict(self) -> Dict[str, Any]:
30
+ pages = self.pages.to_dict()
31
+
32
+ runs = []
33
+ for runs_item_data in self.runs:
34
+ runs_item = runs_item_data.to_dict()
35
+
36
+ runs.append(runs_item)
37
+
38
+ schema = self.schema
39
+
40
+ field_dict: Dict[str, Any] = {}
41
+ field_dict.update(
42
+ {
43
+ "pages": pages,
44
+ "runs": runs,
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.pagination import Pagination
55
+ from ..models.run import Run
56
+
57
+ d = src_dict.copy()
58
+ pages = Pagination.from_dict(d.pop("pages"))
59
+
60
+ runs = []
61
+ _runs = d.pop("runs")
62
+ for runs_item_data in _runs:
63
+ runs_item = Run.from_dict(runs_item_data)
64
+
65
+ runs.append(runs_item)
66
+
67
+ schema = d.pop("$schema", UNSET)
68
+
69
+ list_runs_response = cls(
70
+ pages=pages,
71
+ runs=runs,
72
+ schema=schema,
73
+ )
74
+
75
+ return list_runs_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="ListSecretEnvironmentsResponse")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class ListSecretEnvironmentsResponse:
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/ListSecretEnvironmentsResponse.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_secret_environments_response = cls(
46
+ environments=environments,
47
+ schema=schema,
48
+ )
49
+
50
+ return list_secret_environments_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.pagination import Pagination
9
+ from ..models.secret import Secret
10
+
11
+
12
+ T = TypeVar("T", bound="ListSecretsResponse")
13
+
14
+
15
+ @attr.s(auto_attribs=True)
16
+ class ListSecretsResponse:
17
+ """
18
+ Attributes:
19
+ pages (Pagination):
20
+ secrets (List['Secret']):
21
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
22
+ http://localhost:8081/v1/schemas/ListSecretsResponse.json.
23
+ """
24
+
25
+ pages: "Pagination"
26
+ secrets: List["Secret"]
27
+ schema: Union[Unset, str] = UNSET
28
+
29
+ def to_dict(self) -> Dict[str, Any]:
30
+ pages = self.pages.to_dict()
31
+
32
+ secrets = []
33
+ for secrets_item_data in self.secrets:
34
+ secrets_item = secrets_item_data.to_dict()
35
+
36
+ secrets.append(secrets_item)
37
+
38
+ schema = self.schema
39
+
40
+ field_dict: Dict[str, Any] = {}
41
+ field_dict.update(
42
+ {
43
+ "pages": pages,
44
+ "secrets": secrets,
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.pagination import Pagination
55
+ from ..models.secret import Secret
56
+
57
+ d = src_dict.copy()
58
+ pages = Pagination.from_dict(d.pop("pages"))
59
+
60
+ secrets = []
61
+ _secrets = d.pop("secrets")
62
+ for secrets_item_data in _secrets:
63
+ secrets_item = Secret.from_dict(secrets_item_data)
64
+
65
+ secrets.append(secrets_item)
66
+
67
+ schema = d.pop("$schema", UNSET)
68
+
69
+ list_secrets_response = cls(
70
+ pages=pages,
71
+ secrets=secrets,
72
+ schema=schema,
73
+ )
74
+
75
+ return list_secrets_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.team_invitation import TeamInvitation
9
+
10
+
11
+ T = TypeVar("T", bound="ListTeamInvitationsResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class ListTeamInvitationsResponse:
16
+ """
17
+ Attributes:
18
+ team_invitations (List['TeamInvitation']): All of team invitations
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/ListTeamInvitationsResponse.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
+ list_team_invitations_response = cls(
61
+ team_invitations=team_invitations,
62
+ schema=schema,
63
+ )
64
+
65
+ return list_team_invitations_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.user import User
9
+
10
+
11
+ T = TypeVar("T", bound="ListTeamMembersResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class ListTeamMembersResponse:
16
+ """
17
+ Attributes:
18
+ team_members (List['User']): All of the members of a team
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/ListTeamMembersResponse.json.
21
+ """
22
+
23
+ team_members: List["User"]
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ team_members = []
28
+ for team_members_item_data in self.team_members:
29
+ team_members_item = team_members_item_data.to_dict()
30
+
31
+ team_members.append(team_members_item)
32
+
33
+ schema = self.schema
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(
37
+ {
38
+ "team_members": team_members,
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.user import User
49
+
50
+ d = src_dict.copy()
51
+ team_members = []
52
+ _team_members = d.pop("team_members")
53
+ for team_members_item_data in _team_members:
54
+ team_members_item = User.from_dict(team_members_item_data)
55
+
56
+ team_members.append(team_members_item)
57
+
58
+ schema = d.pop("$schema", UNSET)
59
+
60
+ list_team_members_response = cls(
61
+ team_members=team_members,
62
+ schema=schema,
63
+ )
64
+
65
+ return list_team_members_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.team import Team
9
+
10
+
11
+ T = TypeVar("T", bound="ListTeamsResponse")
12
+
13
+
14
+ @attr.s(auto_attribs=True)
15
+ class ListTeamsResponse:
16
+ """
17
+ Attributes:
18
+ teams (List['Team']): List of teams
19
+ schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
20
+ http://localhost:8081/v1/schemas/ListTeamsResponse.json.
21
+ """
22
+
23
+ teams: List["Team"]
24
+ schema: Union[Unset, str] = UNSET
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ teams = []
28
+ for teams_item_data in self.teams:
29
+ teams_item = teams_item_data.to_dict()
30
+
31
+ teams.append(teams_item)
32
+
33
+ schema = self.schema
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(
37
+ {
38
+ "teams": teams,
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 import Team
49
+
50
+ d = src_dict.copy()
51
+ teams = []
52
+ _teams = d.pop("teams")
53
+ for teams_item_data in _teams:
54
+ teams_item = Team.from_dict(teams_item_data)
55
+
56
+ teams.append(teams_item)
57
+
58
+ schema = d.pop("$schema", UNSET)
59
+
60
+ list_teams_response = cls(
61
+ teams=teams,
62
+ schema=schema,
63
+ )
64
+
65
+ return list_teams_response
@@ -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="LogLine")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class LogLine:
12
+ """
13
+ Attributes:
14
+ content (str): Contents of the log message.
15
+ line_num (int): Line number.
16
+ reported_at (datetime.datetime): Timestamp of the log line.
17
+ run_id (str): The uuid of the Run.
18
+ """
19
+
20
+ content: str
21
+ line_num: int
22
+ reported_at: datetime.datetime
23
+ run_id: str
24
+
25
+ def to_dict(self) -> Dict[str, Any]:
26
+ content = self.content
27
+ line_num = self.line_num
28
+ reported_at = self.reported_at.isoformat()
29
+
30
+ run_id = self.run_id
31
+
32
+ field_dict: Dict[str, Any] = {}
33
+ field_dict.update(
34
+ {
35
+ "content": content,
36
+ "line_num": line_num,
37
+ "reported_at": reported_at,
38
+ "run_id": run_id,
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
+ content = d.pop("content")
48
+
49
+ line_num = d.pop("line_num")
50
+
51
+ reported_at = isoparse(d.pop("reported_at"))
52
+
53
+ run_id = d.pop("run_id")
54
+
55
+ log_line = cls(
56
+ content=content,
57
+ line_num=line_num,
58
+ reported_at=reported_at,
59
+ run_id=run_id,
60
+ )
61
+
62
+ return log_line
@@ -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="LogLineError")
8
+
9
+
10
+ @attr.s(auto_attribs=True)
11
+ class LogLineError:
12
+ """
13
+ Attributes:
14
+ content (str): Contents of the error.
15
+ reported_at (datetime.datetime): Timestamp of the event.
16
+ """
17
+
18
+ content: str
19
+ reported_at: datetime.datetime
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ content = self.content
23
+ reported_at = self.reported_at.isoformat()
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(
27
+ {
28
+ "content": content,
29
+ "reported_at": reported_at,
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
+ content = d.pop("content")
39
+
40
+ reported_at = isoparse(d.pop("reported_at"))
41
+
42
+ log_line_error = cls(
43
+ content=content,
44
+ reported_at=reported_at,
45
+ )
46
+
47
+ return log_line_error
@@ -0,0 +1,59 @@
1
+ from typing import Any, Dict, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="Pagination")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class Pagination:
10
+ """
11
+ Attributes:
12
+ num_pages (int):
13
+ page (int):
14
+ page_size (int):
15
+ total (int):
16
+ """
17
+
18
+ num_pages: int
19
+ page: int
20
+ page_size: int
21
+ total: int
22
+
23
+ def to_dict(self) -> Dict[str, Any]:
24
+ num_pages = self.num_pages
25
+ page = self.page
26
+ page_size = self.page_size
27
+ total = self.total
28
+
29
+ field_dict: Dict[str, Any] = {}
30
+ field_dict.update(
31
+ {
32
+ "num_pages": num_pages,
33
+ "page": page,
34
+ "page_size": page_size,
35
+ "total": total,
36
+ }
37
+ )
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
+ num_pages = d.pop("num_pages")
45
+
46
+ page = d.pop("page")
47
+
48
+ page_size = d.pop("page_size")
49
+
50
+ total = d.pop("total")
51
+
52
+ pagination = cls(
53
+ num_pages=num_pages,
54
+ page=page,
55
+ page_size=page_size,
56
+ total=total,
57
+ )
58
+
59
+ return pagination
@@ -0,0 +1,52 @@
1
+ from typing import Any, Dict, Type, TypeVar
2
+
3
+ import attr
4
+
5
+ T = TypeVar("T", bound="Parameter")
6
+
7
+
8
+ @attr.s(auto_attribs=True)
9
+ class Parameter:
10
+ """
11
+ Attributes:
12
+ default (str):
13
+ description (str):
14
+ name (str):
15
+ """
16
+
17
+ default: str
18
+ description: str
19
+ name: str
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ default = self.default
23
+ description = self.description
24
+ name = self.name
25
+
26
+ field_dict: Dict[str, Any] = {}
27
+ field_dict.update(
28
+ {
29
+ "default": default,
30
+ "description": description,
31
+ "name": name,
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
+ default = d.pop("default")
41
+
42
+ description = d.pop("description")
43
+
44
+ name = d.pop("name")
45
+
46
+ parameter = cls(
47
+ default=default,
48
+ description=description,
49
+ name=name,
50
+ )
51
+
52
+ return parameter