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.
- tower/__init__.py +4 -0
- tower/__main__.py +38 -0
- tower/client.py +115 -0
- tower/tower_api_client/__init__.py +7 -0
- tower/tower_api_client/api/__init__.py +1 -0
- tower/tower_api_client/api/default/__init__.py +0 -0
- tower/tower_api_client/api/default/accept_invitation.py +150 -0
- tower/tower_api_client/api/default/cancel_run.py +159 -0
- tower/tower_api_client/api/default/claim_device_login_ticket.py +154 -0
- tower/tower_api_client/api/default/create_account.py +150 -0
- tower/tower_api_client/api/default/create_api_key.py +142 -0
- tower/tower_api_client/api/default/create_apps.py +150 -0
- tower/tower_api_client/api/default/create_device_login_ticket.py +131 -0
- tower/tower_api_client/api/default/create_secret.py +150 -0
- tower/tower_api_client/api/default/create_session.py +150 -0
- tower/tower_api_client/api/default/create_team.py +150 -0
- tower/tower_api_client/api/default/delete_api_key.py +142 -0
- tower/tower_api_client/api/default/delete_app.py +146 -0
- tower/tower_api_client/api/default/delete_secret.py +104 -0
- tower/tower_api_client/api/default/delete_team.py +150 -0
- tower/tower_api_client/api/default/delete_team_invitation.py +167 -0
- tower/tower_api_client/api/default/deploy_app.py +166 -0
- tower/tower_api_client/api/default/describe_app.py +165 -0
- tower/tower_api_client/api/default/describe_app_version.py +163 -0
- tower/tower_api_client/api/default/describe_device_login_session.py +154 -0
- tower/tower_api_client/api/default/describe_run.py +172 -0
- tower/tower_api_client/api/default/describe_secrets_key.py +160 -0
- tower/tower_api_client/api/default/describe_session.py +125 -0
- tower/tower_api_client/api/default/export_secrets.py +218 -0
- tower/tower_api_client/api/default/generate_app_statistics.py +129 -0
- tower/tower_api_client/api/default/generate_run_statistics.py +160 -0
- tower/tower_api_client/api/default/get_app_run_logs.py +159 -0
- tower/tower_api_client/api/default/invite_team_member.py +163 -0
- tower/tower_api_client/api/default/leave_team.py +150 -0
- tower/tower_api_client/api/default/list_api_keys.py +125 -0
- tower/tower_api_client/api/default/list_app_environments.py +150 -0
- tower/tower_api_client/api/default/list_app_versions.py +146 -0
- tower/tower_api_client/api/default/list_apps.py +247 -0
- tower/tower_api_client/api/default/list_my_team_invitations.py +129 -0
- tower/tower_api_client/api/default/list_runs.py +184 -0
- tower/tower_api_client/api/default/list_secret_environments.py +129 -0
- tower/tower_api_client/api/default/list_secrets.py +201 -0
- tower/tower_api_client/api/default/list_team_invitations.py +150 -0
- tower/tower_api_client/api/default/list_team_members.py +146 -0
- tower/tower_api_client/api/default/list_teams.py +125 -0
- tower/tower_api_client/api/default/refresh_session.py +129 -0
- tower/tower_api_client/api/default/remove_team_member.py +163 -0
- tower/tower_api_client/api/default/resend_team_invitation.py +167 -0
- tower/tower_api_client/api/default/run_app.py +176 -0
- tower/tower_api_client/api/default/stream_app_run_logs.py +100 -0
- tower/tower_api_client/api/default/update_account_slug.py +163 -0
- tower/tower_api_client/api/default/update_my_team_invitation.py +154 -0
- tower/tower_api_client/api/default/update_team.py +167 -0
- tower/tower_api_client/api/default/update_user.py +150 -0
- tower/tower_api_client/client.py +51 -0
- tower/tower_api_client/models/__init__.py +193 -0
- tower/tower_api_client/models/accept_invitation_params.py +49 -0
- tower/tower_api_client/models/accept_invitation_response.py +56 -0
- tower/tower_api_client/models/account.py +45 -0
- tower/tower_api_client/models/api_key.py +67 -0
- tower/tower_api_client/models/app.py +122 -0
- tower/tower_api_client/models/app_statistics.py +66 -0
- tower/tower_api_client/models/app_summary.py +81 -0
- tower/tower_api_client/models/app_version.py +71 -0
- tower/tower_api_client/models/cancel_run_response.py +56 -0
- tower/tower_api_client/models/claim_device_login_ticket_params.py +49 -0
- tower/tower_api_client/models/claim_device_login_ticket_response.py +49 -0
- tower/tower_api_client/models/create_account_params.py +91 -0
- tower/tower_api_client/models/create_account_params_flags_struct.py +38 -0
- tower/tower_api_client/models/create_account_response.py +56 -0
- tower/tower_api_client/models/create_api_key_params.py +49 -0
- tower/tower_api_client/models/create_api_key_response.py +56 -0
- tower/tower_api_client/models/create_app_params.py +57 -0
- tower/tower_api_client/models/create_app_response.py +56 -0
- tower/tower_api_client/models/create_device_login_ticket_response.py +94 -0
- tower/tower_api_client/models/create_secret_params.py +70 -0
- tower/tower_api_client/models/create_secret_response.py +56 -0
- tower/tower_api_client/models/create_session_params.py +56 -0
- tower/tower_api_client/models/create_session_response.py +56 -0
- tower/tower_api_client/models/create_team_params.py +56 -0
- tower/tower_api_client/models/create_team_response.py +56 -0
- tower/tower_api_client/models/delete_api_key_params.py +49 -0
- tower/tower_api_client/models/delete_api_key_response.py +56 -0
- tower/tower_api_client/models/delete_app_response.py +56 -0
- tower/tower_api_client/models/delete_team_invitation_params.py +49 -0
- tower/tower_api_client/models/delete_team_invitation_response.py +56 -0
- tower/tower_api_client/models/delete_team_params.py +49 -0
- tower/tower_api_client/models/delete_team_response.py +56 -0
- tower/tower_api_client/models/deploy_app_response.py +56 -0
- tower/tower_api_client/models/describe_app_response.py +75 -0
- tower/tower_api_client/models/describe_app_version_response.py +56 -0
- tower/tower_api_client/models/describe_device_login_session_response.py +56 -0
- tower/tower_api_client/models/describe_run_response.py +56 -0
- tower/tower_api_client/models/describe_secrets_key_response.py +49 -0
- tower/tower_api_client/models/describe_session_response.py +56 -0
- tower/tower_api_client/models/error_detail.py +54 -0
- tower/tower_api_client/models/error_model.py +109 -0
- tower/tower_api_client/models/export_secrets_response.py +75 -0
- tower/tower_api_client/models/export_user_secrets_params.py +49 -0
- tower/tower_api_client/models/exported_secret.py +62 -0
- tower/tower_api_client/models/generate_app_statistics_response.py +56 -0
- tower/tower_api_client/models/generate_run_statistics_response.py +85 -0
- tower/tower_api_client/models/get_run_log_line.py +47 -0
- tower/tower_api_client/models/get_run_logs_output_body.py +65 -0
- tower/tower_api_client/models/invite_team_member_params.py +58 -0
- tower/tower_api_client/models/invite_team_member_response.py +65 -0
- tower/tower_api_client/models/leave_team_response.py +56 -0
- tower/tower_api_client/models/list_api_keys_response.py +65 -0
- tower/tower_api_client/models/list_app_environments_response.py +50 -0
- tower/tower_api_client/models/list_app_versions_response.py +65 -0
- tower/tower_api_client/models/list_apps_response.py +75 -0
- tower/tower_api_client/models/list_apps_status_item.py +11 -0
- tower/tower_api_client/models/list_my_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_runs_response.py +75 -0
- tower/tower_api_client/models/list_secret_environments_response.py +50 -0
- tower/tower_api_client/models/list_secrets_response.py +75 -0
- tower/tower_api_client/models/list_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_team_members_response.py +65 -0
- tower/tower_api_client/models/list_teams_response.py +65 -0
- tower/tower_api_client/models/log_line.py +62 -0
- tower/tower_api_client/models/log_line_error.py +47 -0
- tower/tower_api_client/models/pagination.py +59 -0
- tower/tower_api_client/models/parameter.py +52 -0
- tower/tower_api_client/models/refresh_session_response.py +66 -0
- tower/tower_api_client/models/remove_team_member_params.py +49 -0
- tower/tower_api_client/models/remove_team_member_response.py +56 -0
- tower/tower_api_client/models/resend_team_invitation_params.py +57 -0
- tower/tower_api_client/models/resend_team_invitation_response.py +56 -0
- tower/tower_api_client/models/run.py +129 -0
- tower/tower_api_client/models/run_app_params.py +72 -0
- tower/tower_api_client/models/run_app_params_parameters.py +43 -0
- tower/tower_api_client/models/run_app_response.py +56 -0
- tower/tower_api_client/models/run_results.py +73 -0
- tower/tower_api_client/models/run_statistics.py +52 -0
- tower/tower_api_client/models/secret.py +62 -0
- tower/tower_api_client/models/series_point.py +52 -0
- tower/tower_api_client/models/session.py +73 -0
- tower/tower_api_client/models/statistics_settings.py +38 -0
- tower/tower_api_client/models/team.py +75 -0
- tower/tower_api_client/models/team_invitation.py +61 -0
- tower/tower_api_client/models/token.py +38 -0
- tower/tower_api_client/models/update_account_slug_params.py +49 -0
- tower/tower_api_client/models/update_account_slug_response.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_params.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_response.py +39 -0
- tower/tower_api_client/models/update_team_params.py +58 -0
- tower/tower_api_client/models/update_team_response.py +56 -0
- tower/tower_api_client/models/update_user_params.py +71 -0
- tower/tower_api_client/models/update_user_response.py +56 -0
- tower/tower_api_client/models/user.py +90 -0
- tower/tower_api_client/types.py +44 -0
- tower-0.3.4.data/scripts/tower +0 -0
- tower-0.3.4.dist-info/METADATA +115 -0
- tower-0.3.4.dist-info/RECORD +156 -0
- tower-0.3.4.dist-info/WHEEL +4 -0
- tower-0.3.4.dist-info/licenses/LICENSE +21 -0
|
@@ -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="AcceptInvitationParams")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@attr.s(auto_attribs=True)
|
|
11
|
+
class AcceptInvitationParams:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
code (str): The invitation code to accept
|
|
15
|
+
schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
|
|
16
|
+
http://localhost:8081/v1/schemas/AcceptInvitationParams.json.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
code: str
|
|
20
|
+
schema: Union[Unset, str] = UNSET
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
23
|
+
code = self.code
|
|
24
|
+
schema = self.schema
|
|
25
|
+
|
|
26
|
+
field_dict: Dict[str, Any] = {}
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"code": code,
|
|
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
|
+
code = d.pop("code")
|
|
41
|
+
|
|
42
|
+
schema = d.pop("$schema", UNSET)
|
|
43
|
+
|
|
44
|
+
accept_invitation_params = cls(
|
|
45
|
+
code=code,
|
|
46
|
+
schema=schema,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return accept_invitation_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.user import User
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="AcceptInvitationResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@attr.s(auto_attribs=True)
|
|
15
|
+
class AcceptInvitationResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
user (User):
|
|
19
|
+
schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
|
|
20
|
+
http://localhost:8081/v1/schemas/AcceptInvitationResponse.json.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
user: "User"
|
|
24
|
+
schema: Union[Unset, str] = UNSET
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
27
|
+
user = self.user.to_dict()
|
|
28
|
+
|
|
29
|
+
schema = self.schema
|
|
30
|
+
|
|
31
|
+
field_dict: Dict[str, Any] = {}
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"user": user,
|
|
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.user import User
|
|
45
|
+
|
|
46
|
+
d = src_dict.copy()
|
|
47
|
+
user = User.from_dict(d.pop("user"))
|
|
48
|
+
|
|
49
|
+
schema = d.pop("$schema", UNSET)
|
|
50
|
+
|
|
51
|
+
accept_invitation_response = cls(
|
|
52
|
+
user=user,
|
|
53
|
+
schema=schema,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return accept_invitation_response
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import Any, Dict, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
|
|
5
|
+
T = TypeVar("T", bound="Account")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@attr.s(auto_attribs=True)
|
|
9
|
+
class Account:
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
name (str):
|
|
13
|
+
slug (str):
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
name: str
|
|
17
|
+
slug: str
|
|
18
|
+
|
|
19
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
20
|
+
name = self.name
|
|
21
|
+
slug = self.slug
|
|
22
|
+
|
|
23
|
+
field_dict: Dict[str, Any] = {}
|
|
24
|
+
field_dict.update(
|
|
25
|
+
{
|
|
26
|
+
"name": name,
|
|
27
|
+
"slug": slug,
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
return field_dict
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
35
|
+
d = src_dict.copy()
|
|
36
|
+
name = d.pop("name")
|
|
37
|
+
|
|
38
|
+
slug = d.pop("slug")
|
|
39
|
+
|
|
40
|
+
account = cls(
|
|
41
|
+
name=name,
|
|
42
|
+
slug=slug,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
return account
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import Any, Dict, Optional, Type, TypeVar
|
|
3
|
+
|
|
4
|
+
import attr
|
|
5
|
+
from dateutil.parser import isoparse
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="APIKey")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@attr.s(auto_attribs=True)
|
|
11
|
+
class APIKey:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
created_at (datetime.datetime):
|
|
15
|
+
identifier (str):
|
|
16
|
+
name (str):
|
|
17
|
+
last_used_at (Optional[datetime.datetime]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
created_at: datetime.datetime
|
|
21
|
+
identifier: str
|
|
22
|
+
name: str
|
|
23
|
+
last_used_at: Optional[datetime.datetime]
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
created_at = self.created_at.isoformat()
|
|
27
|
+
|
|
28
|
+
identifier = self.identifier
|
|
29
|
+
name = self.name
|
|
30
|
+
last_used_at = self.last_used_at.isoformat() if self.last_used_at else None
|
|
31
|
+
|
|
32
|
+
field_dict: Dict[str, Any] = {}
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"created_at": created_at,
|
|
36
|
+
"identifier": identifier,
|
|
37
|
+
"name": name,
|
|
38
|
+
"last_used_at": last_used_at,
|
|
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
|
+
identifier = d.pop("identifier")
|
|
50
|
+
|
|
51
|
+
name = d.pop("name")
|
|
52
|
+
|
|
53
|
+
_last_used_at = d.pop("last_used_at")
|
|
54
|
+
last_used_at: Optional[datetime.datetime]
|
|
55
|
+
if _last_used_at is None:
|
|
56
|
+
last_used_at = None
|
|
57
|
+
else:
|
|
58
|
+
last_used_at = isoparse(_last_used_at)
|
|
59
|
+
|
|
60
|
+
api_key = cls(
|
|
61
|
+
created_at=created_at,
|
|
62
|
+
identifier=identifier,
|
|
63
|
+
name=name,
|
|
64
|
+
last_used_at=last_used_at,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return api_key
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Dict, Optional, Type, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
import attr
|
|
5
|
+
from dateutil.parser import isoparse
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.run import Run
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="App")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@attr.s(auto_attribs=True)
|
|
17
|
+
class App:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
created_at (datetime.datetime): The date and time this app was created.
|
|
21
|
+
name (str): The name of the app.
|
|
22
|
+
owner (str): The account slug that owns this app
|
|
23
|
+
short_description (str): A short description of the app. Can be empty.
|
|
24
|
+
last_run (Union[Unset, Run]):
|
|
25
|
+
next_run_at (Optional[datetime.datetime]): The next time this app will run as part of it's schedule, null if
|
|
26
|
+
none.
|
|
27
|
+
schedule (Optional[str]): The schedule associated with this app, null if none.
|
|
28
|
+
status (Union[Unset, str]): The status of the app
|
|
29
|
+
version (Optional[str]): The current version of this app, null if none.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
created_at: datetime.datetime
|
|
33
|
+
name: str
|
|
34
|
+
owner: str
|
|
35
|
+
short_description: str
|
|
36
|
+
next_run_at: Optional[datetime.datetime]
|
|
37
|
+
schedule: Optional[str]
|
|
38
|
+
version: Optional[str]
|
|
39
|
+
last_run: Union[Unset, "Run"] = UNSET
|
|
40
|
+
status: Union[Unset, str] = UNSET
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
43
|
+
created_at = self.created_at.isoformat()
|
|
44
|
+
|
|
45
|
+
name = self.name
|
|
46
|
+
owner = self.owner
|
|
47
|
+
short_description = self.short_description
|
|
48
|
+
last_run: Union[Unset, Dict[str, Any]] = UNSET
|
|
49
|
+
if not isinstance(self.last_run, Unset):
|
|
50
|
+
last_run = self.last_run.to_dict()
|
|
51
|
+
|
|
52
|
+
next_run_at = self.next_run_at.isoformat() if self.next_run_at else None
|
|
53
|
+
|
|
54
|
+
schedule = self.schedule
|
|
55
|
+
status = self.status
|
|
56
|
+
version = self.version
|
|
57
|
+
|
|
58
|
+
field_dict: Dict[str, Any] = {}
|
|
59
|
+
field_dict.update(
|
|
60
|
+
{
|
|
61
|
+
"created_at": created_at,
|
|
62
|
+
"name": name,
|
|
63
|
+
"owner": owner,
|
|
64
|
+
"short_description": short_description,
|
|
65
|
+
"next_run_at": next_run_at,
|
|
66
|
+
"schedule": schedule,
|
|
67
|
+
"version": version,
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
if last_run is not UNSET:
|
|
71
|
+
field_dict["last_run"] = last_run
|
|
72
|
+
if status is not UNSET:
|
|
73
|
+
field_dict["status"] = status
|
|
74
|
+
|
|
75
|
+
return field_dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
79
|
+
from ..models.run import Run
|
|
80
|
+
|
|
81
|
+
d = src_dict.copy()
|
|
82
|
+
created_at = isoparse(d.pop("created_at"))
|
|
83
|
+
|
|
84
|
+
name = d.pop("name")
|
|
85
|
+
|
|
86
|
+
owner = d.pop("owner")
|
|
87
|
+
|
|
88
|
+
short_description = d.pop("short_description")
|
|
89
|
+
|
|
90
|
+
_last_run = d.pop("last_run", UNSET)
|
|
91
|
+
last_run: Union[Unset, Run]
|
|
92
|
+
if isinstance(_last_run, Unset):
|
|
93
|
+
last_run = UNSET
|
|
94
|
+
else:
|
|
95
|
+
last_run = Run.from_dict(_last_run)
|
|
96
|
+
|
|
97
|
+
_next_run_at = d.pop("next_run_at")
|
|
98
|
+
next_run_at: Optional[datetime.datetime]
|
|
99
|
+
if _next_run_at is None:
|
|
100
|
+
next_run_at = None
|
|
101
|
+
else:
|
|
102
|
+
next_run_at = isoparse(_next_run_at)
|
|
103
|
+
|
|
104
|
+
schedule = d.pop("schedule")
|
|
105
|
+
|
|
106
|
+
status = d.pop("status", UNSET)
|
|
107
|
+
|
|
108
|
+
version = d.pop("version")
|
|
109
|
+
|
|
110
|
+
app = cls(
|
|
111
|
+
created_at=created_at,
|
|
112
|
+
name=name,
|
|
113
|
+
owner=owner,
|
|
114
|
+
short_description=short_description,
|
|
115
|
+
last_run=last_run,
|
|
116
|
+
next_run_at=next_run_at,
|
|
117
|
+
schedule=schedule,
|
|
118
|
+
status=status,
|
|
119
|
+
version=version,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
return app
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
from typing import Any, Dict, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
|
|
5
|
+
T = TypeVar("T", bound="AppStatistics")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@attr.s(auto_attribs=True)
|
|
9
|
+
class AppStatistics:
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
all_apps (int):
|
|
13
|
+
disabled_apps (int):
|
|
14
|
+
exited_apps (int):
|
|
15
|
+
failed_apps (int):
|
|
16
|
+
running_apps (int):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
all_apps: int
|
|
20
|
+
disabled_apps: int
|
|
21
|
+
exited_apps: int
|
|
22
|
+
failed_apps: int
|
|
23
|
+
running_apps: int
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
all_apps = self.all_apps
|
|
27
|
+
disabled_apps = self.disabled_apps
|
|
28
|
+
exited_apps = self.exited_apps
|
|
29
|
+
failed_apps = self.failed_apps
|
|
30
|
+
running_apps = self.running_apps
|
|
31
|
+
|
|
32
|
+
field_dict: Dict[str, Any] = {}
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"all_apps": all_apps,
|
|
36
|
+
"disabled_apps": disabled_apps,
|
|
37
|
+
"exited_apps": exited_apps,
|
|
38
|
+
"failed_apps": failed_apps,
|
|
39
|
+
"running_apps": running_apps,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
47
|
+
d = src_dict.copy()
|
|
48
|
+
all_apps = d.pop("all_apps")
|
|
49
|
+
|
|
50
|
+
disabled_apps = d.pop("disabled_apps")
|
|
51
|
+
|
|
52
|
+
exited_apps = d.pop("exited_apps")
|
|
53
|
+
|
|
54
|
+
failed_apps = d.pop("failed_apps")
|
|
55
|
+
|
|
56
|
+
running_apps = d.pop("running_apps")
|
|
57
|
+
|
|
58
|
+
app_statistics = cls(
|
|
59
|
+
all_apps=all_apps,
|
|
60
|
+
disabled_apps=disabled_apps,
|
|
61
|
+
exited_apps=exited_apps,
|
|
62
|
+
failed_apps=failed_apps,
|
|
63
|
+
running_apps=running_apps,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
return app_statistics
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from ..models.app import App
|
|
7
|
+
from ..models.run import Run
|
|
8
|
+
from ..models.run_results import RunResults
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="AppSummary")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@attr.s(auto_attribs=True)
|
|
15
|
+
class AppSummary:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
app (App):
|
|
19
|
+
run_results (RunResults):
|
|
20
|
+
runs (List['Run']):
|
|
21
|
+
total_runs (int):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
app: "App"
|
|
25
|
+
run_results: "RunResults"
|
|
26
|
+
runs: List["Run"]
|
|
27
|
+
total_runs: int
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
30
|
+
app = self.app.to_dict()
|
|
31
|
+
|
|
32
|
+
run_results = self.run_results.to_dict()
|
|
33
|
+
|
|
34
|
+
runs = []
|
|
35
|
+
for runs_item_data in self.runs:
|
|
36
|
+
runs_item = runs_item_data.to_dict()
|
|
37
|
+
|
|
38
|
+
runs.append(runs_item)
|
|
39
|
+
|
|
40
|
+
total_runs = self.total_runs
|
|
41
|
+
|
|
42
|
+
field_dict: Dict[str, Any] = {}
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"app": app,
|
|
46
|
+
"run_results": run_results,
|
|
47
|
+
"runs": runs,
|
|
48
|
+
"total_runs": total_runs,
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
return field_dict
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
56
|
+
from ..models.app import App
|
|
57
|
+
from ..models.run import Run
|
|
58
|
+
from ..models.run_results import RunResults
|
|
59
|
+
|
|
60
|
+
d = src_dict.copy()
|
|
61
|
+
app = App.from_dict(d.pop("app"))
|
|
62
|
+
|
|
63
|
+
run_results = RunResults.from_dict(d.pop("run_results"))
|
|
64
|
+
|
|
65
|
+
runs = []
|
|
66
|
+
_runs = d.pop("runs")
|
|
67
|
+
for runs_item_data in _runs:
|
|
68
|
+
runs_item = Run.from_dict(runs_item_data)
|
|
69
|
+
|
|
70
|
+
runs.append(runs_item)
|
|
71
|
+
|
|
72
|
+
total_runs = d.pop("total_runs")
|
|
73
|
+
|
|
74
|
+
app_summary = cls(
|
|
75
|
+
app=app,
|
|
76
|
+
run_results=run_results,
|
|
77
|
+
runs=runs,
|
|
78
|
+
total_runs=total_runs,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return app_summary
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
|
|
3
|
+
|
|
4
|
+
import attr
|
|
5
|
+
from dateutil.parser import isoparse
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.parameter import Parameter
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="AppVersion")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@attr.s(auto_attribs=True)
|
|
15
|
+
class AppVersion:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
created_at (datetime.datetime):
|
|
19
|
+
parameters (List['Parameter']):
|
|
20
|
+
version (str):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
created_at: datetime.datetime
|
|
24
|
+
parameters: List["Parameter"]
|
|
25
|
+
version: str
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
28
|
+
created_at = self.created_at.isoformat()
|
|
29
|
+
|
|
30
|
+
parameters = []
|
|
31
|
+
for parameters_item_data in self.parameters:
|
|
32
|
+
parameters_item = parameters_item_data.to_dict()
|
|
33
|
+
|
|
34
|
+
parameters.append(parameters_item)
|
|
35
|
+
|
|
36
|
+
version = self.version
|
|
37
|
+
|
|
38
|
+
field_dict: Dict[str, Any] = {}
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"created_at": created_at,
|
|
42
|
+
"parameters": parameters,
|
|
43
|
+
"version": version,
|
|
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.parameter import Parameter
|
|
52
|
+
|
|
53
|
+
d = src_dict.copy()
|
|
54
|
+
created_at = isoparse(d.pop("created_at"))
|
|
55
|
+
|
|
56
|
+
parameters = []
|
|
57
|
+
_parameters = d.pop("parameters")
|
|
58
|
+
for parameters_item_data in _parameters:
|
|
59
|
+
parameters_item = Parameter.from_dict(parameters_item_data)
|
|
60
|
+
|
|
61
|
+
parameters.append(parameters_item)
|
|
62
|
+
|
|
63
|
+
version = d.pop("version")
|
|
64
|
+
|
|
65
|
+
app_version = cls(
|
|
66
|
+
created_at=created_at,
|
|
67
|
+
parameters=parameters,
|
|
68
|
+
version=version,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return app_version
|
|
@@ -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.run import Run
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="CancelRunResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@attr.s(auto_attribs=True)
|
|
15
|
+
class CancelRunResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
run (Run):
|
|
19
|
+
schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
|
|
20
|
+
http://localhost:8081/v1/schemas/CancelRunResponse.json.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
run: "Run"
|
|
24
|
+
schema: Union[Unset, str] = UNSET
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
27
|
+
run = self.run.to_dict()
|
|
28
|
+
|
|
29
|
+
schema = self.schema
|
|
30
|
+
|
|
31
|
+
field_dict: Dict[str, Any] = {}
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"run": run,
|
|
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.run import Run
|
|
45
|
+
|
|
46
|
+
d = src_dict.copy()
|
|
47
|
+
run = Run.from_dict(d.pop("run"))
|
|
48
|
+
|
|
49
|
+
schema = d.pop("$schema", UNSET)
|
|
50
|
+
|
|
51
|
+
cancel_run_response = cls(
|
|
52
|
+
run=run,
|
|
53
|
+
schema=schema,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return cancel_run_response
|
|
@@ -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="ClaimDeviceLoginTicketParams")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@attr.s(auto_attribs=True)
|
|
11
|
+
class ClaimDeviceLoginTicketParams:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
user_code (str): The user code to claim.
|
|
15
|
+
schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example:
|
|
16
|
+
http://localhost:8081/v1/schemas/ClaimDeviceLoginTicketParams.json.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
user_code: str
|
|
20
|
+
schema: Union[Unset, str] = UNSET
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
23
|
+
user_code = self.user_code
|
|
24
|
+
schema = self.schema
|
|
25
|
+
|
|
26
|
+
field_dict: Dict[str, Any] = {}
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"user_code": user_code,
|
|
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
|
+
user_code = d.pop("user_code")
|
|
41
|
+
|
|
42
|
+
schema = d.pop("$schema", UNSET)
|
|
43
|
+
|
|
44
|
+
claim_device_login_ticket_params = cls(
|
|
45
|
+
user_code=user_code,
|
|
46
|
+
schema=schema,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return claim_device_login_ticket_params
|