windmill-api 1.505.4__py3-none-any.whl → 1.507.0__py3-none-any.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.

Potentially problematic release.


This version of windmill-api might be problematic. Click here for more details.

Files changed (30) hide show
  1. windmill_api/api/oauth/connect_client_credentials.py +170 -0
  2. windmill_api/models/connect_callback_response_200.py +9 -0
  3. windmill_api/models/connect_client_credentials_json_body.py +77 -0
  4. windmill_api/models/connect_client_credentials_response_200.py +95 -0
  5. windmill_api/models/create_account_json_body.py +25 -0
  6. windmill_api/models/edit_workspace_git_sync_config_json_body_git_sync_settings.py +1 -35
  7. windmill_api/models/edit_workspace_git_sync_config_json_body_git_sync_settings_repositories_item.py +35 -1
  8. windmill_api/models/edit_workspace_git_sync_config_json_body_git_sync_settings_repositories_item_exclude_types_override_item.py +2 -0
  9. windmill_api/models/edit_workspace_git_sync_config_json_body_git_sync_settings_repositories_item_settings.py +112 -0
  10. windmill_api/models/edit_workspace_git_sync_config_json_body_git_sync_settings_repositories_item_settings_include_type_item.py +21 -0
  11. windmill_api/models/get_o_auth_connect_response_200.py +11 -0
  12. windmill_api/models/get_settings_response_200_git_sync.py +1 -33
  13. windmill_api/models/get_settings_response_200_git_sync_repositories_item.py +35 -1
  14. windmill_api/models/get_settings_response_200_git_sync_repositories_item_exclude_types_override_item.py +2 -0
  15. windmill_api/models/get_settings_response_200_git_sync_repositories_item_settings.py +107 -0
  16. windmill_api/models/{workspace_git_sync_settings_include_type_item.py → get_settings_response_200_git_sync_repositories_item_settings_include_type_item.py} +3 -1
  17. windmill_api/models/git_repository_settings.py +31 -1
  18. windmill_api/models/git_repository_settings_exclude_types_override_item.py +2 -0
  19. windmill_api/models/git_repository_settings_settings.py +103 -0
  20. windmill_api/models/{edit_workspace_git_sync_config_json_body_git_sync_settings_include_type_item.py → git_repository_settings_settings_include_type_item.py} +3 -1
  21. windmill_api/models/token_response.py +9 -0
  22. windmill_api/models/workspace_git_sync_settings.py +1 -33
  23. windmill_api/models/workspace_git_sync_settings_repositories_item.py +35 -1
  24. windmill_api/models/workspace_git_sync_settings_repositories_item_exclude_types_override_item.py +2 -0
  25. windmill_api/models/workspace_git_sync_settings_repositories_item_settings.py +105 -0
  26. windmill_api/models/{get_settings_response_200_git_sync_include_type_item.py → workspace_git_sync_settings_repositories_item_settings_include_type_item.py} +3 -1
  27. {windmill_api-1.505.4.dist-info → windmill_api-1.507.0.dist-info}/METADATA +1 -1
  28. {windmill_api-1.505.4.dist-info → windmill_api-1.507.0.dist-info}/RECORD +30 -22
  29. {windmill_api-1.505.4.dist-info → windmill_api-1.507.0.dist-info}/LICENSE +0 -0
  30. {windmill_api-1.505.4.dist-info → windmill_api-1.507.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,170 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.connect_client_credentials_json_body import ConnectClientCredentialsJsonBody
9
+ from ...models.connect_client_credentials_response_200 import ConnectClientCredentialsResponse200
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ client_path: str,
15
+ *,
16
+ json_body: ConnectClientCredentialsJsonBody,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ json_json_body = json_body.to_dict()
21
+
22
+ return {
23
+ "method": "post",
24
+ "url": "/oauth/connect_client_credentials/{client}".format(
25
+ client=client_path,
26
+ ),
27
+ "json": json_json_body,
28
+ }
29
+
30
+
31
+ def _parse_response(
32
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
33
+ ) -> Optional[ConnectClientCredentialsResponse200]:
34
+ if response.status_code == HTTPStatus.OK:
35
+ response_200 = ConnectClientCredentialsResponse200.from_dict(response.json())
36
+
37
+ return response_200
38
+ if client.raise_on_unexpected_status:
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+ else:
41
+ return None
42
+
43
+
44
+ def _build_response(
45
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
46
+ ) -> Response[ConnectClientCredentialsResponse200]:
47
+ return Response(
48
+ status_code=HTTPStatus(response.status_code),
49
+ content=response.content,
50
+ headers=response.headers,
51
+ parsed=_parse_response(client=client, response=response),
52
+ )
53
+
54
+
55
+ def sync_detailed(
56
+ client_path: str,
57
+ *,
58
+ client: Union[AuthenticatedClient, Client],
59
+ json_body: ConnectClientCredentialsJsonBody,
60
+ ) -> Response[ConnectClientCredentialsResponse200]:
61
+ """connect OAuth using client credentials
62
+
63
+ Args:
64
+ client_path (str):
65
+ json_body (ConnectClientCredentialsJsonBody):
66
+
67
+ Raises:
68
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
69
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
70
+
71
+ Returns:
72
+ Response[ConnectClientCredentialsResponse200]
73
+ """
74
+
75
+ kwargs = _get_kwargs(
76
+ client_path=client_path,
77
+ json_body=json_body,
78
+ )
79
+
80
+ response = client.get_httpx_client().request(
81
+ **kwargs,
82
+ )
83
+
84
+ return _build_response(client=client, response=response)
85
+
86
+
87
+ def sync(
88
+ client_path: str,
89
+ *,
90
+ client: Union[AuthenticatedClient, Client],
91
+ json_body: ConnectClientCredentialsJsonBody,
92
+ ) -> Optional[ConnectClientCredentialsResponse200]:
93
+ """connect OAuth using client credentials
94
+
95
+ Args:
96
+ client_path (str):
97
+ json_body (ConnectClientCredentialsJsonBody):
98
+
99
+ Raises:
100
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
101
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
102
+
103
+ Returns:
104
+ ConnectClientCredentialsResponse200
105
+ """
106
+
107
+ return sync_detailed(
108
+ client_path=client_path,
109
+ client=client,
110
+ json_body=json_body,
111
+ ).parsed
112
+
113
+
114
+ async def asyncio_detailed(
115
+ client_path: str,
116
+ *,
117
+ client: Union[AuthenticatedClient, Client],
118
+ json_body: ConnectClientCredentialsJsonBody,
119
+ ) -> Response[ConnectClientCredentialsResponse200]:
120
+ """connect OAuth using client credentials
121
+
122
+ Args:
123
+ client_path (str):
124
+ json_body (ConnectClientCredentialsJsonBody):
125
+
126
+ Raises:
127
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
128
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
129
+
130
+ Returns:
131
+ Response[ConnectClientCredentialsResponse200]
132
+ """
133
+
134
+ kwargs = _get_kwargs(
135
+ client_path=client_path,
136
+ json_body=json_body,
137
+ )
138
+
139
+ response = await client.get_async_httpx_client().request(**kwargs)
140
+
141
+ return _build_response(client=client, response=response)
142
+
143
+
144
+ async def asyncio(
145
+ client_path: str,
146
+ *,
147
+ client: Union[AuthenticatedClient, Client],
148
+ json_body: ConnectClientCredentialsJsonBody,
149
+ ) -> Optional[ConnectClientCredentialsResponse200]:
150
+ """connect OAuth using client credentials
151
+
152
+ Args:
153
+ client_path (str):
154
+ json_body (ConnectClientCredentialsJsonBody):
155
+
156
+ Raises:
157
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
158
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
159
+
160
+ Returns:
161
+ ConnectClientCredentialsResponse200
162
+ """
163
+
164
+ return (
165
+ await asyncio_detailed(
166
+ client_path=client_path,
167
+ client=client,
168
+ json_body=json_body,
169
+ )
170
+ ).parsed
@@ -16,12 +16,14 @@ class ConnectCallbackResponse200:
16
16
  expires_in (Union[Unset, int]):
17
17
  refresh_token (Union[Unset, str]):
18
18
  scope (Union[Unset, List[str]]):
19
+ grant_type (Union[Unset, str]):
19
20
  """
20
21
 
21
22
  access_token: str
22
23
  expires_in: Union[Unset, int] = UNSET
23
24
  refresh_token: Union[Unset, str] = UNSET
24
25
  scope: Union[Unset, List[str]] = UNSET
26
+ grant_type: Union[Unset, str] = UNSET
25
27
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
26
28
 
27
29
  def to_dict(self) -> Dict[str, Any]:
@@ -32,6 +34,8 @@ class ConnectCallbackResponse200:
32
34
  if not isinstance(self.scope, Unset):
33
35
  scope = self.scope
34
36
 
37
+ grant_type = self.grant_type
38
+
35
39
  field_dict: Dict[str, Any] = {}
36
40
  field_dict.update(self.additional_properties)
37
41
  field_dict.update(
@@ -45,6 +49,8 @@ class ConnectCallbackResponse200:
45
49
  field_dict["refresh_token"] = refresh_token
46
50
  if scope is not UNSET:
47
51
  field_dict["scope"] = scope
52
+ if grant_type is not UNSET:
53
+ field_dict["grant_type"] = grant_type
48
54
 
49
55
  return field_dict
50
56
 
@@ -59,11 +65,14 @@ class ConnectCallbackResponse200:
59
65
 
60
66
  scope = cast(List[str], d.pop("scope", UNSET))
61
67
 
68
+ grant_type = d.pop("grant_type", UNSET)
69
+
62
70
  connect_callback_response_200 = cls(
63
71
  access_token=access_token,
64
72
  expires_in=expires_in,
65
73
  refresh_token=refresh_token,
66
74
  scope=scope,
75
+ grant_type=grant_type,
67
76
  )
68
77
 
69
78
  connect_callback_response_200.additional_properties = d
@@ -0,0 +1,77 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="ConnectClientCredentialsJsonBody")
9
+
10
+
11
+ @_attrs_define
12
+ class ConnectClientCredentialsJsonBody:
13
+ """
14
+ Attributes:
15
+ cc_client_id (str): OAuth client ID for resource-level authentication
16
+ cc_client_secret (str): OAuth client secret for resource-level authentication
17
+ scopes (Union[Unset, List[str]]):
18
+ """
19
+
20
+ cc_client_id: str
21
+ cc_client_secret: str
22
+ scopes: Union[Unset, List[str]] = UNSET
23
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
24
+
25
+ def to_dict(self) -> Dict[str, Any]:
26
+ cc_client_id = self.cc_client_id
27
+ cc_client_secret = self.cc_client_secret
28
+ scopes: Union[Unset, List[str]] = UNSET
29
+ if not isinstance(self.scopes, Unset):
30
+ scopes = self.scopes
31
+
32
+ field_dict: Dict[str, Any] = {}
33
+ field_dict.update(self.additional_properties)
34
+ field_dict.update(
35
+ {
36
+ "cc_client_id": cc_client_id,
37
+ "cc_client_secret": cc_client_secret,
38
+ }
39
+ )
40
+ if scopes is not UNSET:
41
+ field_dict["scopes"] = scopes
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
+ cc_client_id = d.pop("cc_client_id")
49
+
50
+ cc_client_secret = d.pop("cc_client_secret")
51
+
52
+ scopes = cast(List[str], d.pop("scopes", UNSET))
53
+
54
+ connect_client_credentials_json_body = cls(
55
+ cc_client_id=cc_client_id,
56
+ cc_client_secret=cc_client_secret,
57
+ scopes=scopes,
58
+ )
59
+
60
+ connect_client_credentials_json_body.additional_properties = d
61
+ return connect_client_credentials_json_body
62
+
63
+ @property
64
+ def additional_keys(self) -> List[str]:
65
+ return list(self.additional_properties.keys())
66
+
67
+ def __getitem__(self, key: str) -> Any:
68
+ return self.additional_properties[key]
69
+
70
+ def __setitem__(self, key: str, value: Any) -> None:
71
+ self.additional_properties[key] = value
72
+
73
+ def __delitem__(self, key: str) -> None:
74
+ del self.additional_properties[key]
75
+
76
+ def __contains__(self, key: str) -> bool:
77
+ return key in self.additional_properties
@@ -0,0 +1,95 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="ConnectClientCredentialsResponse200")
9
+
10
+
11
+ @_attrs_define
12
+ class ConnectClientCredentialsResponse200:
13
+ """
14
+ Attributes:
15
+ access_token (str):
16
+ expires_in (Union[Unset, int]):
17
+ refresh_token (Union[Unset, str]):
18
+ scope (Union[Unset, List[str]]):
19
+ grant_type (Union[Unset, str]):
20
+ """
21
+
22
+ access_token: str
23
+ expires_in: Union[Unset, int] = UNSET
24
+ refresh_token: Union[Unset, str] = UNSET
25
+ scope: Union[Unset, List[str]] = UNSET
26
+ grant_type: Union[Unset, str] = UNSET
27
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> Dict[str, Any]:
30
+ access_token = self.access_token
31
+ expires_in = self.expires_in
32
+ refresh_token = self.refresh_token
33
+ scope: Union[Unset, List[str]] = UNSET
34
+ if not isinstance(self.scope, Unset):
35
+ scope = self.scope
36
+
37
+ grant_type = self.grant_type
38
+
39
+ field_dict: Dict[str, Any] = {}
40
+ field_dict.update(self.additional_properties)
41
+ field_dict.update(
42
+ {
43
+ "access_token": access_token,
44
+ }
45
+ )
46
+ if expires_in is not UNSET:
47
+ field_dict["expires_in"] = expires_in
48
+ if refresh_token is not UNSET:
49
+ field_dict["refresh_token"] = refresh_token
50
+ if scope is not UNSET:
51
+ field_dict["scope"] = scope
52
+ if grant_type is not UNSET:
53
+ field_dict["grant_type"] = grant_type
54
+
55
+ return field_dict
56
+
57
+ @classmethod
58
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
59
+ d = src_dict.copy()
60
+ access_token = d.pop("access_token")
61
+
62
+ expires_in = d.pop("expires_in", UNSET)
63
+
64
+ refresh_token = d.pop("refresh_token", UNSET)
65
+
66
+ scope = cast(List[str], d.pop("scope", UNSET))
67
+
68
+ grant_type = d.pop("grant_type", UNSET)
69
+
70
+ connect_client_credentials_response_200 = cls(
71
+ access_token=access_token,
72
+ expires_in=expires_in,
73
+ refresh_token=refresh_token,
74
+ scope=scope,
75
+ grant_type=grant_type,
76
+ )
77
+
78
+ connect_client_credentials_response_200.additional_properties = d
79
+ return connect_client_credentials_response_200
80
+
81
+ @property
82
+ def additional_keys(self) -> List[str]:
83
+ return list(self.additional_properties.keys())
84
+
85
+ def __getitem__(self, key: str) -> Any:
86
+ return self.additional_properties[key]
87
+
88
+ def __setitem__(self, key: str, value: Any) -> None:
89
+ self.additional_properties[key] = value
90
+
91
+ def __delitem__(self, key: str) -> None:
92
+ del self.additional_properties[key]
93
+
94
+ def __contains__(self, key: str) -> bool:
95
+ return key in self.additional_properties
@@ -15,17 +15,27 @@ class CreateAccountJsonBody:
15
15
  expires_in (int):
16
16
  client (str):
17
17
  refresh_token (Union[Unset, str]):
18
+ grant_type (Union[Unset, str]): Default: 'authorization_code'.
19
+ cc_client_id (Union[Unset, str]): OAuth client ID for resource-level credentials (client_credentials flow only)
20
+ cc_client_secret (Union[Unset, str]): OAuth client secret for resource-level credentials (client_credentials
21
+ flow only)
18
22
  """
19
23
 
20
24
  expires_in: int
21
25
  client: str
22
26
  refresh_token: Union[Unset, str] = UNSET
27
+ grant_type: Union[Unset, str] = "authorization_code"
28
+ cc_client_id: Union[Unset, str] = UNSET
29
+ cc_client_secret: Union[Unset, str] = UNSET
23
30
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
24
31
 
25
32
  def to_dict(self) -> Dict[str, Any]:
26
33
  expires_in = self.expires_in
27
34
  client = self.client
28
35
  refresh_token = self.refresh_token
36
+ grant_type = self.grant_type
37
+ cc_client_id = self.cc_client_id
38
+ cc_client_secret = self.cc_client_secret
29
39
 
30
40
  field_dict: Dict[str, Any] = {}
31
41
  field_dict.update(self.additional_properties)
@@ -37,6 +47,12 @@ class CreateAccountJsonBody:
37
47
  )
38
48
  if refresh_token is not UNSET:
39
49
  field_dict["refresh_token"] = refresh_token
50
+ if grant_type is not UNSET:
51
+ field_dict["grant_type"] = grant_type
52
+ if cc_client_id is not UNSET:
53
+ field_dict["cc_client_id"] = cc_client_id
54
+ if cc_client_secret is not UNSET:
55
+ field_dict["cc_client_secret"] = cc_client_secret
40
56
 
41
57
  return field_dict
42
58
 
@@ -49,10 +65,19 @@ class CreateAccountJsonBody:
49
65
 
50
66
  refresh_token = d.pop("refresh_token", UNSET)
51
67
 
68
+ grant_type = d.pop("grant_type", UNSET)
69
+
70
+ cc_client_id = d.pop("cc_client_id", UNSET)
71
+
72
+ cc_client_secret = d.pop("cc_client_secret", UNSET)
73
+
52
74
  create_account_json_body = cls(
53
75
  expires_in=expires_in,
54
76
  client=client,
55
77
  refresh_token=refresh_token,
78
+ grant_type=grant_type,
79
+ cc_client_id=cc_client_id,
80
+ cc_client_secret=cc_client_secret,
56
81
  )
57
82
 
58
83
  create_account_json_body.additional_properties = d
@@ -1,11 +1,8 @@
1
- from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
- from ..models.edit_workspace_git_sync_config_json_body_git_sync_settings_include_type_item import (
7
- EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsIncludeTypeItem,
8
- )
9
6
  from ..types import UNSET, Unset
10
7
 
11
8
  if TYPE_CHECKING:
@@ -21,29 +18,13 @@ T = TypeVar("T", bound="EditWorkspaceGitSyncConfigJsonBodyGitSyncSettings")
21
18
  class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettings:
22
19
  """
23
20
  Attributes:
24
- include_path (Union[Unset, List[str]]):
25
- include_type (Union[Unset, List[EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsIncludeTypeItem]]):
26
21
  repositories (Union[Unset, List['EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem']]):
27
22
  """
28
23
 
29
- include_path: Union[Unset, List[str]] = UNSET
30
- include_type: Union[Unset, List[EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsIncludeTypeItem]] = UNSET
31
24
  repositories: Union[Unset, List["EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem"]] = UNSET
32
25
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
33
26
 
34
27
  def to_dict(self) -> Dict[str, Any]:
35
- include_path: Union[Unset, List[str]] = UNSET
36
- if not isinstance(self.include_path, Unset):
37
- include_path = self.include_path
38
-
39
- include_type: Union[Unset, List[str]] = UNSET
40
- if not isinstance(self.include_type, Unset):
41
- include_type = []
42
- for include_type_item_data in self.include_type:
43
- include_type_item = include_type_item_data.value
44
-
45
- include_type.append(include_type_item)
46
-
47
28
  repositories: Union[Unset, List[Dict[str, Any]]] = UNSET
48
29
  if not isinstance(self.repositories, Unset):
49
30
  repositories = []
@@ -55,10 +36,6 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettings:
55
36
  field_dict: Dict[str, Any] = {}
56
37
  field_dict.update(self.additional_properties)
57
38
  field_dict.update({})
58
- if include_path is not UNSET:
59
- field_dict["include_path"] = include_path
60
- if include_type is not UNSET:
61
- field_dict["include_type"] = include_type
62
39
  if repositories is not UNSET:
63
40
  field_dict["repositories"] = repositories
64
41
 
@@ -71,15 +48,6 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettings:
71
48
  )
72
49
 
73
50
  d = src_dict.copy()
74
- include_path = cast(List[str], d.pop("include_path", UNSET))
75
-
76
- include_type = []
77
- _include_type = d.pop("include_type", UNSET)
78
- for include_type_item_data in _include_type or []:
79
- include_type_item = EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsIncludeTypeItem(include_type_item_data)
80
-
81
- include_type.append(include_type_item)
82
-
83
51
  repositories = []
84
52
  _repositories = d.pop("repositories", UNSET)
85
53
  for repositories_item_data in _repositories or []:
@@ -90,8 +58,6 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettings:
90
58
  repositories.append(repositories_item)
91
59
 
92
60
  edit_workspace_git_sync_config_json_body_git_sync_settings = cls(
93
- include_path=include_path,
94
- include_type=include_type,
95
61
  repositories=repositories,
96
62
  )
97
63
 
@@ -1,4 +1,4 @@
1
- from typing import Any, Dict, List, Type, TypeVar, Union
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
@@ -8,6 +8,12 @@ from ..models.edit_workspace_git_sync_config_json_body_git_sync_settings_reposit
8
8
  )
9
9
  from ..types import UNSET, Unset
10
10
 
11
+ if TYPE_CHECKING:
12
+ from ..models.edit_workspace_git_sync_config_json_body_git_sync_settings_repositories_item_settings import (
13
+ EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemSettings,
14
+ )
15
+
16
+
11
17
  T = TypeVar("T", bound="EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem")
12
18
 
13
19
 
@@ -19,6 +25,8 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem:
19
25
  git_repo_resource_path (str):
20
26
  use_individual_branch (Union[Unset, bool]):
21
27
  group_by_folder (Union[Unset, bool]):
28
+ collapsed (Union[Unset, bool]):
29
+ settings (Union[Unset, EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemSettings]):
22
30
  exclude_types_override (Union[Unset,
23
31
  List[EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemExcludeTypesOverrideItem]]):
24
32
  """
@@ -27,6 +35,8 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem:
27
35
  git_repo_resource_path: str
28
36
  use_individual_branch: Union[Unset, bool] = UNSET
29
37
  group_by_folder: Union[Unset, bool] = UNSET
38
+ collapsed: Union[Unset, bool] = UNSET
39
+ settings: Union[Unset, "EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemSettings"] = UNSET
30
40
  exclude_types_override: Union[
31
41
  Unset, List[EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemExcludeTypesOverrideItem]
32
42
  ] = UNSET
@@ -37,6 +47,11 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem:
37
47
  git_repo_resource_path = self.git_repo_resource_path
38
48
  use_individual_branch = self.use_individual_branch
39
49
  group_by_folder = self.group_by_folder
50
+ collapsed = self.collapsed
51
+ settings: Union[Unset, Dict[str, Any]] = UNSET
52
+ if not isinstance(self.settings, Unset):
53
+ settings = self.settings.to_dict()
54
+
40
55
  exclude_types_override: Union[Unset, List[str]] = UNSET
41
56
  if not isinstance(self.exclude_types_override, Unset):
42
57
  exclude_types_override = []
@@ -57,6 +72,10 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem:
57
72
  field_dict["use_individual_branch"] = use_individual_branch
58
73
  if group_by_folder is not UNSET:
59
74
  field_dict["group_by_folder"] = group_by_folder
75
+ if collapsed is not UNSET:
76
+ field_dict["collapsed"] = collapsed
77
+ if settings is not UNSET:
78
+ field_dict["settings"] = settings
60
79
  if exclude_types_override is not UNSET:
61
80
  field_dict["exclude_types_override"] = exclude_types_override
62
81
 
@@ -64,6 +83,10 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem:
64
83
 
65
84
  @classmethod
66
85
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
86
+ from ..models.edit_workspace_git_sync_config_json_body_git_sync_settings_repositories_item_settings import (
87
+ EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemSettings,
88
+ )
89
+
67
90
  d = src_dict.copy()
68
91
  script_path = d.pop("script_path")
69
92
 
@@ -73,6 +96,15 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem:
73
96
 
74
97
  group_by_folder = d.pop("group_by_folder", UNSET)
75
98
 
99
+ collapsed = d.pop("collapsed", UNSET)
100
+
101
+ _settings = d.pop("settings", UNSET)
102
+ settings: Union[Unset, EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemSettings]
103
+ if isinstance(_settings, Unset):
104
+ settings = UNSET
105
+ else:
106
+ settings = EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemSettings.from_dict(_settings)
107
+
76
108
  exclude_types_override = []
77
109
  _exclude_types_override = d.pop("exclude_types_override", UNSET)
78
110
  for exclude_types_override_item_data in _exclude_types_override or []:
@@ -89,6 +121,8 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItem:
89
121
  git_repo_resource_path=git_repo_resource_path,
90
122
  use_individual_branch=use_individual_branch,
91
123
  group_by_folder=group_by_folder,
124
+ collapsed=collapsed,
125
+ settings=settings,
92
126
  exclude_types_override=exclude_types_override,
93
127
  )
94
128
 
@@ -6,11 +6,13 @@ class EditWorkspaceGitSyncConfigJsonBodyGitSyncSettingsRepositoriesItemExcludeTy
6
6
  FLOW = "flow"
7
7
  FOLDER = "folder"
8
8
  GROUP = "group"
9
+ KEY = "key"
9
10
  RESOURCE = "resource"
10
11
  RESOURCETYPE = "resourcetype"
11
12
  SCHEDULE = "schedule"
12
13
  SCRIPT = "script"
13
14
  SECRET = "secret"
15
+ SETTINGS = "settings"
14
16
  TRIGGER = "trigger"
15
17
  USER = "user"
16
18
  VARIABLE = "variable"