windmill-api 1.408.0__py3-none-any.whl → 1.409.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 (24) hide show
  1. windmill_api/api/flow/get_triggers_count_of_flow.py +166 -0
  2. windmill_api/api/flow/list_tokens_of_flow.py +171 -0
  3. windmill_api/api/script/get_triggers_count_of_script.py +166 -0
  4. windmill_api/api/script/list_tokens_of_script.py +171 -0
  5. windmill_api/models/create_token_impersonate_json_body.py +9 -0
  6. windmill_api/models/create_token_json_body.py +9 -0
  7. windmill_api/models/get_triggers_count_of_flow_response_200.py +108 -0
  8. windmill_api/models/get_triggers_count_of_flow_response_200_primary_schedule.py +58 -0
  9. windmill_api/models/get_triggers_count_of_script_response_200.py +108 -0
  10. windmill_api/models/get_triggers_count_of_script_response_200_primary_schedule.py +58 -0
  11. windmill_api/models/list_o_auth_logins_response_200.py +20 -5
  12. windmill_api/models/list_o_auth_logins_response_200_oauth_item.py +68 -0
  13. windmill_api/models/list_tokens_of_flow_response_200_item.py +121 -0
  14. windmill_api/models/list_tokens_of_script_response_200_item.py +121 -0
  15. windmill_api/models/list_tokens_response_200_item.py +9 -0
  16. windmill_api/models/new_token.py +9 -0
  17. windmill_api/models/new_token_impersonate.py +9 -0
  18. windmill_api/models/triggers_count.py +104 -0
  19. windmill_api/models/triggers_count_primary_schedule.py +58 -0
  20. windmill_api/models/truncated_token.py +9 -0
  21. {windmill_api-1.408.0.dist-info → windmill_api-1.409.0.dist-info}/METADATA +1 -1
  22. {windmill_api-1.408.0.dist-info → windmill_api-1.409.0.dist-info}/RECORD +24 -11
  23. {windmill_api-1.408.0.dist-info → windmill_api-1.409.0.dist-info}/LICENSE +0 -0
  24. {windmill_api-1.408.0.dist-info → windmill_api-1.409.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,166 @@
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.get_triggers_count_of_flow_response_200 import GetTriggersCountOfFlowResponse200
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ return {
19
+ "method": "get",
20
+ "url": "/w/{workspace}/flows/get_triggers_count/{path}".format(
21
+ workspace=workspace,
22
+ path=path,
23
+ ),
24
+ }
25
+
26
+
27
+ def _parse_response(
28
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
29
+ ) -> Optional[GetTriggersCountOfFlowResponse200]:
30
+ if response.status_code == HTTPStatus.OK:
31
+ response_200 = GetTriggersCountOfFlowResponse200.from_dict(response.json())
32
+
33
+ return response_200
34
+ if client.raise_on_unexpected_status:
35
+ raise errors.UnexpectedStatus(response.status_code, response.content)
36
+ else:
37
+ return None
38
+
39
+
40
+ def _build_response(
41
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
42
+ ) -> Response[GetTriggersCountOfFlowResponse200]:
43
+ return Response(
44
+ status_code=HTTPStatus(response.status_code),
45
+ content=response.content,
46
+ headers=response.headers,
47
+ parsed=_parse_response(client=client, response=response),
48
+ )
49
+
50
+
51
+ def sync_detailed(
52
+ workspace: str,
53
+ path: str,
54
+ *,
55
+ client: Union[AuthenticatedClient, Client],
56
+ ) -> Response[GetTriggersCountOfFlowResponse200]:
57
+ """get triggers count of flow
58
+
59
+ Args:
60
+ workspace (str):
61
+ path (str):
62
+
63
+ Raises:
64
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
65
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
66
+
67
+ Returns:
68
+ Response[GetTriggersCountOfFlowResponse200]
69
+ """
70
+
71
+ kwargs = _get_kwargs(
72
+ workspace=workspace,
73
+ path=path,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ def sync(
84
+ workspace: str,
85
+ path: str,
86
+ *,
87
+ client: Union[AuthenticatedClient, Client],
88
+ ) -> Optional[GetTriggersCountOfFlowResponse200]:
89
+ """get triggers count of flow
90
+
91
+ Args:
92
+ workspace (str):
93
+ path (str):
94
+
95
+ Raises:
96
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
97
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
98
+
99
+ Returns:
100
+ GetTriggersCountOfFlowResponse200
101
+ """
102
+
103
+ return sync_detailed(
104
+ workspace=workspace,
105
+ path=path,
106
+ client=client,
107
+ ).parsed
108
+
109
+
110
+ async def asyncio_detailed(
111
+ workspace: str,
112
+ path: str,
113
+ *,
114
+ client: Union[AuthenticatedClient, Client],
115
+ ) -> Response[GetTriggersCountOfFlowResponse200]:
116
+ """get triggers count of flow
117
+
118
+ Args:
119
+ workspace (str):
120
+ path (str):
121
+
122
+ Raises:
123
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
124
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
125
+
126
+ Returns:
127
+ Response[GetTriggersCountOfFlowResponse200]
128
+ """
129
+
130
+ kwargs = _get_kwargs(
131
+ workspace=workspace,
132
+ path=path,
133
+ )
134
+
135
+ response = await client.get_async_httpx_client().request(**kwargs)
136
+
137
+ return _build_response(client=client, response=response)
138
+
139
+
140
+ async def asyncio(
141
+ workspace: str,
142
+ path: str,
143
+ *,
144
+ client: Union[AuthenticatedClient, Client],
145
+ ) -> Optional[GetTriggersCountOfFlowResponse200]:
146
+ """get triggers count of flow
147
+
148
+ Args:
149
+ workspace (str):
150
+ path (str):
151
+
152
+ Raises:
153
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
154
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
155
+
156
+ Returns:
157
+ GetTriggersCountOfFlowResponse200
158
+ """
159
+
160
+ return (
161
+ await asyncio_detailed(
162
+ workspace=workspace,
163
+ path=path,
164
+ client=client,
165
+ )
166
+ ).parsed
@@ -0,0 +1,171 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.list_tokens_of_flow_response_200_item import ListTokensOfFlowResponse200Item
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ return {
19
+ "method": "get",
20
+ "url": "/w/{workspace}/flows/list_tokens/{path}".format(
21
+ workspace=workspace,
22
+ path=path,
23
+ ),
24
+ }
25
+
26
+
27
+ def _parse_response(
28
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
29
+ ) -> Optional[List["ListTokensOfFlowResponse200Item"]]:
30
+ if response.status_code == HTTPStatus.OK:
31
+ response_200 = []
32
+ _response_200 = response.json()
33
+ for response_200_item_data in _response_200:
34
+ response_200_item = ListTokensOfFlowResponse200Item.from_dict(response_200_item_data)
35
+
36
+ response_200.append(response_200_item)
37
+
38
+ return response_200
39
+ if client.raise_on_unexpected_status:
40
+ raise errors.UnexpectedStatus(response.status_code, response.content)
41
+ else:
42
+ return None
43
+
44
+
45
+ def _build_response(
46
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
47
+ ) -> Response[List["ListTokensOfFlowResponse200Item"]]:
48
+ return Response(
49
+ status_code=HTTPStatus(response.status_code),
50
+ content=response.content,
51
+ headers=response.headers,
52
+ parsed=_parse_response(client=client, response=response),
53
+ )
54
+
55
+
56
+ def sync_detailed(
57
+ workspace: str,
58
+ path: str,
59
+ *,
60
+ client: Union[AuthenticatedClient, Client],
61
+ ) -> Response[List["ListTokensOfFlowResponse200Item"]]:
62
+ """get tokens with flow scope
63
+
64
+ Args:
65
+ workspace (str):
66
+ path (str):
67
+
68
+ Raises:
69
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
71
+
72
+ Returns:
73
+ Response[List['ListTokensOfFlowResponse200Item']]
74
+ """
75
+
76
+ kwargs = _get_kwargs(
77
+ workspace=workspace,
78
+ path=path,
79
+ )
80
+
81
+ response = client.get_httpx_client().request(
82
+ **kwargs,
83
+ )
84
+
85
+ return _build_response(client=client, response=response)
86
+
87
+
88
+ def sync(
89
+ workspace: str,
90
+ path: str,
91
+ *,
92
+ client: Union[AuthenticatedClient, Client],
93
+ ) -> Optional[List["ListTokensOfFlowResponse200Item"]]:
94
+ """get tokens with flow scope
95
+
96
+ Args:
97
+ workspace (str):
98
+ path (str):
99
+
100
+ Raises:
101
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
102
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
103
+
104
+ Returns:
105
+ List['ListTokensOfFlowResponse200Item']
106
+ """
107
+
108
+ return sync_detailed(
109
+ workspace=workspace,
110
+ path=path,
111
+ client=client,
112
+ ).parsed
113
+
114
+
115
+ async def asyncio_detailed(
116
+ workspace: str,
117
+ path: str,
118
+ *,
119
+ client: Union[AuthenticatedClient, Client],
120
+ ) -> Response[List["ListTokensOfFlowResponse200Item"]]:
121
+ """get tokens with flow scope
122
+
123
+ Args:
124
+ workspace (str):
125
+ path (str):
126
+
127
+ Raises:
128
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
129
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
130
+
131
+ Returns:
132
+ Response[List['ListTokensOfFlowResponse200Item']]
133
+ """
134
+
135
+ kwargs = _get_kwargs(
136
+ workspace=workspace,
137
+ path=path,
138
+ )
139
+
140
+ response = await client.get_async_httpx_client().request(**kwargs)
141
+
142
+ return _build_response(client=client, response=response)
143
+
144
+
145
+ async def asyncio(
146
+ workspace: str,
147
+ path: str,
148
+ *,
149
+ client: Union[AuthenticatedClient, Client],
150
+ ) -> Optional[List["ListTokensOfFlowResponse200Item"]]:
151
+ """get tokens with flow scope
152
+
153
+ Args:
154
+ workspace (str):
155
+ path (str):
156
+
157
+ Raises:
158
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
159
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
160
+
161
+ Returns:
162
+ List['ListTokensOfFlowResponse200Item']
163
+ """
164
+
165
+ return (
166
+ await asyncio_detailed(
167
+ workspace=workspace,
168
+ path=path,
169
+ client=client,
170
+ )
171
+ ).parsed
@@ -0,0 +1,166 @@
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.get_triggers_count_of_script_response_200 import GetTriggersCountOfScriptResponse200
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ return {
19
+ "method": "get",
20
+ "url": "/w/{workspace}/scripts/get_triggers_count/{path}".format(
21
+ workspace=workspace,
22
+ path=path,
23
+ ),
24
+ }
25
+
26
+
27
+ def _parse_response(
28
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
29
+ ) -> Optional[GetTriggersCountOfScriptResponse200]:
30
+ if response.status_code == HTTPStatus.OK:
31
+ response_200 = GetTriggersCountOfScriptResponse200.from_dict(response.json())
32
+
33
+ return response_200
34
+ if client.raise_on_unexpected_status:
35
+ raise errors.UnexpectedStatus(response.status_code, response.content)
36
+ else:
37
+ return None
38
+
39
+
40
+ def _build_response(
41
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
42
+ ) -> Response[GetTriggersCountOfScriptResponse200]:
43
+ return Response(
44
+ status_code=HTTPStatus(response.status_code),
45
+ content=response.content,
46
+ headers=response.headers,
47
+ parsed=_parse_response(client=client, response=response),
48
+ )
49
+
50
+
51
+ def sync_detailed(
52
+ workspace: str,
53
+ path: str,
54
+ *,
55
+ client: Union[AuthenticatedClient, Client],
56
+ ) -> Response[GetTriggersCountOfScriptResponse200]:
57
+ """get triggers count of script
58
+
59
+ Args:
60
+ workspace (str):
61
+ path (str):
62
+
63
+ Raises:
64
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
65
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
66
+
67
+ Returns:
68
+ Response[GetTriggersCountOfScriptResponse200]
69
+ """
70
+
71
+ kwargs = _get_kwargs(
72
+ workspace=workspace,
73
+ path=path,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ def sync(
84
+ workspace: str,
85
+ path: str,
86
+ *,
87
+ client: Union[AuthenticatedClient, Client],
88
+ ) -> Optional[GetTriggersCountOfScriptResponse200]:
89
+ """get triggers count of script
90
+
91
+ Args:
92
+ workspace (str):
93
+ path (str):
94
+
95
+ Raises:
96
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
97
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
98
+
99
+ Returns:
100
+ GetTriggersCountOfScriptResponse200
101
+ """
102
+
103
+ return sync_detailed(
104
+ workspace=workspace,
105
+ path=path,
106
+ client=client,
107
+ ).parsed
108
+
109
+
110
+ async def asyncio_detailed(
111
+ workspace: str,
112
+ path: str,
113
+ *,
114
+ client: Union[AuthenticatedClient, Client],
115
+ ) -> Response[GetTriggersCountOfScriptResponse200]:
116
+ """get triggers count of script
117
+
118
+ Args:
119
+ workspace (str):
120
+ path (str):
121
+
122
+ Raises:
123
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
124
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
125
+
126
+ Returns:
127
+ Response[GetTriggersCountOfScriptResponse200]
128
+ """
129
+
130
+ kwargs = _get_kwargs(
131
+ workspace=workspace,
132
+ path=path,
133
+ )
134
+
135
+ response = await client.get_async_httpx_client().request(**kwargs)
136
+
137
+ return _build_response(client=client, response=response)
138
+
139
+
140
+ async def asyncio(
141
+ workspace: str,
142
+ path: str,
143
+ *,
144
+ client: Union[AuthenticatedClient, Client],
145
+ ) -> Optional[GetTriggersCountOfScriptResponse200]:
146
+ """get triggers count of script
147
+
148
+ Args:
149
+ workspace (str):
150
+ path (str):
151
+
152
+ Raises:
153
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
154
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
155
+
156
+ Returns:
157
+ GetTriggersCountOfScriptResponse200
158
+ """
159
+
160
+ return (
161
+ await asyncio_detailed(
162
+ workspace=workspace,
163
+ path=path,
164
+ client=client,
165
+ )
166
+ ).parsed
@@ -0,0 +1,171 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.list_tokens_of_script_response_200_item import ListTokensOfScriptResponse200Item
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ return {
19
+ "method": "get",
20
+ "url": "/w/{workspace}/scripts/list_tokens/{path}".format(
21
+ workspace=workspace,
22
+ path=path,
23
+ ),
24
+ }
25
+
26
+
27
+ def _parse_response(
28
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
29
+ ) -> Optional[List["ListTokensOfScriptResponse200Item"]]:
30
+ if response.status_code == HTTPStatus.OK:
31
+ response_200 = []
32
+ _response_200 = response.json()
33
+ for response_200_item_data in _response_200:
34
+ response_200_item = ListTokensOfScriptResponse200Item.from_dict(response_200_item_data)
35
+
36
+ response_200.append(response_200_item)
37
+
38
+ return response_200
39
+ if client.raise_on_unexpected_status:
40
+ raise errors.UnexpectedStatus(response.status_code, response.content)
41
+ else:
42
+ return None
43
+
44
+
45
+ def _build_response(
46
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
47
+ ) -> Response[List["ListTokensOfScriptResponse200Item"]]:
48
+ return Response(
49
+ status_code=HTTPStatus(response.status_code),
50
+ content=response.content,
51
+ headers=response.headers,
52
+ parsed=_parse_response(client=client, response=response),
53
+ )
54
+
55
+
56
+ def sync_detailed(
57
+ workspace: str,
58
+ path: str,
59
+ *,
60
+ client: Union[AuthenticatedClient, Client],
61
+ ) -> Response[List["ListTokensOfScriptResponse200Item"]]:
62
+ """get tokens with script scope
63
+
64
+ Args:
65
+ workspace (str):
66
+ path (str):
67
+
68
+ Raises:
69
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
71
+
72
+ Returns:
73
+ Response[List['ListTokensOfScriptResponse200Item']]
74
+ """
75
+
76
+ kwargs = _get_kwargs(
77
+ workspace=workspace,
78
+ path=path,
79
+ )
80
+
81
+ response = client.get_httpx_client().request(
82
+ **kwargs,
83
+ )
84
+
85
+ return _build_response(client=client, response=response)
86
+
87
+
88
+ def sync(
89
+ workspace: str,
90
+ path: str,
91
+ *,
92
+ client: Union[AuthenticatedClient, Client],
93
+ ) -> Optional[List["ListTokensOfScriptResponse200Item"]]:
94
+ """get tokens with script scope
95
+
96
+ Args:
97
+ workspace (str):
98
+ path (str):
99
+
100
+ Raises:
101
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
102
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
103
+
104
+ Returns:
105
+ List['ListTokensOfScriptResponse200Item']
106
+ """
107
+
108
+ return sync_detailed(
109
+ workspace=workspace,
110
+ path=path,
111
+ client=client,
112
+ ).parsed
113
+
114
+
115
+ async def asyncio_detailed(
116
+ workspace: str,
117
+ path: str,
118
+ *,
119
+ client: Union[AuthenticatedClient, Client],
120
+ ) -> Response[List["ListTokensOfScriptResponse200Item"]]:
121
+ """get tokens with script scope
122
+
123
+ Args:
124
+ workspace (str):
125
+ path (str):
126
+
127
+ Raises:
128
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
129
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
130
+
131
+ Returns:
132
+ Response[List['ListTokensOfScriptResponse200Item']]
133
+ """
134
+
135
+ kwargs = _get_kwargs(
136
+ workspace=workspace,
137
+ path=path,
138
+ )
139
+
140
+ response = await client.get_async_httpx_client().request(**kwargs)
141
+
142
+ return _build_response(client=client, response=response)
143
+
144
+
145
+ async def asyncio(
146
+ workspace: str,
147
+ path: str,
148
+ *,
149
+ client: Union[AuthenticatedClient, Client],
150
+ ) -> Optional[List["ListTokensOfScriptResponse200Item"]]:
151
+ """get tokens with script scope
152
+
153
+ Args:
154
+ workspace (str):
155
+ path (str):
156
+
157
+ Raises:
158
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
159
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
160
+
161
+ Returns:
162
+ List['ListTokensOfScriptResponse200Item']
163
+ """
164
+
165
+ return (
166
+ await asyncio_detailed(
167
+ workspace=workspace,
168
+ path=path,
169
+ client=client,
170
+ )
171
+ ).parsed
@@ -17,11 +17,13 @@ class CreateTokenImpersonateJsonBody:
17
17
  impersonate_email (str):
18
18
  label (Union[Unset, str]):
19
19
  expiration (Union[Unset, datetime.datetime]):
20
+ workspace_id (Union[Unset, str]):
20
21
  """
21
22
 
22
23
  impersonate_email: str
23
24
  label: Union[Unset, str] = UNSET
24
25
  expiration: Union[Unset, datetime.datetime] = UNSET
26
+ workspace_id: 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]:
@@ -31,6 +33,8 @@ class CreateTokenImpersonateJsonBody:
31
33
  if not isinstance(self.expiration, Unset):
32
34
  expiration = self.expiration.isoformat()
33
35
 
36
+ workspace_id = self.workspace_id
37
+
34
38
  field_dict: Dict[str, Any] = {}
35
39
  field_dict.update(self.additional_properties)
36
40
  field_dict.update(
@@ -42,6 +46,8 @@ class CreateTokenImpersonateJsonBody:
42
46
  field_dict["label"] = label
43
47
  if expiration is not UNSET:
44
48
  field_dict["expiration"] = expiration
49
+ if workspace_id is not UNSET:
50
+ field_dict["workspace_id"] = workspace_id
45
51
 
46
52
  return field_dict
47
53
 
@@ -59,10 +65,13 @@ class CreateTokenImpersonateJsonBody:
59
65
  else:
60
66
  expiration = isoparse(_expiration)
61
67
 
68
+ workspace_id = d.pop("workspace_id", UNSET)
69
+
62
70
  create_token_impersonate_json_body = cls(
63
71
  impersonate_email=impersonate_email,
64
72
  label=label,
65
73
  expiration=expiration,
74
+ workspace_id=workspace_id,
66
75
  )
67
76
 
68
77
  create_token_impersonate_json_body.additional_properties = d