Skip to content

Commit dd08e64

Browse files
committed
Migrate to Pydantic V2
1 parent 5f18cad commit dd08e64

783 files changed

Lines changed: 6614 additions & 9247 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

phrasetms_client/api/additional_workflow_step_api.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
import io
1717
import warnings
1818

19-
from pydantic import validate_arguments, ValidationError
19+
from pydantic import Field, ValidationError, validate_call
2020
from typing_extensions import Annotated
21+
from typing import Optional
2122

22-
from pydantic import Field, StrictStr, conint
23+
from pydantic import Field, StrictStr
2324

24-
from typing import Optional
2525

2626
from phrasetms_client.models.additional_workflow_step_dto import AdditionalWorkflowStepDto
2727
from phrasetms_client.models.additional_workflow_step_request_dto import AdditionalWorkflowStepRequestDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
4747
api_client = ApiClient.get_default()
4848
self.api_client = api_client
4949

50-
@validate_arguments
50+
@validate_call
5151
def create_awf_step(self, body : Optional[AdditionalWorkflowStepRequestDto] = None, **kwargs) -> AdditionalWorkflowStepDto: # noqa: E501
5252
"""Create additional workflow step # noqa: E501
5353
@@ -75,7 +75,7 @@ def create_awf_step(self, body : Optional[AdditionalWorkflowStepRequestDto] = No
7575
raise ValueError("Error! Please call the create_awf_step_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
7676
return self.create_awf_step_with_http_info(body, **kwargs) # noqa: E501
7777

78-
@validate_arguments
78+
@validate_call
7979
def create_awf_step_with_http_info(self, body : Optional[AdditionalWorkflowStepRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
8080
"""Create additional workflow step # noqa: E501
8181
@@ -195,7 +195,7 @@ def create_awf_step_with_http_info(self, body : Optional[AdditionalWorkflowStepR
195195
collection_formats=_collection_formats,
196196
_request_auth=_params.get('_request_auth'))
197197

198-
@validate_arguments
198+
@validate_call
199199
def delete_awf_step(self, id : StrictStr, **kwargs) -> None: # noqa: E501
200200
"""Delete additional workflow step # noqa: E501
201201
@@ -223,7 +223,7 @@ def delete_awf_step(self, id : StrictStr, **kwargs) -> None: # noqa: E501
223223
raise ValueError("Error! Please call the delete_awf_step_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
224224
return self.delete_awf_step_with_http_info(id, **kwargs) # noqa: E501
225225

226-
@validate_arguments
226+
@validate_call
227227
def delete_awf_step_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
228228
"""Delete additional workflow step # noqa: E501
229229
@@ -326,8 +326,8 @@ def delete_awf_step_with_http_info(self, id : StrictStr, **kwargs) -> ApiRespons
326326
collection_formats=_collection_formats,
327327
_request_auth=_params.get('_request_auth'))
328328

329-
@validate_arguments
330-
def list_awf_steps(self, page_number : Annotated[Optional[conint(strict=True, ge=0)], Field(description="Page number, starting with 0, default 0")] = None, page_size : Annotated[Optional[conint(strict=True, le=50, ge=1)], Field(description="Page size, accepts values between 1 and 50, default 50")] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the additional workflow step to filter")] = None, **kwargs) -> PageDtoAdditionalWorkflowStepDto: # noqa: E501
329+
@validate_call
330+
def list_awf_steps(self, page_number : Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Page number, starting with 0, default 0")] = None, page_size : Annotated[Optional[Annotated[int, Field(strict=True, le=50, ge=1)]], Field(description="Page size, accepts values between 1 and 50, default 50")] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the additional workflow step to filter")] = None, **kwargs) -> PageDtoAdditionalWorkflowStepDto: # noqa: E501
331331
"""List additional workflow steps # noqa: E501
332332
333333
This method makes a synchronous HTTP request by default. To make an
@@ -358,8 +358,8 @@ def list_awf_steps(self, page_number : Annotated[Optional[conint(strict=True, ge
358358
raise ValueError("Error! Please call the list_awf_steps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
359359
return self.list_awf_steps_with_http_info(page_number, page_size, name, **kwargs) # noqa: E501
360360

361-
@validate_arguments
362-
def list_awf_steps_with_http_info(self, page_number : Annotated[Optional[conint(strict=True, ge=0)], Field(description="Page number, starting with 0, default 0")] = None, page_size : Annotated[Optional[conint(strict=True, le=50, ge=1)], Field(description="Page size, accepts values between 1 and 50, default 50")] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the additional workflow step to filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
361+
@validate_call
362+
def list_awf_steps_with_http_info(self, page_number : Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Page number, starting with 0, default 0")] = None, page_size : Annotated[Optional[Annotated[int, Field(strict=True, le=50, ge=1)]], Field(description="Page size, accepts values between 1 and 50, default 50")] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the additional workflow step to filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
363363
"""List additional workflow steps # noqa: E501
364364
365365
This method makes a synchronous HTTP request by default. To make an

0 commit comments

Comments
 (0)