diff --git a/phrasetms_client/api/additional_workflow_step_api.py b/phrasetms_client/api/additional_workflow_step_api.py
index 4555978d..d82a4fef 100644
--- a/phrasetms_client/api/additional_workflow_step_api.py
+++ b/phrasetms_client/api/additional_workflow_step_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.additional_workflow_step_dto import AdditionalWorkflowStepDto
from phrasetms_client.models.additional_workflow_step_request_dto import AdditionalWorkflowStepRequestDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_awf_step(self, body : Optional[AdditionalWorkflowStepRequestDto] = None, **kwargs) -> AdditionalWorkflowStepDto: # noqa: E501
"""Create additional workflow step # noqa: E501
@@ -75,7 +75,7 @@ def create_awf_step(self, body : Optional[AdditionalWorkflowStepRequestDto] = No
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")
return self.create_awf_step_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_awf_step_with_http_info(self, body : Optional[AdditionalWorkflowStepRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create additional workflow step # noqa: E501
@@ -195,7 +195,7 @@ def create_awf_step_with_http_info(self, body : Optional[AdditionalWorkflowStepR
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_awf_step(self, id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete additional workflow step # noqa: E501
@@ -223,7 +223,7 @@ def delete_awf_step(self, id : StrictStr, **kwargs) -> None: # noqa: E501
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")
return self.delete_awf_step_with_http_info(id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_awf_step_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete additional workflow step # noqa: E501
@@ -326,8 +326,8 @@ def delete_awf_step_with_http_info(self, id : StrictStr, **kwargs) -> ApiRespons
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- 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
+ @validate_call
+ 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
"""List additional workflow steps # noqa: E501
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
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")
return self.list_awf_steps_with_http_info(page_number, page_size, name, **kwargs) # noqa: E501
- @validate_arguments
- 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
+ @validate_call
+ 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
"""List additional workflow steps # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/analysis_api.py b/phrasetms_client/api/analysis_api.py
index 2909dcc3..1e7b03ed 100644
--- a/phrasetms_client/api/analysis_api.py
+++ b/phrasetms_client/api/analysis_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictBool, StrictInt, StrictStr, conint
+from pydantic import Field, StrictBool, StrictInt, StrictStr
-from typing import Optional
from phrasetms_client.models.analyse_job_dto import AnalyseJobDto
from phrasetms_client.models.analyse_language_part_dto import AnalyseLanguagePartDto
@@ -60,7 +60,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def analyses_batch_edit_v2(self, body : Optional[BulkEditAnalyseV2Dto] = None, **kwargs) -> AnalysesV2Dto: # noqa: E501
"""Edit analyses (batch) # noqa: E501
@@ -89,7 +89,7 @@ def analyses_batch_edit_v2(self, body : Optional[BulkEditAnalyseV2Dto] = None, *
raise ValueError("Error! Please call the analyses_batch_edit_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.analyses_batch_edit_v2_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def analyses_batch_edit_v2_with_http_info(self, body : Optional[BulkEditAnalyseV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit analyses (batch) # noqa: E501
@@ -210,7 +210,7 @@ def analyses_batch_edit_v2_with_http_info(self, body : Optional[BulkEditAnalyseV
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def bulk_delete_analyses(self, body : Optional[BulkDeleteAnalyseDto] = None, **kwargs) -> None: # noqa: E501
"""Delete analyses (batch) # noqa: E501
@@ -238,7 +238,7 @@ def bulk_delete_analyses(self, body : Optional[BulkDeleteAnalyseDto] = None, **k
raise ValueError("Error! Please call the bulk_delete_analyses_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.bulk_delete_analyses_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def bulk_delete_analyses_with_http_info(self, body : Optional[BulkDeleteAnalyseDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete analyses (batch) # noqa: E501
@@ -348,7 +348,7 @@ def bulk_delete_analyses_with_http_info(self, body : Optional[BulkDeleteAnalyseD
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_analyse_async1(self, body : Optional[CreateAnalyseAsyncV2Dto] = None, **kwargs) -> AsyncAnalyseListResponseV2Dto: # noqa: E501
"""Create analysis # noqa: E501
@@ -377,7 +377,7 @@ def create_analyse_async1(self, body : Optional[CreateAnalyseAsyncV2Dto] = None,
raise ValueError("Error! Please call the create_analyse_async1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_analyse_async1_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_analyse_async1_with_http_info(self, body : Optional[CreateAnalyseAsyncV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create analysis # noqa: E501
@@ -505,7 +505,7 @@ def create_analyse_async1_with_http_info(self, body : Optional[CreateAnalyseAsyn
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_analyses_for_langs(self, body : Optional[CreateAnalyseListAsyncDto] = None, **kwargs) -> AsyncAnalyseListResponseDto: # noqa: E501
"""Create analyses by languages # noqa: E501
@@ -533,7 +533,7 @@ def create_analyses_for_langs(self, body : Optional[CreateAnalyseListAsyncDto] =
raise ValueError("Error! Please call the create_analyses_for_langs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_analyses_for_langs_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_analyses_for_langs_with_http_info(self, body : Optional[CreateAnalyseListAsyncDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create analyses by languages # noqa: E501
@@ -660,7 +660,7 @@ def create_analyses_for_langs_with_http_info(self, body : Optional[CreateAnalyse
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_analyses_for_providers(self, body : Optional[CreateAnalyseListAsyncDto] = None, **kwargs) -> AsyncAnalyseListResponseDto: # noqa: E501
"""Create analyses by providers # noqa: E501
@@ -688,7 +688,7 @@ def create_analyses_for_providers(self, body : Optional[CreateAnalyseListAsyncDt
raise ValueError("Error! Please call the create_analyses_for_providers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_analyses_for_providers_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_analyses_for_providers_with_http_info(self, body : Optional[CreateAnalyseListAsyncDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create analyses by providers # noqa: E501
@@ -815,7 +815,7 @@ def create_analyses_for_providers_with_http_info(self, body : Optional[CreateAna
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete(self, analyse_uid : StrictStr, purge : Optional[StrictBool] = None, **kwargs) -> None: # noqa: E501
"""Delete analysis # noqa: E501
@@ -845,7 +845,7 @@ def delete(self, analyse_uid : StrictStr, purge : Optional[StrictBool] = None, *
raise ValueError("Error! Please call the delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_with_http_info(analyse_uid, purge, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_with_http_info(self, analyse_uid : StrictStr, purge : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete analysis # noqa: E501
@@ -954,7 +954,7 @@ def delete_with_http_info(self, analyse_uid : StrictStr, purge : Optional[Strict
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def download_analyse(self, analyse_uid : StrictStr, format : StrictStr, **kwargs) -> None: # noqa: E501
"""Download analysis # noqa: E501
@@ -984,7 +984,7 @@ def download_analyse(self, analyse_uid : StrictStr, format : StrictStr, **kwargs
raise ValueError("Error! Please call the download_analyse_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.download_analyse_with_http_info(analyse_uid, format, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def download_analyse_with_http_info(self, analyse_uid : StrictStr, format : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Download analysis # noqa: E501
@@ -1093,7 +1093,7 @@ def download_analyse_with_http_info(self, analyse_uid : StrictStr, format : Stri
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_analysis(self, analyse_uid : StrictStr, body : Optional[EditAnalyseV2Dto] = None, **kwargs) -> AnalyseV2Dto: # noqa: E501
"""Edit analysis # noqa: E501
@@ -1124,7 +1124,7 @@ def edit_analysis(self, analyse_uid : StrictStr, body : Optional[EditAnalyseV2Dt
raise ValueError("Error! Please call the edit_analysis_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_analysis_with_http_info(analyse_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_analysis_with_http_info(self, analyse_uid : StrictStr, body : Optional[EditAnalyseV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit analysis # noqa: E501
@@ -1251,7 +1251,7 @@ def edit_analysis_with_http_info(self, analyse_uid : StrictStr, body : Optional[
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_analyse_language_part(self, analyse_uid : StrictStr, analyse_language_part_id : StrictInt, **kwargs) -> AnalyseLanguagePartDto: # noqa: E501
"""Get analysis language part # noqa: E501
@@ -1282,7 +1282,7 @@ def get_analyse_language_part(self, analyse_uid : StrictStr, analyse_language_pa
raise ValueError("Error! Please call the get_analyse_language_part_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_analyse_language_part_with_http_info(analyse_uid, analyse_language_part_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_analyse_language_part_with_http_info(self, analyse_uid : StrictStr, analyse_language_part_id : StrictInt, **kwargs) -> ApiResponse: # noqa: E501
"""Get analysis language part # noqa: E501
@@ -1409,7 +1409,7 @@ def get_analyse_language_part_with_http_info(self, analyse_uid : StrictStr, anal
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_analyse_v3(self, analyse_uid : StrictStr, **kwargs) -> AnalyseV3Dto: # noqa: E501
"""Get analysis # noqa: E501
@@ -1437,7 +1437,7 @@ def get_analyse_v3(self, analyse_uid : StrictStr, **kwargs) -> AnalyseV3Dto: #
raise ValueError("Error! Please call the get_analyse_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_analyse_v3_with_http_info(analyse_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_analyse_v3_with_http_info(self, analyse_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get analysis # noqa: E501
@@ -1557,7 +1557,7 @@ def get_analyse_v3_with_http_info(self, analyse_uid : StrictStr, **kwargs) -> Ap
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_job_part_analyse(self, analyse_uid : StrictStr, job_uid : StrictStr, **kwargs) -> AnalyseJobDto: # noqa: E501
"""Get jobs analysis # noqa: E501
@@ -1588,7 +1588,7 @@ def get_job_part_analyse(self, analyse_uid : StrictStr, job_uid : StrictStr, **k
raise ValueError("Error! Please call the get_job_part_analyse_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_job_part_analyse_with_http_info(analyse_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_job_part_analyse_with_http_info(self, analyse_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get jobs analysis # noqa: E501
@@ -1715,8 +1715,8 @@ def get_job_part_analyse_with_http_info(self, analyse_uid : StrictStr, job_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_by_project_v3(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[conint(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
+ @validate_call
+ def list_by_project_v3(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
"""List analyses by project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1757,8 +1757,8 @@ def list_by_project_v3(self, project_uid : StrictStr, name : Annotated[Optional[
raise ValueError("Error! Please call the list_by_project_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_by_project_v3_with_http_info(project_uid, name, uid, page_number, page_size, sort, order, only_owner_org, **kwargs) # noqa: E501
- @validate_arguments
- def list_by_project_v3_with_http_info(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[conint(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_by_project_v3_with_http_info(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List analyses by project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1919,8 +1919,8 @@ def list_by_project_v3_with_http_info(self, project_uid : StrictStr, name : Anno
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_job_parts(self, analyse_uid : StrictStr, analyse_language_part_id : StrictInt, 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, **kwargs) -> PageDtoAnalyseJobDto: # noqa: E501
+ @validate_call
+ def list_job_parts(self, analyse_uid : StrictStr, analyse_language_part_id : StrictInt, 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, **kwargs) -> PageDtoAnalyseJobDto: # noqa: E501
"""List jobs of analyses # noqa: E501
Returns list of job's analyses # noqa: E501
@@ -1954,8 +1954,8 @@ def list_job_parts(self, analyse_uid : StrictStr, analyse_language_part_id : Str
raise ValueError("Error! Please call the list_job_parts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_job_parts_with_http_info(analyse_uid, analyse_language_part_id, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_job_parts_with_http_info(self, analyse_uid : StrictStr, analyse_language_part_id : StrictInt, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_job_parts_with_http_info(self, analyse_uid : StrictStr, analyse_language_part_id : StrictInt, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List jobs of analyses # noqa: E501
Returns list of job's analyses # noqa: E501
@@ -2093,8 +2093,8 @@ def list_job_parts_with_http_info(self, analyse_uid : StrictStr, analyse_languag
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_part_analyse_v3(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
+ @validate_call
+ def list_part_analyse_v3(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
"""List analyses # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2127,8 +2127,8 @@ def list_part_analyse_v3(self, project_uid : StrictStr, job_uid : StrictStr, pag
raise ValueError("Error! Please call the list_part_analyse_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_part_analyse_v3_with_http_info(project_uid, job_uid, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_part_analyse_v3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_part_analyse_v3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List analyses # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2265,7 +2265,7 @@ def list_part_analyse_v3_with_http_info(self, project_uid : StrictStr, job_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def recalculate(self, body : Optional[AnalyseRecalculateRequestDto] = None, **kwargs) -> AnalyseRecalculateResponseDto: # noqa: E501
"""Recalculate analysis # noqa: E501
@@ -2293,7 +2293,7 @@ def recalculate(self, body : Optional[AnalyseRecalculateRequestDto] = None, **kw
raise ValueError("Error! Please call the recalculate_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.recalculate_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def recalculate_with_http_info(self, body : Optional[AnalyseRecalculateRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Recalculate analysis # noqa: E501
diff --git a/phrasetms_client/api/async_request_api.py b/phrasetms_client/api/async_request_api.py
index 8797d4d0..1639eb70 100644
--- a/phrasetms_client/api/async_request_api.py
+++ b/phrasetms_client/api/async_request_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictBool, StrictInt, conint
+from pydantic import Field, StrictBool, StrictInt
-from typing import Optional
from phrasetms_client.models.async_request_dto import AsyncRequestDto
from phrasetms_client.models.async_request_status_dto import AsyncRequestStatusDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def get_async_request(self, async_request_id : StrictInt, **kwargs) -> AsyncRequestDto: # noqa: E501
"""Get asynchronous request # noqa: E501
@@ -75,7 +75,7 @@ def get_async_request(self, async_request_id : StrictInt, **kwargs) -> AsyncRequ
raise ValueError("Error! Please call the get_async_request_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_async_request_with_http_info(async_request_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_async_request_with_http_info(self, async_request_id : StrictInt, **kwargs) -> ApiResponse: # noqa: E501
"""Get asynchronous request # noqa: E501
@@ -195,7 +195,7 @@ def get_async_request_with_http_info(self, async_request_id : StrictInt, **kwarg
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_current_limit_status(self, **kwargs) -> AsyncRequestStatusDto: # noqa: E501
"""Get current limits # noqa: E501
@@ -221,7 +221,7 @@ def get_current_limit_status(self, **kwargs) -> AsyncRequestStatusDto: # noqa:
raise ValueError("Error! Please call the get_current_limit_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_current_limit_status_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_current_limit_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""Get current limits # noqa: E501
@@ -335,8 +335,8 @@ def get_current_limit_status_with_http_info(self, **kwargs) -> ApiResponse: # n
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_pending_requests(self, all : Annotated[Optional[StrictBool], Field(description="Pending requests for organization instead of current user. Only for ADMIN.")] = None, 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, **kwargs) -> PageDtoAsyncRequestDto: # noqa: E501
+ @validate_call
+ def list_pending_requests(self, all : Annotated[Optional[StrictBool], Field(description="Pending requests for organization instead of current user. Only for ADMIN.")] = None, 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, **kwargs) -> PageDtoAsyncRequestDto: # noqa: E501
"""List pending requests # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -367,8 +367,8 @@ def list_pending_requests(self, all : Annotated[Optional[StrictBool], Field(desc
raise ValueError("Error! Please call the list_pending_requests_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_pending_requests_with_http_info(all, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_pending_requests_with_http_info(self, all : Annotated[Optional[StrictBool], Field(description="Pending requests for organization instead of current user. Only for ADMIN.")] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_pending_requests_with_http_info(self, all : Annotated[Optional[StrictBool], Field(description="Pending requests for organization instead of current user. Only for ADMIN.")] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List pending requests # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/authentication_api.py b/phrasetms_client/api/authentication_api.py
index a8b306fc..f3db917d 100644
--- a/phrasetms_client/api/authentication_api.py
+++ b/phrasetms_client/api/authentication_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
+from typing import Optional
from pydantic import Field, StrictBool, StrictStr
-from typing import Optional
from phrasetms_client.models.apple_token_response_dto import AppleTokenResponseDto
from phrasetms_client.models.login_dto import LoginDto
@@ -58,7 +58,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def login(self, body : Optional[LoginDto] = None, **kwargs) -> LoginResponseDto: # noqa: E501
"""Login # noqa: E501
@@ -86,7 +86,7 @@ def login(self, body : Optional[LoginDto] = None, **kwargs) -> LoginResponseDto:
raise ValueError("Error! Please call the login_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_with_http_info(self, body : Optional[LoginDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login # noqa: E501
@@ -213,7 +213,7 @@ def login_with_http_info(self, body : Optional[LoginDto] = None, **kwargs) -> Ap
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login1(self, body : Optional[LoginV3Dto] = None, **kwargs) -> LoginResponseV3Dto: # noqa: E501
"""Login # noqa: E501
@@ -241,7 +241,7 @@ def login1(self, body : Optional[LoginV3Dto] = None, **kwargs) -> LoginResponseV
raise ValueError("Error! Please call the login1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login1_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login1_with_http_info(self, body : Optional[LoginV3Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login # noqa: E501
@@ -368,7 +368,7 @@ def login1_with_http_info(self, body : Optional[LoginV3Dto] = None, **kwargs) ->
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_by_apple_with_code(self, native : Annotated[Optional[StrictBool], Field(description="For sign in with code from native device")] = None, body : Optional[LoginWithAppleDto] = None, **kwargs) -> LoginResponseDto: # noqa: E501
"""Login with Apple with code # noqa: E501
@@ -398,7 +398,7 @@ def login_by_apple_with_code(self, native : Annotated[Optional[StrictBool], Fiel
raise ValueError("Error! Please call the login_by_apple_with_code_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_by_apple_with_code_with_http_info(native, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_by_apple_with_code_with_http_info(self, native : Annotated[Optional[StrictBool], Field(description="For sign in with code from native device")] = None, body : Optional[LoginWithAppleDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login with Apple with code # noqa: E501
@@ -531,7 +531,7 @@ def login_by_apple_with_code_with_http_info(self, native : Annotated[Optional[St
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_by_apple_with_refresh_token(self, body : Optional[LoginWithAppleDto] = None, **kwargs) -> LoginResponseDto: # noqa: E501
"""Login with Apple refresh token # noqa: E501
@@ -559,7 +559,7 @@ def login_by_apple_with_refresh_token(self, body : Optional[LoginWithAppleDto] =
raise ValueError("Error! Please call the login_by_apple_with_refresh_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_by_apple_with_refresh_token_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_by_apple_with_refresh_token_with_http_info(self, body : Optional[LoginWithAppleDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login with Apple refresh token # noqa: E501
@@ -686,7 +686,7 @@ def login_by_apple_with_refresh_token_with_http_info(self, body : Optional[Login
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_by_google(self, body : Optional[LoginWithGoogleDto] = None, **kwargs) -> LoginResponseDto: # noqa: E501
"""Login with Google # noqa: E501
@@ -714,7 +714,7 @@ def login_by_google(self, body : Optional[LoginWithGoogleDto] = None, **kwargs)
raise ValueError("Error! Please call the login_by_google_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_by_google_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_by_google_with_http_info(self, body : Optional[LoginWithGoogleDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login with Google # noqa: E501
@@ -841,7 +841,7 @@ def login_by_google_with_http_info(self, body : Optional[LoginWithGoogleDto] = N
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_other(self, body : Optional[LoginOtherDto] = None, **kwargs) -> LoginResponseDto: # noqa: E501
"""Login as another user # noqa: E501
@@ -870,7 +870,7 @@ def login_other(self, body : Optional[LoginOtherDto] = None, **kwargs) -> LoginR
raise ValueError("Error! Please call the login_other_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_other_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_other_with_http_info(self, body : Optional[LoginOtherDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login as another user # noqa: E501
@@ -998,7 +998,7 @@ def login_other_with_http_info(self, body : Optional[LoginOtherDto] = None, **kw
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_other1(self, body : Optional[LoginOtherV3Dto] = None, **kwargs) -> LoginResponseV3Dto: # noqa: E501
"""Login as another user # noqa: E501
@@ -1027,7 +1027,7 @@ def login_other1(self, body : Optional[LoginOtherV3Dto] = None, **kwargs) -> Log
raise ValueError("Error! Please call the login_other1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_other1_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_other1_with_http_info(self, body : Optional[LoginOtherV3Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login as another user # noqa: E501
@@ -1155,7 +1155,7 @@ def login_other1_with_http_info(self, body : Optional[LoginOtherV3Dto] = None, *
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_to_session(self, body : Optional[LoginToSessionDto] = None, **kwargs) -> LoginToSessionResponseDto: # noqa: E501
"""Login to session # noqa: E501
@@ -1183,7 +1183,7 @@ def login_to_session(self, body : Optional[LoginToSessionDto] = None, **kwargs)
raise ValueError("Error! Please call the login_to_session_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_to_session_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_to_session_with_http_info(self, body : Optional[LoginToSessionDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login to session # noqa: E501
@@ -1310,7 +1310,7 @@ def login_to_session_with_http_info(self, body : Optional[LoginToSessionDto] = N
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_to_session2(self, body : Optional[LoginToSessionV3Dto] = None, **kwargs) -> LoginToSessionResponseV3Dto: # noqa: E501
"""Login to session # noqa: E501
@@ -1338,7 +1338,7 @@ def login_to_session2(self, body : Optional[LoginToSessionV3Dto] = None, **kwarg
raise ValueError("Error! Please call the login_to_session2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_to_session2_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_to_session2_with_http_info(self, body : Optional[LoginToSessionV3Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Login to session # noqa: E501
@@ -1465,7 +1465,7 @@ def login_to_session2_with_http_info(self, body : Optional[LoginToSessionV3Dto]
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def logout(self, token : Optional[StrictStr] = None, authorization : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501
"""Logout # noqa: E501
@@ -1495,7 +1495,7 @@ def logout(self, token : Optional[StrictStr] = None, authorization : Optional[St
raise ValueError("Error! Please call the logout_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.logout_with_http_info(token, authorization, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def logout_with_http_info(self, token : Optional[StrictStr] = None, authorization : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Logout # noqa: E501
@@ -1604,7 +1604,7 @@ def logout_with_http_info(self, token : Optional[StrictStr] = None, authorizatio
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def refresh_apple_token(self, token : Optional[StrictStr] = None, **kwargs) -> AppleTokenResponseDto: # noqa: E501
"""refresh apple token # noqa: E501
@@ -1632,7 +1632,7 @@ def refresh_apple_token(self, token : Optional[StrictStr] = None, **kwargs) -> A
raise ValueError("Error! Please call the refresh_apple_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.refresh_apple_token_with_http_info(token, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def refresh_apple_token_with_http_info(self, token : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""refresh apple token # noqa: E501
@@ -1752,7 +1752,7 @@ def refresh_apple_token_with_http_info(self, token : Optional[StrictStr] = None,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def who_am_i(self, **kwargs) -> LoginUserDto: # noqa: E501
"""Who am I # noqa: E501
@@ -1778,7 +1778,7 @@ def who_am_i(self, **kwargs) -> LoginUserDto: # noqa: E501
raise ValueError("Error! Please call the who_am_i_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.who_am_i_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def who_am_i_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""Who am I # noqa: E501
diff --git a/phrasetms_client/api/bilingual_file_api.py b/phrasetms_client/api/bilingual_file_api.py
index 0688bca9..7328d0ec 100644
--- a/phrasetms_client/api/bilingual_file_api.py
+++ b/phrasetms_client/api/bilingual_file_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Any, Dict, Optional
-from pydantic import StrictBool, StrictStr, conint
+from pydantic import Field, StrictBool, StrictStr
-from typing import Any, Dict, Optional
from phrasetms_client.models.compared_segments_dto import ComparedSegmentsDto
from phrasetms_client.models.get_bilingual_file_dto import GetBilingualFileDto
@@ -48,8 +48,8 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
- def compare_bilingual_file(self, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ComparedSegmentsDto: # noqa: E501
+ @validate_call
+ def compare_bilingual_file(self, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ComparedSegmentsDto: # noqa: E501
"""Compare bilingual file # noqa: E501
Compares bilingual file to job state. Returns list of compared segments. # noqa: E501
@@ -79,8 +79,8 @@ def compare_bilingual_file(self, workflow_level : Optional[conint(strict=True, l
raise ValueError("Error! Please call the compare_bilingual_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.compare_bilingual_file_with_http_info(workflow_level, body, **kwargs) # noqa: E501
- @validate_arguments
- def compare_bilingual_file_with_http_info(self, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def compare_bilingual_file_with_http_info(self, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Compare bilingual file # noqa: E501
Compares bilingual file to job state. Returns list of compared segments. # noqa: E501
@@ -213,7 +213,7 @@ def compare_bilingual_file_with_http_info(self, workflow_level : Optional[conint
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def convert_bilingual_file(self, var_from : StrictStr, to : StrictStr, body : Optional[Dict[str, Any]] = None, **kwargs) -> None: # noqa: E501
"""Convert bilingual file # noqa: E501
@@ -245,7 +245,7 @@ def convert_bilingual_file(self, var_from : StrictStr, to : StrictStr, body : Op
raise ValueError("Error! Please call the convert_bilingual_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.convert_bilingual_file_with_http_info(var_from, to, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def convert_bilingual_file_with_http_info(self, var_from : StrictStr, to : StrictStr, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Convert bilingual file # noqa: E501
@@ -367,7 +367,7 @@ def convert_bilingual_file_with_http_info(self, var_from : StrictStr, to : Stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_bilingual_file(self, project_uid : StrictStr, format : Optional[StrictStr] = None, preview : Optional[StrictBool] = None, body : Optional[GetBilingualFileDto] = None, **kwargs) -> None: # noqa: E501
"""Download bilingual file # noqa: E501
@@ -402,7 +402,7 @@ def get_bilingual_file(self, project_uid : StrictStr, format : Optional[StrictSt
raise ValueError("Error! Please call the get_bilingual_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_bilingual_file_with_http_info(project_uid, format, preview, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_bilingual_file_with_http_info(self, project_uid : StrictStr, format : Optional[StrictStr] = None, preview : Optional[StrictBool] = None, body : Optional[GetBilingualFileDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download bilingual file # noqa: E501
@@ -531,7 +531,7 @@ def get_bilingual_file_with_http_info(self, project_uid : StrictStr, format : Op
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_preview_file(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> None: # noqa: E501
"""Download preview # noqa: E501
@@ -560,7 +560,7 @@ def get_preview_file(self, body : Optional[Dict[str, Any]] = None, **kwargs) ->
raise ValueError("Error! Please call the get_preview_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_preview_file_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_preview_file_with_http_info(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download preview # noqa: E501
@@ -671,7 +671,7 @@ def get_preview_file_with_http_info(self, body : Optional[Dict[str, Any]] = None
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def upload_bilingual_file_v2(self, file : MultipartFile, save_to_trans_memory : Optional[StrictStr] = None, set_completed : Optional[StrictBool] = None, **kwargs) -> ProjectJobPartsDto: # noqa: E501
"""Upload bilingual file # noqa: E501
@@ -704,7 +704,7 @@ def upload_bilingual_file_v2(self, file : MultipartFile, save_to_trans_memory :
raise ValueError("Error! Please call the upload_bilingual_file_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.upload_bilingual_file_v2_with_http_info(file, save_to_trans_memory, set_completed, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def upload_bilingual_file_v2_with_http_info(self, file : MultipartFile, save_to_trans_memory : Optional[StrictStr] = None, set_completed : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Upload bilingual file # noqa: E501
diff --git a/phrasetms_client/api/business_unit_api.py b/phrasetms_client/api/business_unit_api.py
index b5e417df..9a7e7bf3 100644
--- a/phrasetms_client/api/business_unit_api.py
+++ b/phrasetms_client/api/business_unit_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.business_unit_dto import BusinessUnitDto
from phrasetms_client.models.business_unit_edit_dto import BusinessUnitEditDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_business_unit(self, body : Optional[BusinessUnitEditDto] = None, **kwargs) -> BusinessUnitDto: # noqa: E501
"""Create business unit # noqa: E501
@@ -75,7 +75,7 @@ def create_business_unit(self, body : Optional[BusinessUnitEditDto] = None, **kw
raise ValueError("Error! Please call the create_business_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_business_unit_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_business_unit_with_http_info(self, body : Optional[BusinessUnitEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create business unit # noqa: E501
@@ -202,7 +202,7 @@ def create_business_unit_with_http_info(self, body : Optional[BusinessUnitEditDt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_business_unit(self, business_unit_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete business unit # noqa: E501
@@ -230,7 +230,7 @@ def delete_business_unit(self, business_unit_uid : StrictStr, **kwargs) -> None:
raise ValueError("Error! Please call the delete_business_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_business_unit_with_http_info(business_unit_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_business_unit_with_http_info(self, business_unit_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete business unit # noqa: E501
@@ -333,7 +333,7 @@ def delete_business_unit_with_http_info(self, business_unit_uid : StrictStr, **k
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_business_unit(self, business_unit_uid : StrictStr, **kwargs) -> BusinessUnitDto: # noqa: E501
"""Get business unit # noqa: E501
@@ -361,7 +361,7 @@ def get_business_unit(self, business_unit_uid : StrictStr, **kwargs) -> Business
raise ValueError("Error! Please call the get_business_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_business_unit_with_http_info(business_unit_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_business_unit_with_http_info(self, business_unit_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get business unit # noqa: E501
@@ -481,8 +481,8 @@ def get_business_unit_with_http_info(self, business_unit_uid : StrictStr, **kwar
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_business_units(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the business unit")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoBusinessUnitDto: # noqa: E501
+ @validate_call
+ def list_business_units(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the business unit")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoBusinessUnitDto: # noqa: E501
"""List business units # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -519,8 +519,8 @@ def list_business_units(self, name : Annotated[Optional[StrictStr], Field(descri
raise ValueError("Error! Please call the list_business_units_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_business_units_with_http_info(name, created_by, sort, order, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_business_units_with_http_info(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the business unit")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_business_units_with_http_info(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the business unit")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List business units # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -669,7 +669,7 @@ def list_business_units_with_http_info(self, name : Annotated[Optional[StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_business_unit(self, business_unit_uid : StrictStr, body : Optional[BusinessUnitEditDto] = None, **kwargs) -> BusinessUnitDto: # noqa: E501
"""Edit business unit # noqa: E501
@@ -699,7 +699,7 @@ def update_business_unit(self, business_unit_uid : StrictStr, body : Optional[Bu
raise ValueError("Error! Please call the update_business_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_business_unit_with_http_info(business_unit_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_business_unit_with_http_info(self, business_unit_uid : StrictStr, body : Optional[BusinessUnitEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit business unit # noqa: E501
diff --git a/phrasetms_client/api/client_api.py b/phrasetms_client/api/client_api.py
index 0798d176..89964aab 100644
--- a/phrasetms_client/api/client_api.py
+++ b/phrasetms_client/api/client_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.client_dto import ClientDto
from phrasetms_client.models.client_edit_dto import ClientEditDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_client(self, body : ClientEditDto, **kwargs) -> ClientDto: # noqa: E501
"""Create client # noqa: E501
@@ -75,7 +75,7 @@ def create_client(self, body : ClientEditDto, **kwargs) -> ClientDto: # noqa: E
raise ValueError("Error! Please call the create_client_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_client_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_client_with_http_info(self, body : ClientEditDto, **kwargs) -> ApiResponse: # noqa: E501
"""Create client # noqa: E501
@@ -202,7 +202,7 @@ def create_client_with_http_info(self, body : ClientEditDto, **kwargs) -> ApiRes
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_client(self, client_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete client # noqa: E501
@@ -230,7 +230,7 @@ def delete_client(self, client_uid : StrictStr, **kwargs) -> None: # noqa: E501
raise ValueError("Error! Please call the delete_client_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_client_with_http_info(client_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_client_with_http_info(self, client_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete client # noqa: E501
@@ -333,7 +333,7 @@ def delete_client_with_http_info(self, client_uid : StrictStr, **kwargs) -> ApiR
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_client(self, client_uid : StrictStr, **kwargs) -> ClientDto: # noqa: E501
"""Get client # noqa: E501
@@ -361,7 +361,7 @@ def get_client(self, client_uid : StrictStr, **kwargs) -> ClientDto: # noqa: E5
raise ValueError("Error! Please call the get_client_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_client_with_http_info(client_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_client_with_http_info(self, client_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get client # noqa: E501
@@ -481,8 +481,8 @@ def get_client_with_http_info(self, client_uid : StrictStr, **kwargs) -> ApiResp
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_clients(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the Client")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoClientDto: # noqa: E501
+ @validate_call
+ def list_clients(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the Client")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoClientDto: # noqa: E501
"""List clients # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -519,8 +519,8 @@ def list_clients(self, name : Annotated[Optional[StrictStr], Field(description="
raise ValueError("Error! Please call the list_clients_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_clients_with_http_info(name, created_by, sort, order, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_clients_with_http_info(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the Client")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_clients_with_http_info(self, name : Annotated[Optional[StrictStr], Field(description="Unique name of the Client")] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List clients # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -669,7 +669,7 @@ def list_clients_with_http_info(self, name : Annotated[Optional[StrictStr], Fiel
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_client(self, client_uid : StrictStr, body : ClientEditDto, **kwargs) -> ClientDto: # noqa: E501
"""Edit client # noqa: E501
@@ -699,7 +699,7 @@ def update_client(self, client_uid : StrictStr, body : ClientEditDto, **kwargs)
raise ValueError("Error! Please call the update_client_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_client_with_http_info(client_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_client_with_http_info(self, client_uid : StrictStr, body : ClientEditDto, **kwargs) -> ApiResponse: # noqa: E501
"""Edit client # noqa: E501
diff --git a/phrasetms_client/api/connector_api.py b/phrasetms_client/api/connector_api.py
index ea22e358..25884efa 100644
--- a/phrasetms_client/api/connector_api.py
+++ b/phrasetms_client/api/connector_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import StringConstraints, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional, Union
-from pydantic import Field, StrictBool, StrictBytes, StrictStr, constr, validator
+from pydantic import Field, StrictBool, StrictBytes, StrictStr, StringConstraints
-from typing import Optional, Union
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
from phrasetms_client.models.async_file_op_response_dto import AsyncFileOpResponseDto
@@ -53,7 +53,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def edit_connector(self, connector_id : StrictStr, connection_test : Annotated[Optional[StrictBool], Field(description="For running connection test")] = None, body : Optional[AbstractConnectorDto] = None, **kwargs) -> ConnectorCreateResponseDto: # noqa: E501
"""Edit connector # noqa: E501
@@ -86,7 +86,7 @@ def edit_connector(self, connector_id : StrictStr, connection_test : Annotated[O
raise ValueError("Error! Please call the edit_connector_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_connector_with_http_info(connector_id, connection_test, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_connector_with_http_info(self, connector_id : StrictStr, connection_test : Annotated[Optional[StrictBool], Field(description="For running connection test")] = None, body : Optional[AbstractConnectorDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit connector # noqa: E501
@@ -226,7 +226,7 @@ def edit_connector_with_http_info(self, connector_id : StrictStr, connection_tes
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_connector(self, connector_id : StrictStr, **kwargs) -> ConnectorDto: # noqa: E501
"""Get a connector # noqa: E501
@@ -254,7 +254,7 @@ def get_connector(self, connector_id : StrictStr, **kwargs) -> ConnectorDto: #
raise ValueError("Error! Please call the get_connector_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_connector_with_http_info(connector_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_connector_with_http_info(self, connector_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get a connector # noqa: E501
@@ -374,7 +374,7 @@ def get_connector_with_http_info(self, connector_id : StrictStr, **kwargs) -> Ap
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_connector_list(self, type : Optional[StrictStr] = None, **kwargs) -> ConnectorListDto: # noqa: E501
"""List connectors # noqa: E501
@@ -402,7 +402,7 @@ def get_connector_list(self, type : Optional[StrictStr] = None, **kwargs) -> Con
raise ValueError("Error! Please call the get_connector_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_connector_list_with_http_info(type, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_connector_list_with_http_info(self, type : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List connectors # noqa: E501
@@ -522,7 +522,7 @@ def get_connector_list_with_http_info(self, type : Optional[StrictStr] = None, *
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_file(self, connector_id : StrictStr, folder : StrictStr, file : StrictStr, **kwargs) -> InputStreamLength: # noqa: E501
"""Download file # noqa: E501
@@ -555,7 +555,7 @@ def get_file(self, connector_id : StrictStr, folder : StrictStr, file : StrictSt
raise ValueError("Error! Please call the get_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_file_with_http_info(connector_id, folder, file, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_file_with_http_info(self, connector_id : StrictStr, folder : StrictStr, file : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Download file # noqa: E501
@@ -688,7 +688,7 @@ def get_file_with_http_info(self, connector_id : StrictStr, folder : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_file1(self, connector_id : StrictStr, folder : StrictStr, file : StrictStr, body : Optional[GetFileRequestParamsDto] = None, **kwargs) -> AsyncFileOpResponseDto: # noqa: E501
"""Download file (async) # noqa: E501
@@ -723,7 +723,7 @@ def get_file1(self, connector_id : StrictStr, folder : StrictStr, file : StrictS
raise ValueError("Error! Please call the get_file1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_file1_with_http_info(connector_id, folder, file, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_file1_with_http_info(self, connector_id : StrictStr, folder : StrictStr, file : StrictStr, body : Optional[GetFileRequestParamsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download file (async) # noqa: E501
@@ -869,8 +869,8 @@ def get_file1_with_http_info(self, connector_id : StrictStr, folder : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_folder(self, connector_id : StrictStr, folder : StrictStr, project_uid : Optional[StrictStr] = None, file_type : Optional[constr(strict=True)] = None, sort : Optional[constr(strict=True)] = None, direction : Optional[constr(strict=True)] = None, **kwargs) -> FileListDto: # noqa: E501
+ @validate_call
+ def get_folder(self, connector_id : StrictStr, folder : StrictStr, project_uid : Optional[StrictStr] = None, file_type : Optional[Annotated[str, StringConstraints(strict=True)]] = None, sort : Optional[Annotated[str, StringConstraints(strict=True)]] = None, direction : Optional[Annotated[str, StringConstraints(strict=True)]] = None, **kwargs) -> FileListDto: # noqa: E501
"""List files in a subfolder # noqa: E501
List files in a subfolder of the selected connector # noqa: E501
@@ -908,8 +908,8 @@ def get_folder(self, connector_id : StrictStr, folder : StrictStr, project_uid :
raise ValueError("Error! Please call the get_folder_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_folder_with_http_info(connector_id, folder, project_uid, file_type, sort, direction, **kwargs) # noqa: E501
- @validate_arguments
- def get_folder_with_http_info(self, connector_id : StrictStr, folder : StrictStr, project_uid : Optional[StrictStr] = None, file_type : Optional[constr(strict=True)] = None, sort : Optional[constr(strict=True)] = None, direction : Optional[constr(strict=True)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_folder_with_http_info(self, connector_id : StrictStr, folder : StrictStr, project_uid : Optional[StrictStr] = None, file_type : Optional[Annotated[str, StringConstraints(strict=True)]] = None, sort : Optional[Annotated[str, StringConstraints(strict=True)]] = None, direction : Optional[Annotated[str, StringConstraints(strict=True)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List files in a subfolder # noqa: E501
List files in a subfolder of the selected connector # noqa: E501
@@ -1059,7 +1059,7 @@ def get_folder_with_http_info(self, connector_id : StrictStr, folder : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_prepared_file(self, connector_id : StrictStr, folder : StrictStr, file : StrictStr, task_id : StrictStr, **kwargs) -> InputStreamLength: # noqa: E501
"""Download prepared file # noqa: E501
@@ -1094,7 +1094,7 @@ def get_prepared_file(self, connector_id : StrictStr, folder : StrictStr, file :
raise ValueError("Error! Please call the get_prepared_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_prepared_file_with_http_info(connector_id, folder, file, task_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_prepared_file_with_http_info(self, connector_id : StrictStr, folder : StrictStr, file : StrictStr, task_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Download prepared file # noqa: E501
@@ -1233,8 +1233,8 @@ def get_prepared_file_with_http_info(self, connector_id : StrictStr, folder : St
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_root_folder(self, connector_id : StrictStr, file_type : Optional[constr(strict=True)] = None, sort : Optional[constr(strict=True)] = None, direction : Optional[constr(strict=True)] = None, **kwargs) -> FileListDto: # noqa: E501
+ @validate_call
+ def get_root_folder(self, connector_id : StrictStr, file_type : Optional[Annotated[str, StringConstraints(strict=True)]] = None, sort : Optional[Annotated[str, StringConstraints(strict=True)]] = None, direction : Optional[Annotated[str, StringConstraints(strict=True)]] = None, **kwargs) -> FileListDto: # noqa: E501
"""List files in root # noqa: E501
List files in a root folder of the selected connector # noqa: E501
@@ -1268,8 +1268,8 @@ def get_root_folder(self, connector_id : StrictStr, file_type : Optional[constr(
raise ValueError("Error! Please call the get_root_folder_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_root_folder_with_http_info(connector_id, file_type, sort, direction, **kwargs) # noqa: E501
- @validate_arguments
- def get_root_folder_with_http_info(self, connector_id : StrictStr, file_type : Optional[constr(strict=True)] = None, sort : Optional[constr(strict=True)] = None, direction : Optional[constr(strict=True)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_root_folder_with_http_info(self, connector_id : StrictStr, file_type : Optional[Annotated[str, StringConstraints(strict=True)]] = None, sort : Optional[Annotated[str, StringConstraints(strict=True)]] = None, direction : Optional[Annotated[str, StringConstraints(strict=True)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List files in root # noqa: E501
List files in a root folder of the selected connector # noqa: E501
@@ -1407,7 +1407,7 @@ def get_root_folder_with_http_info(self, connector_id : StrictStr, file_type : O
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def upload_file(self, connector_id : StrictStr, folder : StrictStr, content_type : StrictStr, file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="Translated file to upload")], source_file_name : Annotated[Optional[StrictStr], Field(description="Name or ID of the original file")] = None, subfolder_name : Annotated[Optional[StrictStr], Field(description="Optional subfolder to upload the file to")] = None, mime_type : Annotated[Optional[StrictStr], Field(description="Mime type of the file to upload")] = None, commit_message : Annotated[Optional[StrictStr], Field(description="Commit message for upload to Git, etc.")] = None, **kwargs) -> UploadResultDto: # noqa: E501
"""Upload a file to a subfolder of the selected connector # noqa: E501
@@ -1450,7 +1450,7 @@ def upload_file(self, connector_id : StrictStr, folder : StrictStr, content_type
raise ValueError("Error! Please call the upload_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.upload_file_with_http_info(connector_id, folder, content_type, file, source_file_name, subfolder_name, mime_type, commit_message, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def upload_file_with_http_info(self, connector_id : StrictStr, folder : StrictStr, content_type : StrictStr, file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="Translated file to upload")], source_file_name : Annotated[Optional[StrictStr], Field(description="Name or ID of the original file")] = None, subfolder_name : Annotated[Optional[StrictStr], Field(description="Optional subfolder to upload the file to")] = None, mime_type : Annotated[Optional[StrictStr], Field(description="Mime type of the file to upload")] = None, commit_message : Annotated[Optional[StrictStr], Field(description="Commit message for upload to Git, etc.")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Upload a file to a subfolder of the selected connector # noqa: E501
@@ -1620,7 +1620,7 @@ def upload_file_with_http_info(self, connector_id : StrictStr, folder : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def upload_file1(self, connector_id : StrictStr, folder : StrictStr, file_name : StrictStr, memsource : StrictStr, content_type : StrictStr, file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="Translated file to upload")], mime_type : Annotated[Optional[StrictStr], Field(description="Mime type of the file to upload")] = None, **kwargs) -> AsyncFileOpResponseDto: # noqa: E501
"""Upload file (async) # noqa: E501
@@ -1661,7 +1661,7 @@ def upload_file1(self, connector_id : StrictStr, folder : StrictStr, file_name :
raise ValueError("Error! Please call the upload_file1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.upload_file1_with_http_info(connector_id, folder, file_name, memsource, content_type, file, mime_type, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def upload_file1_with_http_info(self, connector_id : StrictStr, folder : StrictStr, file_name : StrictStr, memsource : StrictStr, content_type : StrictStr, file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="Translated file to upload")], mime_type : Annotated[Optional[StrictStr], Field(description="Mime type of the file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Upload file (async) # noqa: E501
diff --git a/phrasetms_client/api/conversations_api.py b/phrasetms_client/api/conversations_api.py
index f007fbb1..c9708120 100644
--- a/phrasetms_client/api/conversations_api.py
+++ b/phrasetms_client/api/conversations_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
+from typing import Optional
from pydantic import StrictBool, StrictStr
-from typing import Optional
from phrasetms_client.models.add_comment_dto import AddCommentDto
from phrasetms_client.models.add_lqa_comment_result_dto import AddLqaCommentResultDto
@@ -57,7 +57,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def add_lqa_comment1(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> AddLqaCommentResultDto: # noqa: E501
"""Add LQA comment # noqa: E501
@@ -89,7 +89,7 @@ def add_lqa_comment1(self, job_uid : StrictStr, conversation_id : StrictStr, bod
raise ValueError("Error! Please call the add_lqa_comment1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_lqa_comment1_with_http_info(job_uid, conversation_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_lqa_comment1_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add LQA comment # noqa: E501
@@ -228,7 +228,7 @@ def add_lqa_comment1_with_http_info(self, job_uid : StrictStr, conversation_id :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def add_plain_comment2(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> AddPlainCommentResultDto: # noqa: E501
"""Add plain comment # noqa: E501
@@ -260,7 +260,7 @@ def add_plain_comment2(self, job_uid : StrictStr, conversation_id : StrictStr, b
raise ValueError("Error! Please call the add_plain_comment2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_plain_comment2_with_http_info(job_uid, conversation_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_plain_comment2_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add plain comment # noqa: E501
@@ -399,7 +399,7 @@ def add_plain_comment2_with_http_info(self, job_uid : StrictStr, conversation_id
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_lqa_conversation1(self, job_uid : StrictStr, body : Optional[CreateLqaConversationDto] = None, **kwargs) -> LQAConversationDto: # noqa: E501
"""Create LQA conversation # noqa: E501
@@ -429,7 +429,7 @@ def create_lqa_conversation1(self, job_uid : StrictStr, body : Optional[CreateLq
raise ValueError("Error! Please call the create_lqa_conversation1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_lqa_conversation1_with_http_info(job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_lqa_conversation1_with_http_info(self, job_uid : StrictStr, body : Optional[CreateLqaConversationDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create LQA conversation # noqa: E501
@@ -562,7 +562,7 @@ def create_lqa_conversation1_with_http_info(self, job_uid : StrictStr, body : Op
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_segment_target_conversation1(self, job_uid : StrictStr, body : Optional[CreatePlainConversationDto] = None, **kwargs) -> PlainConversationDto: # noqa: E501
"""Create plain conversation # noqa: E501
@@ -592,7 +592,7 @@ def create_segment_target_conversation1(self, job_uid : StrictStr, body : Option
raise ValueError("Error! Please call the create_segment_target_conversation1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_segment_target_conversation1_with_http_info(job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_segment_target_conversation1_with_http_info(self, job_uid : StrictStr, body : Optional[CreatePlainConversationDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create plain conversation # noqa: E501
@@ -725,7 +725,7 @@ def create_segment_target_conversation1_with_http_info(self, job_uid : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_lqa_comment(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete LQA comment # noqa: E501
@@ -757,7 +757,7 @@ def delete_lqa_comment(self, job_uid : StrictStr, conversation_id : StrictStr, c
raise ValueError("Error! Please call the delete_lqa_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_lqa_comment_with_http_info(job_uid, conversation_id, comment_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_lqa_comment_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete LQA comment # noqa: E501
@@ -872,7 +872,7 @@ def delete_lqa_comment_with_http_info(self, job_uid : StrictStr, conversation_id
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_lqa_conversation(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete LQA conversation # noqa: E501
@@ -902,7 +902,7 @@ def delete_lqa_conversation(self, job_uid : StrictStr, conversation_id : StrictS
raise ValueError("Error! Please call the delete_lqa_conversation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_lqa_conversation_with_http_info(job_uid, conversation_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_lqa_conversation_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete LQA conversation # noqa: E501
@@ -1011,7 +1011,7 @@ def delete_lqa_conversation_with_http_info(self, job_uid : StrictStr, conversati
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_plain_comment(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete plain comment # noqa: E501
@@ -1043,7 +1043,7 @@ def delete_plain_comment(self, job_uid : StrictStr, conversation_id : StrictStr,
raise ValueError("Error! Please call the delete_plain_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_plain_comment_with_http_info(job_uid, conversation_id, comment_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_plain_comment_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete plain comment # noqa: E501
@@ -1158,7 +1158,7 @@ def delete_plain_comment_with_http_info(self, job_uid : StrictStr, conversation_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_plain_conversation(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete plain conversation # noqa: E501
@@ -1188,7 +1188,7 @@ def delete_plain_conversation(self, job_uid : StrictStr, conversation_id : Stric
raise ValueError("Error! Please call the delete_plain_conversation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_plain_conversation_with_http_info(job_uid, conversation_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_plain_conversation_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete plain conversation # noqa: E501
@@ -1297,7 +1297,7 @@ def delete_plain_conversation_with_http_info(self, job_uid : StrictStr, conversa
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def find_conversations(self, body : Optional[FindConversationsDto] = None, **kwargs) -> ConversationListDto: # noqa: E501
"""Find all conversation # noqa: E501
@@ -1325,7 +1325,7 @@ def find_conversations(self, body : Optional[FindConversationsDto] = None, **kwa
raise ValueError("Error! Please call the find_conversations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.find_conversations_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def find_conversations_with_http_info(self, body : Optional[FindConversationsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Find all conversation # noqa: E501
@@ -1452,7 +1452,7 @@ def find_conversations_with_http_info(self, body : Optional[FindConversationsDto
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_lqa_conversation(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> LQAConversationDto: # noqa: E501
"""Get LQA conversation # noqa: E501
@@ -1482,7 +1482,7 @@ def get_lqa_conversation(self, job_uid : StrictStr, conversation_id : StrictStr,
raise ValueError("Error! Please call the get_lqa_conversation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_lqa_conversation_with_http_info(job_uid, conversation_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_lqa_conversation_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get LQA conversation # noqa: E501
@@ -1608,7 +1608,7 @@ def get_lqa_conversation_with_http_info(self, job_uid : StrictStr, conversation_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_plain_conversation(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> PlainConversationDto: # noqa: E501
"""Get plain conversation # noqa: E501
@@ -1638,7 +1638,7 @@ def get_plain_conversation(self, job_uid : StrictStr, conversation_id : StrictSt
raise ValueError("Error! Please call the get_plain_conversation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_plain_conversation_with_http_info(job_uid, conversation_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_plain_conversation_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get plain conversation # noqa: E501
@@ -1764,7 +1764,7 @@ def get_plain_conversation_with_http_info(self, job_uid : StrictStr, conversatio
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_all_conversations(self, job_uid : StrictStr, include_deleted : Optional[StrictBool] = None, since : Optional[StrictStr] = None, **kwargs) -> ConversationListDto: # noqa: E501
"""List all conversations # noqa: E501
@@ -1796,7 +1796,7 @@ def list_all_conversations(self, job_uid : StrictStr, include_deleted : Optional
raise ValueError("Error! Please call the list_all_conversations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_all_conversations_with_http_info(job_uid, include_deleted, since, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_all_conversations_with_http_info(self, job_uid : StrictStr, include_deleted : Optional[StrictBool] = None, since : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List all conversations # noqa: E501
@@ -1928,7 +1928,7 @@ def list_all_conversations_with_http_info(self, job_uid : StrictStr, include_del
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_lqa_conversations(self, job_uid : StrictStr, include_deleted : Optional[StrictBool] = None, since : Optional[StrictStr] = None, **kwargs) -> LQAConversationsListDto: # noqa: E501
"""List LQA conversations # noqa: E501
@@ -1960,7 +1960,7 @@ def list_lqa_conversations(self, job_uid : StrictStr, include_deleted : Optional
raise ValueError("Error! Please call the list_lqa_conversations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_lqa_conversations_with_http_info(job_uid, include_deleted, since, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_lqa_conversations_with_http_info(self, job_uid : StrictStr, include_deleted : Optional[StrictBool] = None, since : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List LQA conversations # noqa: E501
@@ -2092,7 +2092,7 @@ def list_lqa_conversations_with_http_info(self, job_uid : StrictStr, include_del
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_plain_conversations(self, job_uid : StrictStr, include_deleted : Optional[StrictBool] = None, since : Optional[StrictStr] = None, **kwargs) -> PlainConversationsListDto: # noqa: E501
"""List plain conversations # noqa: E501
@@ -2124,7 +2124,7 @@ def list_plain_conversations(self, job_uid : StrictStr, include_deleted : Option
raise ValueError("Error! Please call the list_plain_conversations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_plain_conversations_with_http_info(job_uid, include_deleted, since, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_plain_conversations_with_http_info(self, job_uid : StrictStr, include_deleted : Optional[StrictBool] = None, since : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List plain conversations # noqa: E501
@@ -2256,7 +2256,7 @@ def list_plain_conversations_with_http_info(self, job_uid : StrictStr, include_d
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_lqa_comment1(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> LQAConversationDto: # noqa: E501
"""Edit LQA comment # noqa: E501
@@ -2290,7 +2290,7 @@ def update_lqa_comment1(self, job_uid : StrictStr, conversation_id : StrictStr,
raise ValueError("Error! Please call the update_lqa_comment1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_lqa_comment1_with_http_info(job_uid, conversation_id, comment_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_lqa_comment1_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit LQA comment # noqa: E501
@@ -2435,7 +2435,7 @@ def update_lqa_comment1_with_http_info(self, job_uid : StrictStr, conversation_i
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_lqa_conversation1(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[EditLqaConversationDto] = None, **kwargs) -> LQAConversationDto: # noqa: E501
"""Update LQA conversation # noqa: E501
@@ -2467,7 +2467,7 @@ def update_lqa_conversation1(self, job_uid : StrictStr, conversation_id : Strict
raise ValueError("Error! Please call the update_lqa_conversation1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_lqa_conversation1_with_http_info(job_uid, conversation_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_lqa_conversation1_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[EditLqaConversationDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update LQA conversation # noqa: E501
@@ -2606,7 +2606,7 @@ def update_lqa_conversation1_with_http_info(self, job_uid : StrictStr, conversat
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_plain_comment1(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> PlainConversationDto: # noqa: E501
"""Edit plain comment # noqa: E501
@@ -2640,7 +2640,7 @@ def update_plain_comment1(self, job_uid : StrictStr, conversation_id : StrictStr
raise ValueError("Error! Please call the update_plain_comment1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_plain_comment1_with_http_info(job_uid, conversation_id, comment_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_plain_comment1_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, comment_id : StrictStr, body : Optional[AddCommentDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit plain comment # noqa: E501
@@ -2785,7 +2785,7 @@ def update_plain_comment1_with_http_info(self, job_uid : StrictStr, conversation
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_plain_conversation(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[EditPlainConversationDto] = None, **kwargs) -> PlainConversationDto: # noqa: E501
"""Edit plain conversation # noqa: E501
@@ -2817,7 +2817,7 @@ def update_plain_conversation(self, job_uid : StrictStr, conversation_id : Stric
raise ValueError("Error! Please call the update_plain_conversation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_plain_conversation_with_http_info(job_uid, conversation_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_plain_conversation_with_http_info(self, job_uid : StrictStr, conversation_id : StrictStr, body : Optional[EditPlainConversationDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit plain conversation # noqa: E501
diff --git a/phrasetms_client/api/cost_center_api.py b/phrasetms_client/api/cost_center_api.py
index 417a70b4..300ebcd9 100644
--- a/phrasetms_client/api/cost_center_api.py
+++ b/phrasetms_client/api/cost_center_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.cost_center_dto import CostCenterDto
from phrasetms_client.models.cost_center_edit_dto import CostCenterEditDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_cost_center(self, body : CostCenterEditDto, **kwargs) -> CostCenterDto: # noqa: E501
"""Create cost center # noqa: E501
@@ -75,7 +75,7 @@ def create_cost_center(self, body : CostCenterEditDto, **kwargs) -> CostCenterDt
raise ValueError("Error! Please call the create_cost_center_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_cost_center_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_cost_center_with_http_info(self, body : CostCenterEditDto, **kwargs) -> ApiResponse: # noqa: E501
"""Create cost center # noqa: E501
@@ -202,7 +202,7 @@ def create_cost_center_with_http_info(self, body : CostCenterEditDto, **kwargs)
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_cost_center(self, cost_center_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete cost center # noqa: E501
@@ -230,7 +230,7 @@ def delete_cost_center(self, cost_center_uid : StrictStr, **kwargs) -> None: #
raise ValueError("Error! Please call the delete_cost_center_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_cost_center_with_http_info(cost_center_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_cost_center_with_http_info(self, cost_center_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete cost center # noqa: E501
@@ -333,7 +333,7 @@ def delete_cost_center_with_http_info(self, cost_center_uid : StrictStr, **kwarg
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_cost_center(self, cost_center_uid : StrictStr, **kwargs) -> CostCenterDto: # noqa: E501
"""Get cost center # noqa: E501
@@ -361,7 +361,7 @@ def get_cost_center(self, cost_center_uid : StrictStr, **kwargs) -> CostCenterDt
raise ValueError("Error! Please call the get_cost_center_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_cost_center_with_http_info(cost_center_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_cost_center_with_http_info(self, cost_center_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get cost center # noqa: E501
@@ -481,8 +481,8 @@ def get_cost_center_with_http_info(self, cost_center_uid : StrictStr, **kwargs)
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_cost_centers(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoCostCenterDto: # noqa: E501
+ @validate_call
+ def list_cost_centers(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoCostCenterDto: # noqa: E501
"""List of cost centers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -519,8 +519,8 @@ def list_cost_centers(self, name : Optional[StrictStr] = None, created_by : Anno
raise ValueError("Error! Please call the list_cost_centers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_cost_centers_with_http_info(name, created_by, sort, order, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_cost_centers_with_http_info(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_cost_centers_with_http_info(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List of cost centers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -669,7 +669,7 @@ def list_cost_centers_with_http_info(self, name : Optional[StrictStr] = None, cr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_cost_center(self, cost_center_uid : StrictStr, body : Optional[CostCenterEditDto] = None, **kwargs) -> CostCenterDto: # noqa: E501
"""Edit cost center # noqa: E501
@@ -699,7 +699,7 @@ def update_cost_center(self, cost_center_uid : StrictStr, body : Optional[CostCe
raise ValueError("Error! Please call the update_cost_center_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_cost_center_with_http_info(cost_center_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_cost_center_with_http_info(self, cost_center_uid : StrictStr, body : Optional[CostCenterEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit cost center # noqa: E501
diff --git a/phrasetms_client/api/custom_fields_api.py b/phrasetms_client/api/custom_fields_api.py
index 4affebf5..cb9d3ffe 100644
--- a/phrasetms_client/api/custom_fields_api.py
+++ b/phrasetms_client/api/custom_fields_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictBool, StrictStr, conint, conlist, validator
+from pydantic import Field, StrictBool, StrictStr
-from typing import Optional
from phrasetms_client.models.create_custom_field_dto import CreateCustomFieldDto
from phrasetms_client.models.custom_field_dto import CustomFieldDto
@@ -48,7 +48,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_custom_field(self, body : Optional[CreateCustomFieldDto] = None, **kwargs) -> CustomFieldDto: # noqa: E501
"""Create custom field # noqa: E501
@@ -76,7 +76,7 @@ def create_custom_field(self, body : Optional[CreateCustomFieldDto] = None, **kw
raise ValueError("Error! Please call the create_custom_field_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_custom_field_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_custom_field_with_http_info(self, body : Optional[CreateCustomFieldDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create custom field # noqa: E501
@@ -203,7 +203,7 @@ def create_custom_field_with_http_info(self, body : Optional[CreateCustomFieldDt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_custom_field(self, field_uid : StrictStr, **kwargs) -> CustomFieldDto: # noqa: E501
"""Get custom field # noqa: E501
@@ -231,7 +231,7 @@ def get_custom_field(self, field_uid : StrictStr, **kwargs) -> CustomFieldDto:
raise ValueError("Error! Please call the get_custom_field_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_field_with_http_info(field_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_custom_field_with_http_info(self, field_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get custom field # noqa: E501
@@ -351,8 +351,8 @@ def get_custom_field_with_http_info(self, field_uid : StrictStr, **kwargs) -> Ap
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_custom_field_list(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="Filter by custom field name")] = None, allowed_entities : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field allowed entities")] = None, types : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field types")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field updaters UIDs")] = None, uids : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field UIDs")] = None, required : Annotated[Optional[StrictBool], Field(description="Filter by custom field required parameter")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldDto: # noqa: E501
+ @validate_call
+ def get_custom_field_list(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="Filter by custom field name")] = None, allowed_entities : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field allowed entities")] = None, types : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field types")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field updaters UIDs")] = None, uids : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field UIDs")] = None, required : Annotated[Optional[StrictBool], Field(description="Filter by custom field required parameter")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldDto: # noqa: E501
"""Lists custom fields # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -399,8 +399,8 @@ def get_custom_field_list(self, page_number : Annotated[Optional[conint(strict=T
raise ValueError("Error! Please call the get_custom_field_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_field_list_with_http_info(page_number, page_size, name, allowed_entities, types, created_by, modified_by, uids, required, sort_field, sort_trend, **kwargs) # noqa: E501
- @validate_arguments
- def get_custom_field_list_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="Filter by custom field name")] = None, allowed_entities : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field allowed entities")] = None, types : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field types")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field updaters UIDs")] = None, uids : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by custom field UIDs")] = None, required : Annotated[Optional[StrictBool], Field(description="Filter by custom field required parameter")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_custom_field_list_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="Filter by custom field name")] = None, allowed_entities : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field allowed entities")] = None, types : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field types")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field updaters UIDs")] = None, uids : Annotated[Optional[List[StrictStr]], Field(description="Filter by custom field UIDs")] = None, required : Annotated[Optional[StrictBool], Field(description="Filter by custom field required parameter")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Lists custom fields # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -584,8 +584,8 @@ def get_custom_field_list_with_http_info(self, page_number : Annotated[Optional[
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_custom_field_option_list(self, field_uid : StrictStr, 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="Filter by option name")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldOptionDto: # noqa: E501
+ @validate_call
+ def get_custom_field_option_list(self, field_uid : StrictStr, 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="Filter by option name")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldOptionDto: # noqa: E501
"""Lists options of custom field # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -622,8 +622,8 @@ def get_custom_field_option_list(self, field_uid : StrictStr, page_number : Anno
raise ValueError("Error! Please call the get_custom_field_option_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_field_option_list_with_http_info(field_uid, page_number, page_size, name, sort_field, sort_trend, **kwargs) # noqa: E501
- @validate_arguments
- def get_custom_field_option_list_with_http_info(self, field_uid : StrictStr, 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="Filter by option name")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_custom_field_option_list_with_http_info(self, field_uid : StrictStr, 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="Filter by option name")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Lists options of custom field # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/custom_file_type_api.py b/phrasetms_client/api/custom_file_type_api.py
index a31721f9..42566b02 100644
--- a/phrasetms_client/api/custom_file_type_api.py
+++ b/phrasetms_client/api/custom_file_type_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.create_custom_file_type_dto import CreateCustomFileTypeDto
from phrasetms_client.models.custom_file_type_dto import CustomFileTypeDto
@@ -49,7 +49,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_custom_file_types(self, body : Optional[CreateCustomFileTypeDto] = None, **kwargs) -> CustomFileTypeDto: # noqa: E501
"""Create custom file type # noqa: E501
@@ -77,7 +77,7 @@ def create_custom_file_types(self, body : Optional[CreateCustomFileTypeDto] = No
raise ValueError("Error! Please call the create_custom_file_types_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_custom_file_types_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_custom_file_types_with_http_info(self, body : Optional[CreateCustomFileTypeDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create custom file type # noqa: E501
@@ -204,7 +204,7 @@ def create_custom_file_types_with_http_info(self, body : Optional[CreateCustomFi
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_batch_custom_file_type(self, body : Optional[DeleteCustomFileTypeDto] = None, **kwargs) -> None: # noqa: E501
"""Delete multiple Custom file type # noqa: E501
@@ -232,7 +232,7 @@ def delete_batch_custom_file_type(self, body : Optional[DeleteCustomFileTypeDto]
raise ValueError("Error! Please call the delete_batch_custom_file_type_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_batch_custom_file_type_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_batch_custom_file_type_with_http_info(self, body : Optional[DeleteCustomFileTypeDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete multiple Custom file type # noqa: E501
@@ -342,7 +342,7 @@ def delete_batch_custom_file_type_with_http_info(self, body : Optional[DeleteCus
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_custom_file_type(self, custom_file_type_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete Custom file type # noqa: E501
@@ -370,7 +370,7 @@ def delete_custom_file_type(self, custom_file_type_uid : StrictStr, **kwargs) ->
raise ValueError("Error! Please call the delete_custom_file_type_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_custom_file_type_with_http_info(custom_file_type_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_custom_file_type_with_http_info(self, custom_file_type_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete Custom file type # noqa: E501
@@ -473,8 +473,8 @@ def delete_custom_file_type_with_http_info(self, custom_file_type_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_all_custom_file_type(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, **kwargs) -> PageDtoCustomFileTypeDto: # noqa: E501
+ @validate_call
+ def get_all_custom_file_type(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, **kwargs) -> PageDtoCustomFileTypeDto: # noqa: E501
"""Get All Custom file type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -503,8 +503,8 @@ def get_all_custom_file_type(self, page_number : Annotated[Optional[conint(stric
raise ValueError("Error! Please call the get_all_custom_file_type_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_all_custom_file_type_with_http_info(page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_all_custom_file_type_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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_all_custom_file_type_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, **kwargs) -> ApiResponse: # noqa: E501
"""Get All Custom file type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -629,7 +629,7 @@ def get_all_custom_file_type_with_http_info(self, page_number : Annotated[Option
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_custom_file_type(self, custom_file_type_uid : StrictStr, **kwargs) -> CustomFileTypeDto: # noqa: E501
"""Get Custom file type # noqa: E501
@@ -657,7 +657,7 @@ def get_custom_file_type(self, custom_file_type_uid : StrictStr, **kwargs) -> Cu
raise ValueError("Error! Please call the get_custom_file_type_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_file_type_with_http_info(custom_file_type_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_custom_file_type_with_http_info(self, custom_file_type_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get Custom file type # noqa: E501
@@ -777,7 +777,7 @@ def get_custom_file_type_with_http_info(self, custom_file_type_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_custom_file_type(self, custom_file_type_uid : StrictStr, body : Optional[UpdateCustomFileTypeDto] = None, **kwargs) -> CustomFileTypeDto: # noqa: E501
"""Update Custom file type # noqa: E501
@@ -807,7 +807,7 @@ def update_custom_file_type(self, custom_file_type_uid : StrictStr, body : Optio
raise ValueError("Error! Please call the update_custom_file_type_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_custom_file_type_with_http_info(custom_file_type_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_custom_file_type_with_http_info(self, custom_file_type_uid : StrictStr, body : Optional[UpdateCustomFileTypeDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update Custom file type # noqa: E501
diff --git a/phrasetms_client/api/domain_api.py b/phrasetms_client/api/domain_api.py
index 0e8e4964..cd65eb74 100644
--- a/phrasetms_client/api/domain_api.py
+++ b/phrasetms_client/api/domain_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.domain_dto import DomainDto
from phrasetms_client.models.domain_edit_dto import DomainEditDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_domain(self, body : Optional[DomainEditDto] = None, **kwargs) -> DomainDto: # noqa: E501
"""Create domain # noqa: E501
@@ -75,7 +75,7 @@ def create_domain(self, body : Optional[DomainEditDto] = None, **kwargs) -> Doma
raise ValueError("Error! Please call the create_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_domain_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_domain_with_http_info(self, body : Optional[DomainEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create domain # noqa: E501
@@ -202,7 +202,7 @@ def create_domain_with_http_info(self, body : Optional[DomainEditDto] = None, **
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_domain(self, domain_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete domain # noqa: E501
@@ -230,7 +230,7 @@ def delete_domain(self, domain_uid : StrictStr, **kwargs) -> None: # noqa: E501
raise ValueError("Error! Please call the delete_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_domain_with_http_info(domain_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_domain_with_http_info(self, domain_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete domain # noqa: E501
@@ -333,7 +333,7 @@ def delete_domain_with_http_info(self, domain_uid : StrictStr, **kwargs) -> ApiR
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_domain(self, domain_uid : StrictStr, **kwargs) -> DomainDto: # noqa: E501
"""Get domain # noqa: E501
@@ -361,7 +361,7 @@ def get_domain(self, domain_uid : StrictStr, **kwargs) -> DomainDto: # noqa: E5
raise ValueError("Error! Please call the get_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_domain_with_http_info(domain_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_domain_with_http_info(self, domain_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get domain # noqa: E501
@@ -481,8 +481,8 @@ def get_domain_with_http_info(self, domain_uid : StrictStr, **kwargs) -> ApiResp
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_domains(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoDomainDto: # noqa: E501
+ @validate_call
+ def list_domains(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoDomainDto: # noqa: E501
"""List of domains # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -519,8 +519,8 @@ def list_domains(self, name : Optional[StrictStr] = None, created_by : Annotated
raise ValueError("Error! Please call the list_domains_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_domains_with_http_info(name, created_by, sort, order, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_domains_with_http_info(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_domains_with_http_info(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List of domains # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -669,7 +669,7 @@ def list_domains_with_http_info(self, name : Optional[StrictStr] = None, created
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_domain(self, domain_uid : StrictStr, body : Optional[DomainEditDto] = None, **kwargs) -> DomainDto: # noqa: E501
"""Edit domain # noqa: E501
@@ -699,7 +699,7 @@ def update_domain(self, domain_uid : StrictStr, body : Optional[DomainEditDto] =
raise ValueError("Error! Please call the update_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_domain_with_http_info(domain_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_domain_with_http_info(self, domain_uid : StrictStr, body : Optional[DomainEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit domain # noqa: E501
diff --git a/phrasetms_client/api/email_template_api.py b/phrasetms_client/api/email_template_api.py
index 13515b1e..30cddc2e 100644
--- a/phrasetms_client/api/email_template_api.py
+++ b/phrasetms_client/api/email_template_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.organization_email_template_dto import OrganizationEmailTemplateDto
from phrasetms_client.models.page_dto_organization_email_template_dto import PageDtoOrganizationEmailTemplateDto
@@ -46,7 +46,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def get_org_email_template(self, template_uid : StrictStr, **kwargs) -> OrganizationEmailTemplateDto: # noqa: E501
"""Get email template # noqa: E501
@@ -74,7 +74,7 @@ def get_org_email_template(self, template_uid : StrictStr, **kwargs) -> Organiza
raise ValueError("Error! Please call the get_org_email_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_org_email_template_with_http_info(template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_org_email_template_with_http_info(self, template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get email template # noqa: E501
@@ -194,8 +194,8 @@ def get_org_email_template_with_http_info(self, template_uid : StrictStr, **kwar
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_org_email_templates(self, type : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoOrganizationEmailTemplateDto: # noqa: E501
+ @validate_call
+ def list_org_email_templates(self, type : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoOrganizationEmailTemplateDto: # noqa: E501
"""List email templates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -226,8 +226,8 @@ def list_org_email_templates(self, type : Optional[StrictStr] = None, page_numbe
raise ValueError("Error! Please call the list_org_email_templates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_org_email_templates_with_http_info(type, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_org_email_templates_with_http_info(self, type : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_org_email_templates_with_http_info(self, type : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List email templates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/file_api.py b/phrasetms_client/api/file_api.py
index a8d41bc8..e605c7ff 100644
--- a/phrasetms_client/api/file_api.py
+++ b/phrasetms_client/api/file_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictInt, StrictStr, conint, conlist
+from pydantic import Field, StrictInt, StrictStr
-from typing import Optional
from phrasetms_client.models.page_dto_uploaded_file_dto import PageDtoUploadedFileDto
from phrasetms_client.models.remote_uploaded_file_dto import RemoteUploadedFileDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_url_file(self, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?filename\\*=UTF-8''(.+)`")], body : Annotated[RemoteUploadedFileDto, Field(..., description="file")], **kwargs) -> UploadedFileDto: # noqa: E501
"""Upload file # noqa: E501
@@ -78,7 +78,7 @@ def create_url_file(self, content_disposition : Annotated[StrictStr, Field(...,
raise ValueError("Error! Please call the create_url_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_url_file_with_http_info(content_disposition, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_url_file_with_http_info(self, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?filename\\*=UTF-8''(.+)`")], body : Annotated[RemoteUploadedFileDto, Field(..., description="file")], **kwargs) -> ApiResponse: # noqa: E501
"""Upload file # noqa: E501
@@ -212,7 +212,7 @@ def create_url_file_with_http_info(self, content_disposition : Annotated[StrictS
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def deletes_file(self, file_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete file # noqa: E501
@@ -240,7 +240,7 @@ def deletes_file(self, file_uid : StrictStr, **kwargs) -> None: # noqa: E501
raise ValueError("Error! Please call the deletes_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.deletes_file_with_http_info(file_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def deletes_file_with_http_info(self, file_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete file # noqa: E501
@@ -343,7 +343,7 @@ def deletes_file_with_http_info(self, file_uid : StrictStr, **kwargs) -> ApiResp
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_file_json(self, file_uid : StrictStr, **kwargs) -> UploadedFileDto: # noqa: E501
"""Get file # noqa: E501
@@ -372,7 +372,7 @@ def get_file_json(self, file_uid : StrictStr, **kwargs) -> UploadedFileDto: # n
raise ValueError("Error! Please call the get_file_json_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_file_json_with_http_info(file_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_file_json_with_http_info(self, file_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get file # noqa: E501
@@ -493,8 +493,8 @@ def get_file_json_with_http_info(self, file_uid : StrictStr, **kwargs) -> ApiRes
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_files(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 : Optional[StrictStr] = None, types : Optional[conlist(StrictStr)] = None, created_by : Optional[StrictInt] = None, bigger_than : Annotated[Optional[StrictInt], Field(description="Size in bytes")] = None, **kwargs) -> PageDtoUploadedFileDto: # noqa: E501
+ @validate_call
+ def get_files(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 : Optional[StrictStr] = None, types : Optional[List[StrictStr]] = None, created_by : Optional[StrictInt] = None, bigger_than : Annotated[Optional[StrictInt], Field(description="Size in bytes")] = None, **kwargs) -> PageDtoUploadedFileDto: # noqa: E501
"""List files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -531,8 +531,8 @@ def get_files(self, page_number : Annotated[Optional[conint(strict=True, ge=0)],
raise ValueError("Error! Please call the get_files_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_files_with_http_info(page_number, page_size, name, types, created_by, bigger_than, **kwargs) # noqa: E501
- @validate_arguments
- def get_files_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 : Optional[StrictStr] = None, types : Optional[conlist(StrictStr)] = None, created_by : Optional[StrictInt] = None, bigger_than : Annotated[Optional[StrictInt], Field(description="Size in bytes")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_files_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 : Optional[StrictStr] = None, types : Optional[List[StrictStr]] = None, created_by : Optional[StrictInt] = None, bigger_than : Annotated[Optional[StrictInt], Field(description="Size in bytes")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/glossary_api.py b/phrasetms_client/api/glossary_api.py
index 7a1e6b90..f5fc1a33 100644
--- a/phrasetms_client/api/glossary_api.py
+++ b/phrasetms_client/api/glossary_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictBool, StrictStr, conint, conlist
+from pydantic import Field, StrictBool, StrictStr
-from typing import Optional
from phrasetms_client.models.glossary_activation_dto import GlossaryActivationDto
from phrasetms_client.models.glossary_dto import GlossaryDto
@@ -48,7 +48,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def activate_glossary(self, glossary_uid : StrictStr, body : Optional[GlossaryActivationDto] = None, **kwargs) -> GlossaryDto: # noqa: E501
"""Activate/Deactivate glossary # noqa: E501
@@ -78,7 +78,7 @@ def activate_glossary(self, glossary_uid : StrictStr, body : Optional[GlossaryAc
raise ValueError("Error! Please call the activate_glossary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.activate_glossary_with_http_info(glossary_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def activate_glossary_with_http_info(self, glossary_uid : StrictStr, body : Optional[GlossaryActivationDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Activate/Deactivate glossary # noqa: E501
@@ -211,7 +211,7 @@ def activate_glossary_with_http_info(self, glossary_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_glossary(self, body : Optional[GlossaryEditDto] = None, **kwargs) -> GlossaryDto: # noqa: E501
"""Create glossary # noqa: E501
@@ -239,7 +239,7 @@ def create_glossary(self, body : Optional[GlossaryEditDto] = None, **kwargs) ->
raise ValueError("Error! Please call the create_glossary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_glossary_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_glossary_with_http_info(self, body : Optional[GlossaryEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create glossary # noqa: E501
@@ -366,7 +366,7 @@ def create_glossary_with_http_info(self, body : Optional[GlossaryEditDto] = None
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_glossary(self, glossary_uid : StrictStr, purge : Annotated[Optional[StrictBool], Field(description="purge=false - the Glossary can later be restored, 'purge=true - the Glossary is completely deleted and cannot be restored")] = None, **kwargs) -> None: # noqa: E501
"""Delete glossary # noqa: E501
@@ -396,7 +396,7 @@ def delete_glossary(self, glossary_uid : StrictStr, purge : Annotated[Optional[S
raise ValueError("Error! Please call the delete_glossary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_glossary_with_http_info(glossary_uid, purge, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_glossary_with_http_info(self, glossary_uid : StrictStr, purge : Annotated[Optional[StrictBool], Field(description="purge=false - the Glossary can later be restored, 'purge=true - the Glossary is completely deleted and cannot be restored")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete glossary # noqa: E501
@@ -505,7 +505,7 @@ def delete_glossary_with_http_info(self, glossary_uid : StrictStr, purge : Annot
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_glossary(self, glossary_uid : StrictStr, **kwargs) -> GlossaryDto: # noqa: E501
"""Get glossary # noqa: E501
@@ -533,7 +533,7 @@ def get_glossary(self, glossary_uid : StrictStr, **kwargs) -> GlossaryDto: # no
raise ValueError("Error! Please call the get_glossary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_glossary_with_http_info(glossary_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_glossary_with_http_info(self, glossary_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get glossary # noqa: E501
@@ -653,8 +653,8 @@ def get_glossary_with_http_info(self, glossary_uid : StrictStr, **kwargs) -> Api
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_glossaries(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[conlist(StrictStr)], Field(description="Language of the glossary")] = None, 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, **kwargs) -> PageDtoGlossaryDto: # noqa: E501
+ @validate_call
+ def list_glossaries(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[List[StrictStr]], Field(description="Language of the glossary")] = None, 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, **kwargs) -> PageDtoGlossaryDto: # noqa: E501
"""List glossaries # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -687,8 +687,8 @@ def list_glossaries(self, name : Optional[StrictStr] = None, lang : Annotated[Op
raise ValueError("Error! Please call the list_glossaries_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_glossaries_with_http_info(name, lang, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_glossaries_with_http_info(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[conlist(StrictStr)], Field(description="Language of the glossary")] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_glossaries_with_http_info(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[List[StrictStr]], Field(description="Language of the glossary")] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List glossaries # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -826,7 +826,7 @@ def list_glossaries_with_http_info(self, name : Optional[StrictStr] = None, lang
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_glossary(self, glossary_uid : StrictStr, body : Optional[GlossaryEditDto] = None, **kwargs) -> GlossaryDto: # noqa: E501
"""Edit glossary # noqa: E501
@@ -857,7 +857,7 @@ def update_glossary(self, glossary_uid : StrictStr, body : Optional[GlossaryEdit
raise ValueError("Error! Please call the update_glossary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_glossary_with_http_info(glossary_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_glossary_with_http_info(self, glossary_uid : StrictStr, body : Optional[GlossaryEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit glossary # noqa: E501
diff --git a/phrasetms_client/api/import_settings_api.py b/phrasetms_client/api/import_settings_api.py
index 1d452dcd..e4fde6be 100644
--- a/phrasetms_client/api/import_settings_api.py
+++ b/phrasetms_client/api/import_settings_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.import_settings_create_dto import ImportSettingsCreateDto
from phrasetms_client.models.import_settings_dto import ImportSettingsDto
@@ -48,7 +48,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_import_settings(self, body : Optional[ImportSettingsCreateDto] = None, **kwargs) -> ImportSettingsDto: # noqa: E501
"""Create import settings # noqa: E501
@@ -77,7 +77,7 @@ def create_import_settings(self, body : Optional[ImportSettingsCreateDto] = None
raise ValueError("Error! Please call the create_import_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_import_settings_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_import_settings_with_http_info(self, body : Optional[ImportSettingsCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create import settings # noqa: E501
@@ -205,7 +205,7 @@ def create_import_settings_with_http_info(self, body : Optional[ImportSettingsCr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_import_settings(self, uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete import settings # noqa: E501
@@ -233,7 +233,7 @@ def delete_import_settings(self, uid : StrictStr, **kwargs) -> None: # noqa: E5
raise ValueError("Error! Please call the delete_import_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_import_settings_with_http_info(uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_import_settings_with_http_info(self, uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete import settings # noqa: E501
@@ -336,7 +336,7 @@ def delete_import_settings_with_http_info(self, uid : StrictStr, **kwargs) -> Ap
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_import_settings(self, body : Optional[ImportSettingsEditDto] = None, **kwargs) -> ImportSettingsDto: # noqa: E501
"""Edit import settings # noqa: E501
@@ -364,7 +364,7 @@ def edit_import_settings(self, body : Optional[ImportSettingsEditDto] = None, **
raise ValueError("Error! Please call the edit_import_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_import_settings_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_import_settings_with_http_info(self, body : Optional[ImportSettingsEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit import settings # noqa: E501
@@ -491,7 +491,7 @@ def edit_import_settings_with_http_info(self, body : Optional[ImportSettingsEdit
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_import_settings(self, uid : StrictStr, **kwargs) -> ImportSettingsDto: # noqa: E501
"""Get import settings # noqa: E501
@@ -519,7 +519,7 @@ def get_import_settings(self, uid : StrictStr, **kwargs) -> ImportSettingsDto:
raise ValueError("Error! Please call the get_import_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_import_settings_with_http_info(uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_import_settings_with_http_info(self, uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get import settings # noqa: E501
@@ -639,7 +639,7 @@ def get_import_settings_with_http_info(self, uid : StrictStr, **kwargs) -> ApiRe
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_import_settings1(self, **kwargs) -> ImportSettingsDto: # noqa: E501
"""Get organization's default import settings # noqa: E501
@@ -665,7 +665,7 @@ def get_import_settings1(self, **kwargs) -> ImportSettingsDto: # noqa: E501
raise ValueError("Error! Please call the get_import_settings1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_import_settings1_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_import_settings1_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""Get organization's default import settings # noqa: E501
@@ -779,8 +779,8 @@ def get_import_settings1_with_http_info(self, **kwargs) -> ApiResponse: # noqa:
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_import_settings(self, name : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoImportSettingsReference: # noqa: E501
+ @validate_call
+ def list_import_settings(self, name : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoImportSettingsReference: # noqa: E501
"""List import settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -811,8 +811,8 @@ def list_import_settings(self, name : Optional[StrictStr] = None, page_number :
raise ValueError("Error! Please call the list_import_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_import_settings_with_http_info(name, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_import_settings_with_http_info(self, name : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_import_settings_with_http_info(self, name : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List import settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/job_api.py b/phrasetms_client/api/job_api.py
index ee983c58..d9df69a6 100644
--- a/phrasetms_client/api/job_api.py
+++ b/phrasetms_client/api/job_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Any, Dict, List, Optional
-from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, validator
+from pydantic import Field, StrictBool, StrictInt, StrictStr
-from typing import Any, Dict, Optional
from phrasetms_client.models.compared_segments_dto import ComparedSegmentsDto
from phrasetms_client.models.create_terms_dto import CreateTermsDto
@@ -95,8 +95,8 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
- def compare_part(self, project_uid : StrictStr, at_workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, with_workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ComparedSegmentsDto: # noqa: E501
+ @validate_call
+ def compare_part(self, project_uid : StrictStr, at_workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, with_workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ComparedSegmentsDto: # noqa: E501
"""Compare jobs on workflow levels # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -129,8 +129,8 @@ def compare_part(self, project_uid : StrictStr, at_workflow_level : Optional[con
raise ValueError("Error! Please call the compare_part_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.compare_part_with_http_info(project_uid, at_workflow_level, with_workflow_level, body, **kwargs) # noqa: E501
- @validate_arguments
- def compare_part_with_http_info(self, project_uid : StrictStr, at_workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, with_workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def compare_part_with_http_info(self, project_uid : StrictStr, at_workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, with_workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Compare jobs on workflow levels # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -274,7 +274,7 @@ def compare_part_with_http_info(self, project_uid : StrictStr, at_workflow_level
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def completed_file1(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Download target file (async) # noqa: E501
@@ -305,7 +305,7 @@ def completed_file1(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs
raise ValueError("Error! Please call the completed_file1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.completed_file1_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def completed_file1_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Download target file (async) # noqa: E501
@@ -415,7 +415,7 @@ def completed_file1_with_http_info(self, project_uid : StrictStr, job_uid : Stri
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def copy_source_to_target(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> None: # noqa: E501
"""Copy Source to Target # noqa: E501
@@ -445,7 +445,7 @@ def copy_source_to_target(self, project_uid : StrictStr, body : Optional[JobPart
raise ValueError("Error! Please call the copy_source_to_target_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.copy_source_to_target_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def copy_source_to_target_with_http_info(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Copy Source to Target # noqa: E501
@@ -561,7 +561,7 @@ def copy_source_to_target_with_http_info(self, project_uid : StrictStr, body : O
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def copy_source_to_target_job_part(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Copy Source to Target job # noqa: E501
@@ -591,7 +591,7 @@ def copy_source_to_target_job_part(self, project_uid : StrictStr, job_uid : Stri
raise ValueError("Error! Please call the copy_source_to_target_job_part_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.copy_source_to_target_job_part_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def copy_source_to_target_job_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Copy Source to Target job # noqa: E501
@@ -700,7 +700,7 @@ def copy_source_to_target_job_part_with_http_info(self, project_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_job(self, project_uid : StrictStr, memsource : Optional[StrictStr] = None, content_disposition : Annotated[Optional[StrictStr], Field(description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")] = None, body : Optional[object] = None, **kwargs) -> JobListDto: # noqa: E501
"""Create job # noqa: E501
@@ -735,7 +735,7 @@ def create_job(self, project_uid : StrictStr, memsource : Optional[StrictStr] =
raise ValueError("Error! Please call the create_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_job_with_http_info(project_uid, memsource, content_disposition, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_job_with_http_info(self, project_uid : StrictStr, memsource : Optional[StrictStr] = None, content_disposition : Annotated[Optional[StrictStr], Field(description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")] = None, body : Optional[object] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create job # noqa: E501
@@ -881,7 +881,7 @@ def create_job_with_http_info(self, project_uid : StrictStr, memsource : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_job_from_async_download_task(self, project_uid : StrictStr, download_task_id : Optional[StrictStr] = None, continuous : Optional[StrictBool] = None, body : Optional[JobCreateRequestDto] = None, **kwargs) -> JobListDto: # noqa: E501
"""Create job from connector asynchronous download task # noqa: E501
@@ -916,7 +916,7 @@ def create_job_from_async_download_task(self, project_uid : StrictStr, download_
raise ValueError("Error! Please call the create_job_from_async_download_task_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_job_from_async_download_task_with_http_info(project_uid, download_task_id, continuous, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_job_from_async_download_task_with_http_info(self, project_uid : StrictStr, download_task_id : Optional[StrictStr] = None, continuous : Optional[StrictBool] = None, body : Optional[JobCreateRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create job from connector asynchronous download task # noqa: E501
@@ -1062,7 +1062,7 @@ def create_job_from_async_download_task_with_http_info(self, project_uid : Stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_term_by_job(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[CreateTermsDto] = None, **kwargs) -> TermPairDto: # noqa: E501
"""Create term in job's term bases # noqa: E501
@@ -1095,7 +1095,7 @@ def create_term_by_job(self, job_uid : StrictStr, project_uid : StrictStr, body
raise ValueError("Error! Please call the create_term_by_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_term_by_job_with_http_info(job_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_term_by_job_with_http_info(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[CreateTermsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create term in job's term bases # noqa: E501
@@ -1235,7 +1235,7 @@ def create_term_by_job_with_http_info(self, job_uid : StrictStr, project_uid : S
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_all_translations(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> None: # noqa: E501
"""Delete all translations # noqa: E501
@@ -1265,7 +1265,7 @@ def delete_all_translations(self, project_uid : StrictStr, body : Optional[JobPa
raise ValueError("Error! Please call the delete_all_translations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_all_translations_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_all_translations_with_http_info(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete all translations # noqa: E501
@@ -1381,7 +1381,7 @@ def delete_all_translations_with_http_info(self, project_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_all_translations1(self, project_uid : StrictStr, body : Optional[JobPartReadyDeleteTranslationDto] = None, **kwargs) -> None: # noqa: E501
"""Delete specific translations # noqa: E501
@@ -1411,7 +1411,7 @@ def delete_all_translations1(self, project_uid : StrictStr, body : Optional[JobP
raise ValueError("Error! Please call the delete_all_translations1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_all_translations1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_all_translations1_with_http_info(self, project_uid : StrictStr, body : Optional[JobPartReadyDeleteTranslationDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete specific translations # noqa: E501
@@ -1520,7 +1520,7 @@ def delete_all_translations1_with_http_info(self, project_uid : StrictStr, body
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_handover_file(self, project_uid : StrictStr, body : Optional[JobPartReferences] = None, **kwargs) -> None: # noqa: E501
"""Delete handover file # noqa: E501
@@ -1550,7 +1550,7 @@ def delete_handover_file(self, project_uid : StrictStr, body : Optional[JobPartR
raise ValueError("Error! Please call the delete_handover_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_handover_file_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_handover_file_with_http_info(self, project_uid : StrictStr, body : Optional[JobPartReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete handover file # noqa: E501
@@ -1666,7 +1666,7 @@ def delete_handover_file_with_http_info(self, project_uid : StrictStr, body : Op
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_parts(self, project_uid : StrictStr, purge : Optional[StrictBool] = None, body : Optional[JobPartDeleteReferences] = None, **kwargs) -> None: # noqa: E501
"""Delete job (batch) # noqa: E501
@@ -1698,7 +1698,7 @@ def delete_parts(self, project_uid : StrictStr, purge : Optional[StrictBool] = N
raise ValueError("Error! Please call the delete_parts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_parts_with_http_info(project_uid, purge, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_parts_with_http_info(self, project_uid : StrictStr, purge : Optional[StrictBool] = None, body : Optional[JobPartDeleteReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete job (batch) # noqa: E501
@@ -1820,7 +1820,7 @@ def delete_parts_with_http_info(self, project_uid : StrictStr, purge : Optional[
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def download_completed_file(self, project_uid : StrictStr, job_uid : StrictStr, async_request_id : StrictStr, format : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501
"""Download target file based on async request # noqa: E501
@@ -1855,7 +1855,7 @@ def download_completed_file(self, project_uid : StrictStr, job_uid : StrictStr,
raise ValueError("Error! Please call the download_completed_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.download_completed_file_with_http_info(project_uid, job_uid, async_request_id, format, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def download_completed_file_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, async_request_id : StrictStr, format : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download target file based on async request # noqa: E501
@@ -1977,7 +1977,7 @@ def download_completed_file_with_http_info(self, project_uid : StrictStr, job_ui
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_job_import_settings(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[FileImportSettingsCreateDto] = None, **kwargs) -> FileImportSettingsDto: # noqa: E501
"""Edit job import settings # noqa: E501
@@ -2009,7 +2009,7 @@ def edit_job_import_settings(self, project_uid : StrictStr, job_uid : StrictStr,
raise ValueError("Error! Please call the edit_job_import_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_job_import_settings_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_job_import_settings_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[FileImportSettingsCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit job import settings # noqa: E501
@@ -2148,7 +2148,7 @@ def edit_job_import_settings_with_http_info(self, project_uid : StrictStr, job_u
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_part(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[JobPartUpdateSingleDto] = None, **kwargs) -> JobPartExtendedDto: # noqa: E501
"""Edit job # noqa: E501
@@ -2180,7 +2180,7 @@ def edit_part(self, project_uid : StrictStr, job_uid : StrictStr, body : Optiona
raise ValueError("Error! Please call the edit_part_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_part_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[JobPartUpdateSingleDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit job # noqa: E501
@@ -2319,7 +2319,7 @@ def edit_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_parts(self, project_uid : StrictStr, body : Optional[JobPartUpdateBatchDto] = None, **kwargs) -> JobPartsDto: # noqa: E501
"""Edit jobs (batch) # noqa: E501
@@ -2350,7 +2350,7 @@ def edit_parts(self, project_uid : StrictStr, body : Optional[JobPartUpdateBatch
raise ValueError("Error! Please call the edit_parts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_parts_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_parts_with_http_info(self, project_uid : StrictStr, body : Optional[JobPartUpdateBatchDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit jobs (batch) # noqa: E501
@@ -2484,7 +2484,7 @@ def edit_parts_with_http_info(self, project_uid : StrictStr, body : Optional[Job
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def export_to_online_repository(self, project_uid : StrictStr, body : Optional[JobExportActionDto] = None, **kwargs) -> JobExportResponseDto: # noqa: E501
"""Export jobs to online repository # noqa: E501
@@ -2514,7 +2514,7 @@ def export_to_online_repository(self, project_uid : StrictStr, body : Optional[J
raise ValueError("Error! Please call the export_to_online_repository_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.export_to_online_repository_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def export_to_online_repository_with_http_info(self, project_uid : StrictStr, body : Optional[JobExportActionDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Export jobs to online repository # noqa: E501
@@ -2640,7 +2640,7 @@ def export_to_online_repository_with_http_info(self, project_uid : StrictStr, bo
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def file_preview(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[Dict[str, Any]] = None, **kwargs) -> None: # noqa: E501
"""Download preview file # noqa: E501
@@ -2673,7 +2673,7 @@ def file_preview(self, project_uid : StrictStr, job_uid : StrictStr, body : Opti
raise ValueError("Error! Please call the file_preview_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.file_preview_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def file_preview_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download preview file # noqa: E501
@@ -2796,7 +2796,7 @@ def file_preview_with_http_info(self, project_uid : StrictStr, job_uid : StrictS
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def file_preview_job(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Download preview file # noqa: E501
@@ -2826,7 +2826,7 @@ def file_preview_job(self, project_uid : StrictStr, job_uid : StrictStr, **kwarg
raise ValueError("Error! Please call the file_preview_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.file_preview_job_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def file_preview_job_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Download preview file # noqa: E501
@@ -2935,7 +2935,7 @@ def file_preview_job_with_http_info(self, project_uid : StrictStr, job_uid : Str
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_bilingual_file(self, project_uid : StrictStr, format : Optional[StrictStr] = None, preview : Optional[StrictBool] = None, body : Optional[GetBilingualFileDto] = None, **kwargs) -> None: # noqa: E501
"""Download bilingual file # noqa: E501
@@ -2969,7 +2969,7 @@ def get_bilingual_file(self, project_uid : StrictStr, format : Optional[StrictSt
raise ValueError("Error! Please call the get_bilingual_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_bilingual_file_with_http_info(project_uid, format, preview, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_bilingual_file_with_http_info(self, project_uid : StrictStr, format : Optional[StrictStr] = None, preview : Optional[StrictBool] = None, body : Optional[GetBilingualFileDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download bilingual file # noqa: E501
@@ -3097,7 +3097,7 @@ def get_bilingual_file_with_http_info(self, project_uid : StrictStr, format : Op
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_completed_file_warnings(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> TargetFileWarningsDto: # noqa: E501
"""Get target file's warnings # noqa: E501
@@ -3128,7 +3128,7 @@ def get_completed_file_warnings(self, project_uid : StrictStr, job_uid : StrictS
raise ValueError("Error! Please call the get_completed_file_warnings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_completed_file_warnings_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_completed_file_warnings_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get target file's warnings # noqa: E501
@@ -3255,8 +3255,8 @@ def get_completed_file_warnings_with_http_info(self, project_uid : StrictStr, jo
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_handover_files(self, project_uid : StrictStr, job_uid : Annotated[Optional[conlist(StrictStr)], Field(description="JobPart Id of requested handover file")] = None, **kwargs) -> None: # noqa: E501
+ @validate_call
+ def get_handover_files(self, project_uid : StrictStr, job_uid : Annotated[Optional[List[StrictStr]], Field(description="JobPart Id of requested handover file")] = None, **kwargs) -> None: # noqa: E501
"""Download handover file(s) # noqa: E501
For downloading multiple files as ZIP file provide multiple IDs in query parameters. * For example `?jobUid={id1}&jobUid={id2}` * When no files matched given IDs error 404 is returned, otherwise ZIP file will include those that were found # noqa: E501
@@ -3286,8 +3286,8 @@ def get_handover_files(self, project_uid : StrictStr, job_uid : Annotated[Option
raise ValueError("Error! Please call the get_handover_files_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_handover_files_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
- def get_handover_files_with_http_info(self, project_uid : StrictStr, job_uid : Annotated[Optional[conlist(StrictStr)], Field(description="JobPart Id of requested handover file")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_handover_files_with_http_info(self, project_uid : StrictStr, job_uid : Annotated[Optional[List[StrictStr]], Field(description="JobPart Id of requested handover file")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download handover file(s) # noqa: E501
For downloading multiple files as ZIP file provide multiple IDs in query parameters. * For example `?jobUid={id1}&jobUid={id2}` * When no files matched given IDs error 404 is returned, otherwise ZIP file will include those that were found # noqa: E501
@@ -3397,7 +3397,7 @@ def get_handover_files_with_http_info(self, project_uid : StrictStr, job_uid : A
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_import_settings3(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> FileImportSettingsDto: # noqa: E501
"""Get import settings for job # noqa: E501
@@ -3427,7 +3427,7 @@ def get_import_settings3(self, project_uid : StrictStr, job_uid : StrictStr, **k
raise ValueError("Error! Please call the get_import_settings3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_import_settings3_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_import_settings3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get import settings for job # noqa: E501
@@ -3553,7 +3553,7 @@ def get_import_settings3_with_http_info(self, project_uid : StrictStr, job_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_original_file(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Download original file # noqa: E501
@@ -3583,7 +3583,7 @@ def get_original_file(self, project_uid : StrictStr, job_uid : StrictStr, **kwar
raise ValueError("Error! Please call the get_original_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_original_file_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_original_file_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Download original file # noqa: E501
@@ -3692,7 +3692,7 @@ def get_original_file_with_http_info(self, project_uid : StrictStr, job_uid : St
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_part(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> JobPartExtendedDto: # noqa: E501
"""Get job # noqa: E501
@@ -3722,7 +3722,7 @@ def get_part(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> Jo
raise ValueError("Error! Please call the get_part_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_part_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get job # noqa: E501
@@ -3848,7 +3848,7 @@ def get_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_parts_workflow_step(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ProjectWorkflowStepDto: # noqa: E501
"""Get job's workflowStep # noqa: E501
@@ -3878,7 +3878,7 @@ def get_parts_workflow_step(self, project_uid : StrictStr, job_uid : StrictStr,
raise ValueError("Error! Please call the get_parts_workflow_step_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_parts_workflow_step_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_parts_workflow_step_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get job's workflowStep # noqa: E501
@@ -4004,7 +4004,7 @@ def get_parts_workflow_step_with_http_info(self, project_uid : StrictStr, job_ui
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_segments_count(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> SegmentsCountsResponseListDto: # noqa: E501
"""Get segments count # noqa: E501
@@ -4035,7 +4035,7 @@ def get_segments_count(self, project_uid : StrictStr, body : Optional[JobPartRea
raise ValueError("Error! Please call the get_segments_count_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_segments_count_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_segments_count_with_http_info(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get segments count # noqa: E501
@@ -4169,7 +4169,7 @@ def get_segments_count_with_http_info(self, project_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> TranslationResourcesDto: # noqa: E501
"""Get translation resources # noqa: E501
@@ -4199,7 +4199,7 @@ def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr
raise ValueError("Error! Please call the get_translation_resources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_translation_resources_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_translation_resources_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation resources # noqa: E501
@@ -4325,8 +4325,8 @@ def get_translation_resources_with_http_info(self, project_uid : StrictStr, job_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_part_analyse_v3(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
+ @validate_call
+ def list_part_analyse_v3(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
"""List analyses # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4359,8 +4359,8 @@ def list_part_analyse_v3(self, project_uid : StrictStr, job_uid : StrictStr, pag
raise ValueError("Error! Please call the list_part_analyse_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_part_analyse_v3_with_http_info(project_uid, job_uid, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_part_analyse_v3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_part_analyse_v3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List analyses # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4497,8 +4497,8 @@ def list_part_analyse_v3_with_http_info(self, project_uid : StrictStr, job_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_parts_v2(self, project_uid : StrictStr, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, count : Optional[StrictBool] = None, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, status : Optional[conlist(StrictStr)] = None, assigned_user : Optional[StrictInt] = None, due_in_hours : Optional[StrictInt] = None, filename : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, assigned_vendor : Optional[StrictInt] = None, **kwargs) -> PageDtoJobPartReferenceV2: # noqa: E501
+ @validate_call
+ def list_parts_v2(self, project_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, count : Optional[StrictBool] = None, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, status : Optional[List[StrictStr]] = None, assigned_user : Optional[StrictInt] = None, due_in_hours : Optional[StrictInt] = None, filename : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, assigned_vendor : Optional[StrictInt] = None, **kwargs) -> PageDtoJobPartReferenceV2: # noqa: E501
"""List jobs # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4545,8 +4545,8 @@ def list_parts_v2(self, project_uid : StrictStr, page_number : Optional[conint(s
raise ValueError("Error! Please call the list_parts_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_parts_v2_with_http_info(project_uid, page_number, page_size, count, workflow_level, status, assigned_user, due_in_hours, filename, target_lang, assigned_vendor, **kwargs) # noqa: E501
- @validate_arguments
- def list_parts_v2_with_http_info(self, project_uid : StrictStr, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, count : Optional[StrictBool] = None, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, status : Optional[conlist(StrictStr)] = None, assigned_user : Optional[StrictInt] = None, due_in_hours : Optional[StrictInt] = None, filename : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, assigned_vendor : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_parts_v2_with_http_info(self, project_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, count : Optional[StrictBool] = None, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, status : Optional[List[StrictStr]] = None, assigned_user : Optional[StrictInt] = None, due_in_hours : Optional[StrictInt] = None, filename : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, assigned_vendor : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List jobs # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4726,7 +4726,7 @@ def list_parts_v2_with_http_info(self, project_uid : StrictStr, page_number : Op
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_providers4(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ProviderListDtoV2: # noqa: E501
"""Get suggested providers # noqa: E501
@@ -4756,7 +4756,7 @@ def list_providers4(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs
raise ValueError("Error! Please call the list_providers4_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_providers4_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_providers4_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get suggested providers # noqa: E501
@@ -4882,8 +4882,8 @@ def list_providers4_with_http_info(self, project_uid : StrictStr, job_uid : Stri
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_segments(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[conint(strict=True, ge=0)] = None, end_index : Optional[conint(strict=True, ge=0)] = None, **kwargs) -> SegmentListDto: # noqa: E501
+ @validate_call
+ def list_segments(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, end_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, **kwargs) -> SegmentListDto: # noqa: E501
"""Get segments # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4916,8 +4916,8 @@ def list_segments(self, project_uid : StrictStr, job_uid : StrictStr, begin_inde
raise ValueError("Error! Please call the list_segments_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_segments_with_http_info(project_uid, job_uid, begin_index, end_index, **kwargs) # noqa: E501
- @validate_arguments
- def list_segments_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[conint(strict=True, ge=0)] = None, end_index : Optional[conint(strict=True, ge=0)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_segments_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, end_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get segments # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5054,7 +5054,7 @@ def list_segments_with_http_info(self, project_uid : StrictStr, job_uid : Strict
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def notify_assigned(self, project_uid : StrictStr, body : Optional[NotifyJobPartsRequestDto] = None, **kwargs) -> None: # noqa: E501
"""Notify assigned users # noqa: E501
@@ -5084,7 +5084,7 @@ def notify_assigned(self, project_uid : StrictStr, body : Optional[NotifyJobPart
raise ValueError("Error! Please call the notify_assigned_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.notify_assigned_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def notify_assigned_with_http_info(self, project_uid : StrictStr, body : Optional[NotifyJobPartsRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Notify assigned users # noqa: E501
@@ -5200,7 +5200,7 @@ def notify_assigned_with_http_info(self, project_uid : StrictStr, body : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def patch_part(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[JobPartPatchSingleDto] = None, **kwargs) -> JobPartExtendedDto: # noqa: E501
"""Patch job # noqa: E501
@@ -5232,7 +5232,7 @@ def patch_part(self, project_uid : StrictStr, job_uid : StrictStr, body : Option
raise ValueError("Error! Please call the patch_part_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.patch_part_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def patch_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[JobPartPatchSingleDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Patch job # noqa: E501
@@ -5371,7 +5371,7 @@ def patch_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def patch_update_job_parts(self, body : Optional[JobPartPatchBatchDto] = None, **kwargs) -> JobPartPatchResultDto: # noqa: E501
"""Edit jobs (with possible partial updates) # noqa: E501
@@ -5400,7 +5400,7 @@ def patch_update_job_parts(self, body : Optional[JobPartPatchBatchDto] = None, *
raise ValueError("Error! Please call the patch_update_job_parts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.patch_update_job_parts_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def patch_update_job_parts_with_http_info(self, body : Optional[JobPartPatchBatchDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit jobs (with possible partial updates) # noqa: E501
@@ -5528,8 +5528,8 @@ def patch_update_job_parts_with_http_info(self, body : Optional[JobPartPatchBatc
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def preview_urls(self, project_uid : StrictStr, job_uid : StrictStr, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, **kwargs) -> PreviewUrlsDto: # noqa: E501
+ @validate_call
+ def preview_urls(self, project_uid : StrictStr, job_uid : StrictStr, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, **kwargs) -> PreviewUrlsDto: # noqa: E501
"""Get PDF preview # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5560,8 +5560,8 @@ def preview_urls(self, project_uid : StrictStr, job_uid : StrictStr, workflow_le
raise ValueError("Error! Please call the preview_urls_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.preview_urls_with_http_info(project_uid, job_uid, workflow_level, **kwargs) # noqa: E501
- @validate_arguments
- def preview_urls_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def preview_urls_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get PDF preview # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5692,7 +5692,7 @@ def preview_urls_with_http_info(self, project_uid : StrictStr, job_uid : StrictS
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def pseudo_translate1(self, project_uid : StrictStr, body : Optional[PseudoTranslateWrapperDto] = None, **kwargs) -> None: # noqa: E501
"""Pseudo-translate job # noqa: E501
@@ -5722,7 +5722,7 @@ def pseudo_translate1(self, project_uid : StrictStr, body : Optional[PseudoTrans
raise ValueError("Error! Please call the pseudo_translate1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.pseudo_translate1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def pseudo_translate1_with_http_info(self, project_uid : StrictStr, body : Optional[PseudoTranslateWrapperDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Pseudo-translate job # noqa: E501
@@ -5831,7 +5831,7 @@ def pseudo_translate1_with_http_info(self, project_uid : StrictStr, body : Optio
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def pseudo_translate_job_part(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[PseudoTranslateActionDto] = None, **kwargs) -> None: # noqa: E501
"""Pseudo-translates job # noqa: E501
@@ -5863,7 +5863,7 @@ def pseudo_translate_job_part(self, project_uid : StrictStr, job_uid : StrictStr
raise ValueError("Error! Please call the pseudo_translate_job_part_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.pseudo_translate_job_part_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def pseudo_translate_job_part_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[PseudoTranslateActionDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Pseudo-translates job # noqa: E501
@@ -5985,7 +5985,7 @@ def pseudo_translate_job_part_with_http_info(self, project_uid : StrictStr, job_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDtoV3] = None, **kwargs) -> SearchResponseListTmDtoV3: # noqa: E501
"""Search job's translation memories # noqa: E501
@@ -6017,7 +6017,7 @@ def search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr, body : Op
raise ValueError("Error! Please call the search_by_job3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_by_job3_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_by_job3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDtoV3] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search job's translation memories # noqa: E501
@@ -6149,7 +6149,7 @@ def search_by_job3_with_http_info(self, project_uid : StrictStr, job_uid : Stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_parts_in_project(self, project_uid : StrictStr, body : Optional[SearchJobsRequestDto] = None, **kwargs) -> SearchJobsDto: # noqa: E501
"""Search jobs in project # noqa: E501
@@ -6179,7 +6179,7 @@ def search_parts_in_project(self, project_uid : StrictStr, body : Optional[Searc
raise ValueError("Error! Please call the search_parts_in_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_parts_in_project_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_parts_in_project_with_http_info(self, project_uid : StrictStr, body : Optional[SearchJobsRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search jobs in project # noqa: E501
@@ -6312,7 +6312,7 @@ def search_parts_in_project_with_http_info(self, project_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_segment_by_job(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDto] = None, **kwargs) -> SearchResponseListTmDto: # noqa: E501
"""Search translation memory for segment by job # noqa: E501
@@ -6345,7 +6345,7 @@ def search_segment_by_job(self, project_uid : StrictStr, job_uid : StrictStr, bo
raise ValueError("Error! Please call the search_segment_by_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_segment_by_job_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_segment_by_job_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search translation memory for segment by job # noqa: E501
@@ -6485,7 +6485,7 @@ def search_segment_by_job_with_http_info(self, project_uid : StrictStr, job_uid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_terms_by_job1(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbByJobRequestDto] = None, **kwargs) -> SearchTbResponseListDto: # noqa: E501
"""Search job's term bases # noqa: E501
@@ -6518,7 +6518,7 @@ def search_terms_by_job1(self, job_uid : StrictStr, project_uid : StrictStr, bod
raise ValueError("Error! Please call the search_terms_by_job1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_terms_by_job1_with_http_info(job_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_terms_by_job1_with_http_info(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbByJobRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search job's term bases # noqa: E501
@@ -6658,7 +6658,7 @@ def search_terms_by_job1_with_http_info(self, job_uid : StrictStr, project_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_terms_in_text_by_job_v2(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbInTextByJobRequestDto] = None, **kwargs) -> SearchInTextResponseList2Dto: # noqa: E501
"""Search terms in text # noqa: E501
@@ -6691,7 +6691,7 @@ def search_terms_in_text_by_job_v2(self, job_uid : StrictStr, project_uid : Stri
raise ValueError("Error! Please call the search_terms_in_text_by_job_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_terms_in_text_by_job_v2_with_http_info(job_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_terms_in_text_by_job_v2_with_http_info(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbInTextByJobRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search terms in text # noqa: E501
@@ -6831,7 +6831,7 @@ def search_terms_in_text_by_job_v2_with_http_info(self, job_uid : StrictStr, pro
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_status(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[JobStatusChangeActionDto] = None, **kwargs) -> None: # noqa: E501
"""Edit job status # noqa: E501
@@ -6863,7 +6863,7 @@ def set_status(self, project_uid : StrictStr, job_uid : StrictStr, body : Option
raise ValueError("Error! Please call the set_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_status_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_status_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[JobStatusChangeActionDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit job status # noqa: E501
@@ -6985,7 +6985,7 @@ def set_status_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def split(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SplitJobActionDto] = None, **kwargs) -> JobPartsDto: # noqa: E501
"""Split job # noqa: E501
@@ -7018,7 +7018,7 @@ def split(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[Sp
raise ValueError("Error! Please call the split_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.split_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def split_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SplitJobActionDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Split job # noqa: E501
@@ -7158,7 +7158,7 @@ def split_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, bod
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def status_changes(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> JobPartStatusChangesDto: # noqa: E501
"""Get status changes # noqa: E501
@@ -7188,7 +7188,7 @@ def status_changes(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs)
raise ValueError("Error! Please call the status_changes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.status_changes_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def status_changes_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get status changes # noqa: E501
@@ -7314,7 +7314,7 @@ def status_changes_with_http_info(self, project_uid : StrictStr, job_uid : Stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_source(self, project_uid : StrictStr, memsource : Optional[StrictStr] = None, content_disposition : Annotated[Optional[StrictStr], Field(description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> JobUpdateSourceResponseDto: # noqa: E501
"""Update source # noqa: E501
@@ -7349,7 +7349,7 @@ def update_source(self, project_uid : StrictStr, memsource : Optional[StrictStr]
raise ValueError("Error! Please call the update_source_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_source_with_http_info(project_uid, memsource, content_disposition, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_source_with_http_info(self, project_uid : StrictStr, memsource : Optional[StrictStr] = None, content_disposition : Annotated[Optional[StrictStr], Field(description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update source # noqa: E501
@@ -7495,7 +7495,7 @@ def update_source_with_http_info(self, project_uid : StrictStr, memsource : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_target(self, project_uid : StrictStr, memsource : Optional[StrictStr] = None, content_disposition : Annotated[Optional[StrictStr], Field(description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> JobUpdateSourceResponseDto: # noqa: E501
"""Update target # noqa: E501
@@ -7530,7 +7530,7 @@ def update_target(self, project_uid : StrictStr, memsource : Optional[StrictStr]
raise ValueError("Error! Please call the update_target_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_target_with_http_info(project_uid, memsource, content_disposition, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_target_with_http_info(self, project_uid : StrictStr, memsource : Optional[StrictStr] = None, content_disposition : Annotated[Optional[StrictStr], Field(description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update target # noqa: E501
@@ -7676,7 +7676,7 @@ def update_target_with_http_info(self, project_uid : StrictStr, memsource : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def upload_bilingual_file(self, format : Optional[StrictStr] = None, save_to_trans_memory : Optional[StrictStr] = None, set_completed : Optional[StrictBool] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> JobPartsDto: # noqa: E501
"""Upload bilingual file # noqa: E501
@@ -7711,7 +7711,7 @@ def upload_bilingual_file(self, format : Optional[StrictStr] = None, save_to_tra
raise ValueError("Error! Please call the upload_bilingual_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.upload_bilingual_file_with_http_info(format, save_to_trans_memory, set_completed, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def upload_bilingual_file_with_http_info(self, format : Optional[StrictStr] = None, save_to_trans_memory : Optional[StrictStr] = None, set_completed : Optional[StrictBool] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Upload bilingual file # noqa: E501
@@ -7857,7 +7857,7 @@ def upload_bilingual_file_with_http_info(self, format : Optional[StrictStr] = No
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def upload_handover_file(self, project_uid : StrictStr, memsource : StrictStr, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")], content_length : Optional[StrictInt] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> FileHandoverDto: # noqa: E501
"""Upload handover file # noqa: E501
@@ -7894,7 +7894,7 @@ def upload_handover_file(self, project_uid : StrictStr, memsource : StrictStr, c
raise ValueError("Error! Please call the upload_handover_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.upload_handover_file_with_http_info(project_uid, memsource, content_disposition, content_length, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def upload_handover_file_with_http_info(self, project_uid : StrictStr, memsource : StrictStr, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?(filename\\*=UTF-8''(.+)|filename=\"?(.+)\"?)`")], content_length : Optional[StrictInt] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Upload handover file # noqa: E501
@@ -8046,7 +8046,7 @@ def upload_handover_file_with_http_info(self, project_uid : StrictStr, memsource
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def web_editor_link_v2(self, project_uid : StrictStr, body : Optional[CreateWebEditorLinkDtoV2] = None, **kwargs) -> WebEditorLinkDtoV2: # noqa: E501
"""Get Web Editor URL # noqa: E501
@@ -8077,7 +8077,7 @@ def web_editor_link_v2(self, project_uid : StrictStr, body : Optional[CreateWebE
raise ValueError("Error! Please call the web_editor_link_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.web_editor_link_v2_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def web_editor_link_v2_with_http_info(self, project_uid : StrictStr, body : Optional[CreateWebEditorLinkDtoV2] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get Web Editor URL # noqa: E501
@@ -8204,7 +8204,7 @@ def web_editor_link_v2_with_http_info(self, project_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def wild_card_search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[WildCardSearchByJobRequestDtoV3] = None, **kwargs) -> SearchResponseListTmDtoV3: # noqa: E501
"""Wildcard search job's translation memories # noqa: E501
@@ -8236,7 +8236,7 @@ def wild_card_search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr,
raise ValueError("Error! Please call the wild_card_search_by_job3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.wild_card_search_by_job3_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def wild_card_search_by_job3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[WildCardSearchByJobRequestDtoV3] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Wildcard search job's translation memories # noqa: E501
diff --git a/phrasetms_client/api/language_quality_assessment_api.py b/phrasetms_client/api/language_quality_assessment_api.py
index 94701d23..89a12645 100644
--- a/phrasetms_client/api/language_quality_assessment_api.py
+++ b/phrasetms_client/api/language_quality_assessment_api.py
@@ -1,3 +1,4 @@
+from typing_extensions import Annotated
# coding: utf-8
"""
@@ -16,10 +17,9 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
-from typing_extensions import Annotated
+from pydantic import StringConstraints, ValidationError, validate_call
-from pydantic import Field, constr
+from pydantic import Field, StringConstraints
from phrasetms_client.api_client import ApiClient
@@ -42,8 +42,8 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
- def download_lqa_reports(self, job_parts : Annotated[constr(strict=True, max_length=2147483647, min_length=1), Field(..., description="Comma separated list of JobPart UIDs")], **kwargs) -> None: # noqa: E501
+ @validate_call
+ def download_lqa_reports(self, job_parts : Annotated[Annotated[str, StringConstraints(strict=True, max_length=2147483647, min_length=1)], Field(..., description="Comma separated list of JobPart UIDs")], **kwargs) -> None: # noqa: E501
"""Download LQA Assessment XLSX reports # noqa: E501
Returns a single xlsx report or ZIP archive with multiple reports. If any given jobPart is not from LQA workflow step, reports from successive workflow steps may be returned If none were found returns 404 error, otherwise returns those that were found. # noqa: E501
@@ -71,8 +71,8 @@ def download_lqa_reports(self, job_parts : Annotated[constr(strict=True, max_len
raise ValueError("Error! Please call the download_lqa_reports_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.download_lqa_reports_with_http_info(job_parts, **kwargs) # noqa: E501
- @validate_arguments
- def download_lqa_reports_with_http_info(self, job_parts : Annotated[constr(strict=True, max_length=2147483647, min_length=1), Field(..., description="Comma separated list of JobPart UIDs")], **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def download_lqa_reports_with_http_info(self, job_parts : Annotated[Annotated[str, StringConstraints(strict=True, max_length=2147483647, min_length=1)], Field(..., description="Comma separated list of JobPart UIDs")], **kwargs) -> ApiResponse: # noqa: E501
"""Download LQA Assessment XLSX reports # noqa: E501
Returns a single xlsx report or ZIP archive with multiple reports. If any given jobPart is not from LQA workflow step, reports from successive workflow steps may be returned If none were found returns 404 error, otherwise returns those that were found. # noqa: E501
diff --git a/phrasetms_client/api/machine_translation_api.py b/phrasetms_client/api/machine_translation_api.py
index 3df2a162..219363b7 100644
--- a/phrasetms_client/api/machine_translation_api.py
+++ b/phrasetms_client/api/machine_translation_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
+from typing import Optional
from pydantic import StrictStr
-from typing import Optional
from phrasetms_client.models.machine_translate_response import MachineTranslateResponse
from phrasetms_client.models.translation_request_extended_dto import TranslationRequestExtendedDto
@@ -46,7 +46,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def machine_translation(self, mt_settings_uid : StrictStr, body : Optional[TranslationRequestExtendedDto] = None, **kwargs) -> MachineTranslateResponse: # noqa: E501
"""Translate with MT # noqa: E501
@@ -76,7 +76,7 @@ def machine_translation(self, mt_settings_uid : StrictStr, body : Optional[Trans
raise ValueError("Error! Please call the machine_translation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.machine_translation_with_http_info(mt_settings_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def machine_translation_with_http_info(self, mt_settings_uid : StrictStr, body : Optional[TranslationRequestExtendedDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Translate with MT # noqa: E501
diff --git a/phrasetms_client/api/machine_translation_settings_api.py b/phrasetms_client/api/machine_translation_settings_api.py
index 16b6b0c8..d7a1455a 100644
--- a/phrasetms_client/api/machine_translation_settings_api.py
+++ b/phrasetms_client/api/machine_translation_settings_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.machine_translate_settings_pbm_dto import MachineTranslateSettingsPbmDto
from phrasetms_client.models.machine_translate_status_dto import MachineTranslateStatusDto
@@ -49,8 +49,8 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
- def get_list(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> PageDtoMachineTranslateSettingsPbmDto: # noqa: E501
+ @validate_call
+ def get_list(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> PageDtoMachineTranslateSettingsPbmDto: # noqa: E501
"""List machine translate settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -85,8 +85,8 @@ def get_list(self, name : Optional[StrictStr] = None, page_number : Annotated[Op
raise ValueError("Error! Please call the get_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_list_with_http_info(name, page_number, page_size, sort, order, **kwargs) # noqa: E501
- @validate_arguments
- def get_list_with_http_info(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_list_with_http_info(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List machine translate settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -229,7 +229,7 @@ def get_list_with_http_info(self, name : Optional[StrictStr] = None, page_number
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_mt_settings(self, mts_uid : StrictStr, **kwargs) -> MachineTranslateSettingsPbmDto: # noqa: E501
"""Get machine translate settings # noqa: E501
@@ -257,7 +257,7 @@ def get_mt_settings(self, mts_uid : StrictStr, **kwargs) -> MachineTranslateSett
raise ValueError("Error! Please call the get_mt_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_mt_settings_with_http_info(mts_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_mt_settings_with_http_info(self, mts_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get machine translate settings # noqa: E501
@@ -377,7 +377,7 @@ def get_mt_settings_with_http_info(self, mts_uid : StrictStr, **kwargs) -> ApiRe
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_mt_types(self, **kwargs) -> TypesDto: # noqa: E501
"""Get machine translate settings types # noqa: E501
@@ -403,7 +403,7 @@ def get_mt_types(self, **kwargs) -> TypesDto: # noqa: E501
raise ValueError("Error! Please call the get_mt_types_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_mt_types_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_mt_types_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""Get machine translate settings types # noqa: E501
@@ -517,7 +517,7 @@ def get_mt_types_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_status(self, mts_uid : StrictStr, **kwargs) -> MachineTranslateStatusDto: # noqa: E501
"""Get status of machine translate engine # noqa: E501
@@ -545,7 +545,7 @@ def get_status(self, mts_uid : StrictStr, **kwargs) -> MachineTranslateStatusDto
raise ValueError("Error! Please call the get_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_status_with_http_info(mts_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_status_with_http_info(self, mts_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get status of machine translate engine # noqa: E501
@@ -665,8 +665,8 @@ def get_status_with_http_info(self, mts_uid : StrictStr, **kwargs) -> ApiRespons
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_third_party_engines_list(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> PageDtoMachineTranslateSettingsPbmDto: # noqa: E501
+ @validate_call
+ def get_third_party_engines_list(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> PageDtoMachineTranslateSettingsPbmDto: # noqa: E501
"""List third party machine translate settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -701,8 +701,8 @@ def get_third_party_engines_list(self, name : Optional[StrictStr] = None, page_n
raise ValueError("Error! Please call the get_third_party_engines_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_third_party_engines_list_with_http_info(name, page_number, page_size, sort, order, **kwargs) # noqa: E501
- @validate_arguments
- def get_third_party_engines_list_with_http_info(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_third_party_engines_list_with_http_info(self, name : Optional[StrictStr] = None, 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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List third party machine translate settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -845,7 +845,7 @@ def get_third_party_engines_list_with_http_info(self, name : Optional[StrictStr]
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> TranslationResourcesDto: # noqa: E501
"""Get translation resources # noqa: E501
@@ -875,7 +875,7 @@ def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr
raise ValueError("Error! Please call the get_translation_resources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_translation_resources_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_translation_resources_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation resources # noqa: E501
diff --git a/phrasetms_client/api/mapping_api.py b/phrasetms_client/api/mapping_api.py
index 0fcf155a..90e3b809 100644
--- a/phrasetms_client/api/mapping_api.py
+++ b/phrasetms_client/api/mapping_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.task_mapping_dto import TaskMappingDto
@@ -45,8 +45,8 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
- def get_mapping_for_task(self, id : StrictStr, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, **kwargs) -> TaskMappingDto: # noqa: E501
+ @validate_call
+ def get_mapping_for_task(self, id : StrictStr, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, **kwargs) -> TaskMappingDto: # noqa: E501
"""Returns mapping for taskId (mxliff) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -75,8 +75,8 @@ def get_mapping_for_task(self, id : StrictStr, workflow_level : Optional[conint(
raise ValueError("Error! Please call the get_mapping_for_task_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_mapping_for_task_with_http_info(id, workflow_level, **kwargs) # noqa: E501
- @validate_arguments
- def get_mapping_for_task_with_http_info(self, id : StrictStr, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_mapping_for_task_with_http_info(self, id : StrictStr, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Returns mapping for taskId (mxliff) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/net_rate_scheme_api.py b/phrasetms_client/api/net_rate_scheme_api.py
index 43a84029..bf55ede4 100644
--- a/phrasetms_client/api/net_rate_scheme_api.py
+++ b/phrasetms_client/api/net_rate_scheme_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictInt, StrictStr, conint
+from pydantic import Field, StrictInt, StrictStr
-from typing import Optional
from phrasetms_client.models.discount_scheme_create_dto import DiscountSchemeCreateDto
from phrasetms_client.models.net_rate_scheme import NetRateScheme
@@ -51,7 +51,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_discount_scheme(self, body : Optional[DiscountSchemeCreateDto] = None, **kwargs) -> NetRateScheme: # noqa: E501
"""Create net rate scheme # noqa: E501
@@ -79,7 +79,7 @@ def create_discount_scheme(self, body : Optional[DiscountSchemeCreateDto] = None
raise ValueError("Error! Please call the create_discount_scheme_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_discount_scheme_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_discount_scheme_with_http_info(self, body : Optional[DiscountSchemeCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create net rate scheme # noqa: E501
@@ -206,7 +206,7 @@ def create_discount_scheme_with_http_info(self, body : Optional[DiscountSchemeCr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_discount_scheme_workflow_step(self, net_rate_scheme_uid : StrictStr, net_rate_scheme_workflow_step_id : StrictInt, body : Optional[NetRateSchemeWorkflowStepEdit] = None, **kwargs) -> NetRateSchemeWorkflowStep: # noqa: E501
"""Edit scheme for workflow step # noqa: E501
@@ -238,7 +238,7 @@ def edit_discount_scheme_workflow_step(self, net_rate_scheme_uid : StrictStr, ne
raise ValueError("Error! Please call the edit_discount_scheme_workflow_step_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_discount_scheme_workflow_step_with_http_info(net_rate_scheme_uid, net_rate_scheme_workflow_step_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_discount_scheme_workflow_step_with_http_info(self, net_rate_scheme_uid : StrictStr, net_rate_scheme_workflow_step_id : StrictInt, body : Optional[NetRateSchemeWorkflowStepEdit] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit scheme for workflow step # noqa: E501
@@ -370,7 +370,7 @@ def edit_discount_scheme_workflow_step_with_http_info(self, net_rate_scheme_uid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_discount_scheme(self, net_rate_scheme_uid : StrictStr, **kwargs) -> NetRateScheme: # noqa: E501
"""Get net rate scheme # noqa: E501
@@ -398,7 +398,7 @@ def get_discount_scheme(self, net_rate_scheme_uid : StrictStr, **kwargs) -> NetR
raise ValueError("Error! Please call the get_discount_scheme_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_discount_scheme_with_http_info(net_rate_scheme_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_discount_scheme_with_http_info(self, net_rate_scheme_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get net rate scheme # noqa: E501
@@ -518,7 +518,7 @@ def get_discount_scheme_with_http_info(self, net_rate_scheme_uid : StrictStr, **
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_discount_scheme_workflow_step(self, net_rate_scheme_uid : StrictStr, net_rate_scheme_workflow_step_id : StrictInt, **kwargs) -> NetRateSchemeWorkflowStep: # noqa: E501
"""Get scheme for workflow step # noqa: E501
@@ -548,7 +548,7 @@ def get_discount_scheme_workflow_step(self, net_rate_scheme_uid : StrictStr, net
raise ValueError("Error! Please call the get_discount_scheme_workflow_step_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_discount_scheme_workflow_step_with_http_info(net_rate_scheme_uid, net_rate_scheme_workflow_step_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_discount_scheme_workflow_step_with_http_info(self, net_rate_scheme_uid : StrictStr, net_rate_scheme_workflow_step_id : StrictInt, **kwargs) -> ApiResponse: # noqa: E501
"""Get scheme for workflow step # noqa: E501
@@ -674,8 +674,8 @@ def get_discount_scheme_workflow_step_with_http_info(self, net_rate_scheme_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_discount_scheme_workflow_steps(self, net_rate_scheme_uid : StrictStr, page_number : Optional[conint(strict=True, ge=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, **kwargs) -> PageDtoNetRateSchemeWorkflowStepReference: # noqa: E501
+ @validate_call
+ def get_discount_scheme_workflow_steps(self, net_rate_scheme_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=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, **kwargs) -> PageDtoNetRateSchemeWorkflowStepReference: # noqa: E501
"""List schemes for workflow step # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -706,8 +706,8 @@ def get_discount_scheme_workflow_steps(self, net_rate_scheme_uid : StrictStr, pa
raise ValueError("Error! Please call the get_discount_scheme_workflow_steps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_discount_scheme_workflow_steps_with_http_info(net_rate_scheme_uid, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_discount_scheme_workflow_steps_with_http_info(self, net_rate_scheme_uid : StrictStr, page_number : Optional[conint(strict=True, ge=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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_discount_scheme_workflow_steps_with_http_info(self, net_rate_scheme_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=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, **kwargs) -> ApiResponse: # noqa: E501
"""List schemes for workflow step # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -838,8 +838,8 @@ def get_discount_scheme_workflow_steps_with_http_info(self, net_rate_scheme_uid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_discount_schemes(self, page_number : Optional[conint(strict=True, ge=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, **kwargs) -> PageDtoNetRateSchemeReference: # noqa: E501
+ @validate_call
+ def get_discount_schemes(self, page_number : Optional[Annotated[int, Field(strict=True, ge=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, **kwargs) -> PageDtoNetRateSchemeReference: # noqa: E501
"""List net rate schemes # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -868,8 +868,8 @@ def get_discount_schemes(self, page_number : Optional[conint(strict=True, ge=0)]
raise ValueError("Error! Please call the get_discount_schemes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_discount_schemes_with_http_info(page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_discount_schemes_with_http_info(self, page_number : Optional[conint(strict=True, ge=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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_discount_schemes_with_http_info(self, page_number : Optional[Annotated[int, Field(strict=True, ge=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, **kwargs) -> ApiResponse: # noqa: E501
"""List net rate schemes # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -994,7 +994,7 @@ def get_discount_schemes_with_http_info(self, page_number : Optional[conint(stri
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_discount_scheme(self, net_rate_scheme_uid : StrictStr, body : Optional[NetRateSchemeEdit] = None, **kwargs) -> NetRateScheme: # noqa: E501
"""Edit net rate scheme # noqa: E501
@@ -1024,7 +1024,7 @@ def update_discount_scheme(self, net_rate_scheme_uid : StrictStr, body : Optiona
raise ValueError("Error! Please call the update_discount_scheme_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_discount_scheme_with_http_info(net_rate_scheme_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_discount_scheme_with_http_info(self, net_rate_scheme_uid : StrictStr, body : Optional[NetRateSchemeEdit] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit net rate scheme # noqa: E501
diff --git a/phrasetms_client/api/price_list_api.py b/phrasetms_client/api/price_list_api.py
index 7af010a4..2e0714d2 100644
--- a/phrasetms_client/api/price_list_api.py
+++ b/phrasetms_client/api/price_list_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictStr, conint, conlist
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.page_dto_translation_price_list_dto import PageDtoTranslationPriceListDto
from phrasetms_client.models.page_dto_translation_price_set_dto import PageDtoTranslationPriceSetDto
@@ -53,7 +53,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_language_pair(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetCreateDto] = None, **kwargs) -> TranslationPriceSetListDto: # noqa: E501
"""Add language pairs # noqa: E501
@@ -83,7 +83,7 @@ def create_language_pair(self, price_list_uid : StrictStr, body : Optional[Trans
raise ValueError("Error! Please call the create_language_pair_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_language_pair_with_http_info(price_list_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_language_pair_with_http_info(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add language pairs # noqa: E501
@@ -216,7 +216,7 @@ def create_language_pair_with_http_info(self, price_list_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_price_list(self, body : Optional[TranslationPriceListCreateDto] = None, **kwargs) -> TranslationPriceListDto: # noqa: E501
"""Create price list # noqa: E501
@@ -244,7 +244,7 @@ def create_price_list(self, body : Optional[TranslationPriceListCreateDto] = Non
raise ValueError("Error! Please call the create_price_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_price_list_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_price_list_with_http_info(self, body : Optional[TranslationPriceListCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create price list # noqa: E501
@@ -371,7 +371,7 @@ def create_price_list_with_http_info(self, body : Optional[TranslationPriceListC
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_language_pair(self, price_list_uid : StrictStr, source_language : StrictStr, target_language : StrictStr, **kwargs) -> None: # noqa: E501
"""Remove language pair # noqa: E501
@@ -403,7 +403,7 @@ def delete_language_pair(self, price_list_uid : StrictStr, source_language : Str
raise ValueError("Error! Please call the delete_language_pair_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_language_pair_with_http_info(price_list_uid, source_language, target_language, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_language_pair_with_http_info(self, price_list_uid : StrictStr, source_language : StrictStr, target_language : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Remove language pair # noqa: E501
@@ -518,7 +518,7 @@ def delete_language_pair_with_http_info(self, price_list_uid : StrictStr, source
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_language_pairs(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetBulkDeleteDto] = None, **kwargs) -> None: # noqa: E501
"""Remove language pairs # noqa: E501
@@ -548,7 +548,7 @@ def delete_language_pairs(self, price_list_uid : StrictStr, body : Optional[Tran
raise ValueError("Error! Please call the delete_language_pairs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_language_pairs_with_http_info(price_list_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_language_pairs_with_http_info(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetBulkDeleteDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Remove language pairs # noqa: E501
@@ -664,7 +664,7 @@ def delete_language_pairs_with_http_info(self, price_list_uid : StrictStr, body
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_price_list(self, price_list_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete price list # noqa: E501
@@ -692,7 +692,7 @@ def delete_price_list(self, price_list_uid : StrictStr, **kwargs) -> None: # no
raise ValueError("Error! Please call the delete_price_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_price_list_with_http_info(price_list_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_price_list_with_http_info(self, price_list_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete price list # noqa: E501
@@ -795,8 +795,8 @@ def delete_price_list_with_http_info(self, price_list_uid : StrictStr, **kwargs)
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_list_of_price_list(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, **kwargs) -> PageDtoTranslationPriceListDto: # noqa: E501
+ @validate_call
+ def get_list_of_price_list(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, **kwargs) -> PageDtoTranslationPriceListDto: # noqa: E501
"""List price lists # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -825,8 +825,8 @@ def get_list_of_price_list(self, page_number : Annotated[Optional[conint(strict=
raise ValueError("Error! Please call the get_list_of_price_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_list_of_price_list_with_http_info(page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_list_of_price_list_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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_list_of_price_list_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, **kwargs) -> ApiResponse: # noqa: E501
"""List price lists # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -951,7 +951,7 @@ def get_list_of_price_list_with_http_info(self, page_number : Annotated[Optional
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_price_list(self, price_list_uid : StrictStr, **kwargs) -> TranslationPriceListDto: # noqa: E501
"""Get price list # noqa: E501
@@ -979,7 +979,7 @@ def get_price_list(self, price_list_uid : StrictStr, **kwargs) -> TranslationPri
raise ValueError("Error! Please call the get_price_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_price_list_with_http_info(price_list_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_price_list_with_http_info(self, price_list_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get price list # noqa: E501
@@ -1099,8 +1099,8 @@ def get_price_list_with_http_info(self, price_list_uid : StrictStr, **kwargs) ->
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_prices_with_workflow_steps(self, price_list_uid : StrictStr, 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, source_languages : Optional[conlist(StrictStr)] = None, target_languages : Optional[conlist(StrictStr)] = None, **kwargs) -> PageDtoTranslationPriceSetDto: # noqa: E501
+ @validate_call
+ def get_prices_with_workflow_steps(self, price_list_uid : StrictStr, 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, source_languages : Optional[List[StrictStr]] = None, target_languages : Optional[List[StrictStr]] = None, **kwargs) -> PageDtoTranslationPriceSetDto: # noqa: E501
"""List price sets # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1135,8 +1135,8 @@ def get_prices_with_workflow_steps(self, price_list_uid : StrictStr, page_number
raise ValueError("Error! Please call the get_prices_with_workflow_steps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_prices_with_workflow_steps_with_http_info(price_list_uid, page_number, page_size, source_languages, target_languages, **kwargs) # noqa: E501
- @validate_arguments
- def get_prices_with_workflow_steps_with_http_info(self, price_list_uid : StrictStr, 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, source_languages : Optional[conlist(StrictStr)] = None, target_languages : Optional[conlist(StrictStr)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_prices_with_workflow_steps_with_http_info(self, price_list_uid : StrictStr, 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, source_languages : Optional[List[StrictStr]] = None, target_languages : Optional[List[StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List price sets # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1281,7 +1281,7 @@ def get_prices_with_workflow_steps_with_http_info(self, price_list_uid : StrictS
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_minimum_price_for_set(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetBulkMinimumPricesDto] = None, **kwargs) -> TranslationPriceListDto: # noqa: E501
"""Edit minimum prices # noqa: E501
@@ -1311,7 +1311,7 @@ def set_minimum_price_for_set(self, price_list_uid : StrictStr, body : Optional[
raise ValueError("Error! Please call the set_minimum_price_for_set_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_minimum_price_for_set_with_http_info(price_list_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_minimum_price_for_set_with_http_info(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetBulkMinimumPricesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit minimum prices # noqa: E501
@@ -1444,7 +1444,7 @@ def set_minimum_price_for_set_with_http_info(self, price_list_uid : StrictStr, b
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_prices(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetBulkPricesDto] = None, **kwargs) -> TranslationPriceListDto: # noqa: E501
"""Edit prices # noqa: E501
@@ -1475,7 +1475,7 @@ def set_prices(self, price_list_uid : StrictStr, body : Optional[TranslationPric
raise ValueError("Error! Please call the set_prices_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_prices_with_http_info(price_list_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_prices_with_http_info(self, price_list_uid : StrictStr, body : Optional[TranslationPriceSetBulkPricesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit prices # noqa: E501
@@ -1609,7 +1609,7 @@ def set_prices_with_http_info(self, price_list_uid : StrictStr, body : Optional[
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_price_list(self, price_list_uid : StrictStr, body : Optional[TranslationPriceListCreateDto] = None, **kwargs) -> TranslationPriceListDto: # noqa: E501
"""Update price list # noqa: E501
@@ -1639,7 +1639,7 @@ def update_price_list(self, price_list_uid : StrictStr, body : Optional[Translat
raise ValueError("Error! Please call the update_price_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_price_list_with_http_info(price_list_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_price_list_with_http_info(self, price_list_uid : StrictStr, body : Optional[TranslationPriceListCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update price list # noqa: E501
diff --git a/phrasetms_client/api/project_api.py b/phrasetms_client/api/project_api.py
index f0d72923..2228b7e6 100644
--- a/phrasetms_client/api/project_api.py
+++ b/phrasetms_client/api/project_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, validator
+from pydantic import Field, StrictBool, StrictInt, StrictStr
-from typing import Optional
from phrasetms_client.models.abstract_project_dto import AbstractProjectDto
from phrasetms_client.models.abstract_project_dto_v2 import AbstractProjectDtoV2
@@ -97,7 +97,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def add_target_language_to_project(self, project_uid : StrictStr, body : Optional[AddTargetLangDto] = None, **kwargs) -> None: # noqa: E501
"""Add target languages # noqa: E501
@@ -128,7 +128,7 @@ def add_target_language_to_project(self, project_uid : StrictStr, body : Optiona
raise ValueError("Error! Please call the add_target_language_to_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_target_language_to_project_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_target_language_to_project_with_http_info(self, project_uid : StrictStr, body : Optional[AddTargetLangDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add target languages # noqa: E501
@@ -245,7 +245,7 @@ def add_target_language_to_project_with_http_info(self, project_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def add_workflow_steps(self, project_uid : StrictStr, body : Optional[AddWorkflowStepsDto] = None, **kwargs) -> None: # noqa: E501
"""Add workflow steps # noqa: E501
@@ -275,7 +275,7 @@ def add_workflow_steps(self, project_uid : StrictStr, body : Optional[AddWorkflo
raise ValueError("Error! Please call the add_workflow_steps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_workflow_steps_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_workflow_steps_with_http_info(self, project_uid : StrictStr, body : Optional[AddWorkflowStepsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add workflow steps # noqa: E501
@@ -391,7 +391,7 @@ def add_workflow_steps_with_http_info(self, project_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def assign_linguists_from_template(self, template_uid : StrictStr, project_uid : StrictStr, **kwargs) -> JobPartsDto: # noqa: E501
"""Assigns providers from template # noqa: E501
@@ -421,7 +421,7 @@ def assign_linguists_from_template(self, template_uid : StrictStr, project_uid :
raise ValueError("Error! Please call the assign_linguists_from_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.assign_linguists_from_template_with_http_info(template_uid, project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def assign_linguists_from_template_with_http_info(self, template_uid : StrictStr, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Assigns providers from template # noqa: E501
@@ -547,7 +547,7 @@ def assign_linguists_from_template_with_http_info(self, template_uid : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def assign_linguists_from_template_to_job_parts(self, template_uid : StrictStr, project_uid : StrictStr, body : Optional[JobPartReferences] = None, **kwargs) -> JobPartsDto: # noqa: E501
"""Assigns providers from template (specific jobs) # noqa: E501
@@ -579,7 +579,7 @@ def assign_linguists_from_template_to_job_parts(self, template_uid : StrictStr,
raise ValueError("Error! Please call the assign_linguists_from_template_to_job_parts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.assign_linguists_from_template_to_job_parts_with_http_info(template_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def assign_linguists_from_template_to_job_parts_with_http_info(self, template_uid : StrictStr, project_uid : StrictStr, body : Optional[JobPartReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Assigns providers from template (specific jobs) # noqa: E501
@@ -718,7 +718,7 @@ def assign_linguists_from_template_to_job_parts_with_http_info(self, template_ui
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def assign_vendor_to_project(self, project_uid : StrictStr, body : Optional[AssignVendorDto] = None, **kwargs) -> None: # noqa: E501
"""Assign vendor # noqa: E501
@@ -749,7 +749,7 @@ def assign_vendor_to_project(self, project_uid : StrictStr, body : Optional[Assi
raise ValueError("Error! Please call the assign_vendor_to_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.assign_vendor_to_project_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def assign_vendor_to_project_with_http_info(self, project_uid : StrictStr, body : Optional[AssignVendorDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Assign vendor # noqa: E501
@@ -866,7 +866,7 @@ def assign_vendor_to_project_with_http_info(self, project_uid : StrictStr, body
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def assignable_templates(self, project_uid : StrictStr, **kwargs) -> AssignableTemplatesDto: # noqa: E501
"""List assignable templates # noqa: E501
@@ -894,7 +894,7 @@ def assignable_templates(self, project_uid : StrictStr, **kwargs) -> AssignableT
raise ValueError("Error! Please call the assignable_templates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.assignable_templates_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def assignable_templates_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""List assignable templates # noqa: E501
@@ -1014,7 +1014,7 @@ def assignable_templates_with_http_info(self, project_uid : StrictStr, **kwargs)
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def clone_project(self, project_uid : StrictStr, body : Optional[CloneProjectDto] = None, **kwargs) -> AbstractProjectDto: # noqa: E501
"""Clone project # noqa: E501
@@ -1044,7 +1044,7 @@ def clone_project(self, project_uid : StrictStr, body : Optional[CloneProjectDto
raise ValueError("Error! Please call the clone_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.clone_project_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def clone_project_with_http_info(self, project_uid : StrictStr, body : Optional[CloneProjectDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Clone project # noqa: E501
@@ -1177,7 +1177,7 @@ def clone_project_with_http_info(self, project_uid : StrictStr, body : Optional[
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_custom_fields(self, project_uid : StrictStr, body : Optional[CreateCustomFieldInstancesDto] = None, **kwargs) -> CustomFieldInstancesDto: # noqa: E501
"""Create custom field instances # noqa: E501
@@ -1207,7 +1207,7 @@ def create_custom_fields(self, project_uid : StrictStr, body : Optional[CreateCu
raise ValueError("Error! Please call the create_custom_fields_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_custom_fields_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_custom_fields_with_http_info(self, project_uid : StrictStr, body : Optional[CreateCustomFieldInstancesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create custom field instances # noqa: E501
@@ -1333,7 +1333,7 @@ def create_custom_fields_with_http_info(self, project_uid : StrictStr, body : Op
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_project_from_template_v2(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateV2Dto] = None, **kwargs) -> AbstractProjectDtoV2: # noqa: E501
"""Create project from template # noqa: E501
@@ -1363,7 +1363,7 @@ def create_project_from_template_v2(self, template_uid : StrictStr, body : Optio
raise ValueError("Error! Please call the create_project_from_template_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_project_from_template_v2_with_http_info(template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_project_from_template_v2_with_http_info(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create project from template # noqa: E501
@@ -1496,7 +1496,7 @@ def create_project_from_template_v2_with_http_info(self, template_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_project_from_template_v2_async(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateAsyncV2Dto] = None, **kwargs) -> AsyncRequestWrapperV2Dto: # noqa: E501
"""Create project from template (async) # noqa: E501
@@ -1526,7 +1526,7 @@ def create_project_from_template_v2_async(self, template_uid : StrictStr, body :
raise ValueError("Error! Please call the create_project_from_template_v2_async_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_project_from_template_v2_async_with_http_info(template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_project_from_template_v2_async_with_http_info(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateAsyncV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create project from template (async) # noqa: E501
@@ -1659,7 +1659,7 @@ def create_project_from_template_v2_async_with_http_info(self, template_uid : St
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_project_v3(self, body : Optional[CreateProjectV3Dto] = None, **kwargs) -> AbstractProjectDtoV2: # noqa: E501
"""Create project # noqa: E501
@@ -1687,7 +1687,7 @@ def create_project_v3(self, body : Optional[CreateProjectV3Dto] = None, **kwargs
raise ValueError("Error! Please call the create_project_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_project_v3_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_project_v3_with_http_info(self, body : Optional[CreateProjectV3Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create project # noqa: E501
@@ -1814,7 +1814,7 @@ def create_project_v3_with_http_info(self, body : Optional[CreateProjectV3Dto] =
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_custom_field1(self, project_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete custom field of project # noqa: E501
@@ -1844,7 +1844,7 @@ def delete_custom_field1(self, project_uid : StrictStr, field_instance_uid : Str
raise ValueError("Error! Please call the delete_custom_field1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_custom_field1_with_http_info(project_uid, field_instance_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_custom_field1_with_http_info(self, project_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete custom field of project # noqa: E501
@@ -1953,7 +1953,7 @@ def delete_custom_field1_with_http_info(self, project_uid : StrictStr, field_ins
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_project(self, project_uid : StrictStr, purge : Optional[StrictBool] = None, **kwargs) -> None: # noqa: E501
"""Delete project # noqa: E501
@@ -1983,7 +1983,7 @@ def delete_project(self, project_uid : StrictStr, purge : Optional[StrictBool] =
raise ValueError("Error! Please call the delete_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_project_with_http_info(project_uid, purge, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_project_with_http_info(self, project_uid : StrictStr, purge : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete project # noqa: E501
@@ -2092,7 +2092,7 @@ def delete_project_with_http_info(self, project_uid : StrictStr, purge : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_custom_field(self, project_uid : StrictStr, field_instance_uid : StrictStr, body : Optional[UpdateCustomFieldInstanceDto] = None, **kwargs) -> CustomFieldInstanceDto: # noqa: E501
"""Edit custom field of project # noqa: E501
@@ -2124,7 +2124,7 @@ def edit_custom_field(self, project_uid : StrictStr, field_instance_uid : Strict
raise ValueError("Error! Please call the edit_custom_field_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_custom_field_with_http_info(project_uid, field_instance_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_custom_field_with_http_info(self, project_uid : StrictStr, field_instance_uid : StrictStr, body : Optional[UpdateCustomFieldInstanceDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit custom field of project # noqa: E501
@@ -2256,7 +2256,7 @@ def edit_custom_field_with_http_info(self, project_uid : StrictStr, field_instan
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_custom_fields(self, project_uid : StrictStr, body : Optional[UpdateCustomFieldInstancesDto] = None, **kwargs) -> CustomFieldInstancesDto: # noqa: E501
"""Edit custom fields of the project (batch) # noqa: E501
@@ -2286,7 +2286,7 @@ def edit_custom_fields(self, project_uid : StrictStr, body : Optional[UpdateCust
raise ValueError("Error! Please call the edit_custom_fields_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_custom_fields_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_custom_fields_with_http_info(self, project_uid : StrictStr, body : Optional[UpdateCustomFieldInstancesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit custom fields of the project (batch) # noqa: E501
@@ -2412,7 +2412,7 @@ def edit_custom_fields_with_http_info(self, project_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_import_settings1(self, project_uid : StrictStr, body : Optional[FileImportSettingsCreateDto] = None, **kwargs) -> FileImportSettingsDto: # noqa: E501
"""Edit project import settings # noqa: E501
@@ -2442,7 +2442,7 @@ def edit_import_settings1(self, project_uid : StrictStr, body : Optional[FileImp
raise ValueError("Error! Please call the edit_import_settings1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_import_settings1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_import_settings1_with_http_info(self, project_uid : StrictStr, body : Optional[FileImportSettingsCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit project import settings # noqa: E501
@@ -2575,7 +2575,7 @@ def edit_import_settings1_with_http_info(self, project_uid : StrictStr, body : O
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_project_access_settings_v2(self, project_uid : StrictStr, body : Optional[EditProjectSecuritySettingsDtoV2] = None, **kwargs) -> ProjectSecuritySettingsDtoV2: # noqa: E501
"""Edit access and security settings # noqa: E501
@@ -2605,7 +2605,7 @@ def edit_project_access_settings_v2(self, project_uid : StrictStr, body : Option
raise ValueError("Error! Please call the edit_project_access_settings_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_project_access_settings_v2_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_project_access_settings_v2_with_http_info(self, project_uid : StrictStr, body : Optional[EditProjectSecuritySettingsDtoV2] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit access and security settings # noqa: E501
@@ -2738,7 +2738,7 @@ def edit_project_access_settings_v2_with_http_info(self, project_uid : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_project_pre_translate_settings2(self, project_uid : StrictStr, body : Optional[PreTranslateSettingsV3Dto] = None, **kwargs) -> PreTranslateSettingsV3Dto: # noqa: E501
"""Update Pre-translate settings # noqa: E501
@@ -2768,7 +2768,7 @@ def edit_project_pre_translate_settings2(self, project_uid : StrictStr, body : O
raise ValueError("Error! Please call the edit_project_pre_translate_settings2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_project_pre_translate_settings2_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_project_pre_translate_settings2_with_http_info(self, project_uid : StrictStr, body : Optional[PreTranslateSettingsV3Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update Pre-translate settings # noqa: E501
@@ -2901,7 +2901,7 @@ def edit_project_pre_translate_settings2_with_http_info(self, project_uid : Stri
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_project_v2(self, project_uid : StrictStr, body : Optional[EditProjectV2Dto] = None, **kwargs) -> AbstractProjectDtoV2: # noqa: E501
"""Edit project # noqa: E501
@@ -2931,7 +2931,7 @@ def edit_project_v2(self, project_uid : StrictStr, body : Optional[EditProjectV2
raise ValueError("Error! Please call the edit_project_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_project_v2_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_project_v2_with_http_info(self, project_uid : StrictStr, body : Optional[EditProjectV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit project # noqa: E501
@@ -3057,7 +3057,7 @@ def edit_project_v2_with_http_info(self, project_uid : StrictStr, body : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def enabled_quality_checks(self, project_uid : StrictStr, **kwargs) -> EnabledQualityChecksDto: # noqa: E501
"""Get QA checks # noqa: E501
@@ -3086,7 +3086,7 @@ def enabled_quality_checks(self, project_uid : StrictStr, **kwargs) -> EnabledQu
raise ValueError("Error! Please call the enabled_quality_checks_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.enabled_quality_checks_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def enabled_quality_checks_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get QA checks # noqa: E501
@@ -3207,7 +3207,7 @@ def enabled_quality_checks_with_http_info(self, project_uid : StrictStr, **kwarg
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_analyse_settings_for_project(self, project_uid : StrictStr, **kwargs) -> AnalyseSettingsDto: # noqa: E501
"""Get analyse settings # noqa: E501
@@ -3235,7 +3235,7 @@ def get_analyse_settings_for_project(self, project_uid : StrictStr, **kwargs) ->
raise ValueError("Error! Please call the get_analyse_settings_for_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_analyse_settings_for_project_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_analyse_settings_for_project_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get analyse settings # noqa: E501
@@ -3355,7 +3355,7 @@ def get_analyse_settings_for_project_with_http_info(self, project_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_custom_field1(self, project_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> CustomFieldInstanceDto: # noqa: E501
"""Get custom field of project # noqa: E501
@@ -3385,7 +3385,7 @@ def get_custom_field1(self, project_uid : StrictStr, field_instance_uid : Strict
raise ValueError("Error! Please call the get_custom_field1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_field1_with_http_info(project_uid, field_instance_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_custom_field1_with_http_info(self, project_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get custom field of project # noqa: E501
@@ -3511,8 +3511,8 @@ def get_custom_field1_with_http_info(self, project_uid : StrictStr, field_instan
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_custom_fields_page(self, project_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldInstanceDto: # noqa: E501
+ @validate_call
+ def get_custom_fields_page(self, project_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldInstanceDto: # noqa: E501
"""Get custom fields of project (page) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3551,8 +3551,8 @@ def get_custom_fields_page(self, project_uid : StrictStr, page_number : Annotate
raise ValueError("Error! Please call the get_custom_fields_page_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_fields_page_with_http_info(project_uid, page_number, page_size, created_by, modified_by, sort_field, sort_trend, **kwargs) # noqa: E501
- @validate_arguments
- def get_custom_fields_page_with_http_info(self, project_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_custom_fields_page_with_http_info(self, project_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get custom fields of project (page) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3709,7 +3709,7 @@ def get_custom_fields_page_with_http_info(self, project_uid : StrictStr, page_nu
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_file_naming_settings(self, project_uid : StrictStr, **kwargs) -> FileNamingSettingsDto: # noqa: E501
"""Get file naming settings for project # noqa: E501
@@ -3737,7 +3737,7 @@ def get_file_naming_settings(self, project_uid : StrictStr, **kwargs) -> FileNam
raise ValueError("Error! Please call the get_file_naming_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_file_naming_settings_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_file_naming_settings_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get file naming settings for project # noqa: E501
@@ -3857,7 +3857,7 @@ def get_file_naming_settings_with_http_info(self, project_uid : StrictStr, **kwa
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_financial_settings(self, project_uid : StrictStr, **kwargs) -> FinancialSettingsDto: # noqa: E501
"""Get financial settings # noqa: E501
@@ -3885,7 +3885,7 @@ def get_financial_settings(self, project_uid : StrictStr, **kwargs) -> Financial
raise ValueError("Error! Please call the get_financial_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_financial_settings_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_financial_settings_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get financial settings # noqa: E501
@@ -4005,7 +4005,7 @@ def get_financial_settings_with_http_info(self, project_uid : StrictStr, **kwarg
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_import_settings2(self, project_uid : StrictStr, **kwargs) -> FileImportSettingsDto: # noqa: E501
"""Get projects's default import settings # noqa: E501
@@ -4033,7 +4033,7 @@ def get_import_settings2(self, project_uid : StrictStr, **kwargs) -> FileImportS
raise ValueError("Error! Please call the get_import_settings2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_import_settings2_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_import_settings2_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get projects's default import settings # noqa: E501
@@ -4153,7 +4153,7 @@ def get_import_settings2_with_http_info(self, project_uid : StrictStr, **kwargs)
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_mt_settings_for_project(self, project_uid : StrictStr, **kwargs) -> MTSettingsPerLanguageListDto: # noqa: E501
"""Get project machine translate settings # noqa: E501
@@ -4181,7 +4181,7 @@ def get_mt_settings_for_project(self, project_uid : StrictStr, **kwargs) -> MTSe
raise ValueError("Error! Please call the get_mt_settings_for_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_mt_settings_for_project_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_mt_settings_for_project_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get project machine translate settings # noqa: E501
@@ -4301,7 +4301,7 @@ def get_mt_settings_for_project_with_http_info(self, project_uid : StrictStr, **
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_pre_translate_settings_for_project2(self, project_uid : StrictStr, **kwargs) -> PreTranslateSettingsV3Dto: # noqa: E501
"""Get Pre-translate settings # noqa: E501
@@ -4329,7 +4329,7 @@ def get_pre_translate_settings_for_project2(self, project_uid : StrictStr, **kwa
raise ValueError("Error! Please call the get_pre_translate_settings_for_project2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_pre_translate_settings_for_project2_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_pre_translate_settings_for_project2_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get Pre-translate settings # noqa: E501
@@ -4449,7 +4449,7 @@ def get_pre_translate_settings_for_project2_with_http_info(self, project_uid : S
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project(self, project_uid : StrictStr, **kwargs) -> AbstractProjectDto: # noqa: E501
"""Get project # noqa: E501
@@ -4477,7 +4477,7 @@ def get_project(self, project_uid : StrictStr, **kwargs) -> AbstractProjectDto:
raise ValueError("Error! Please call the get_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get project # noqa: E501
@@ -4597,7 +4597,7 @@ def get_project_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiRe
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_access_settings_v2(self, project_uid : StrictStr, **kwargs) -> ProjectSecuritySettingsDtoV2: # noqa: E501
"""Get access and security settings # noqa: E501
@@ -4625,7 +4625,7 @@ def get_project_access_settings_v2(self, project_uid : StrictStr, **kwargs) -> P
raise ValueError("Error! Please call the get_project_access_settings_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_access_settings_v2_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_access_settings_v2_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get access and security settings # noqa: E501
@@ -4745,8 +4745,8 @@ def get_project_access_settings_v2_with_http_info(self, project_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_project_assignments(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoProviderReference: # noqa: E501
+ @validate_call
+ def get_project_assignments(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoProviderReference: # noqa: E501
"""List project providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4779,8 +4779,8 @@ def get_project_assignments(self, project_uid : StrictStr, provider_name : Optio
raise ValueError("Error! Please call the get_project_assignments_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_assignments_with_http_info(project_uid, provider_name, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_project_assignments_with_http_info(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_project_assignments_with_http_info(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4917,8 +4917,8 @@ def get_project_assignments_with_http_info(self, project_uid : StrictStr, provid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_project_settings(self, project_uid : StrictStr, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, **kwargs) -> LqaSettingsDto: # noqa: E501
+ @validate_call
+ def get_project_settings(self, project_uid : StrictStr, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, **kwargs) -> LqaSettingsDto: # noqa: E501
"""Get LQA settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4947,8 +4947,8 @@ def get_project_settings(self, project_uid : StrictStr, workflow_level : Optiona
raise ValueError("Error! Please call the get_project_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_settings_with_http_info(project_uid, workflow_level, **kwargs) # noqa: E501
- @validate_arguments
- def get_project_settings_with_http_info(self, project_uid : StrictStr, workflow_level : Optional[conint(strict=True, le=15, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_project_settings_with_http_info(self, project_uid : StrictStr, workflow_level : Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get LQA settings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5073,7 +5073,7 @@ def get_project_settings_with_http_info(self, project_uid : StrictStr, workflow_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_term_bases(self, project_uid : StrictStr, **kwargs) -> ProjectTermBaseListDto: # noqa: E501
"""Get term bases # noqa: E501
@@ -5101,7 +5101,7 @@ def get_project_term_bases(self, project_uid : StrictStr, **kwargs) -> ProjectTe
raise ValueError("Error! Please call the get_project_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_term_bases_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_term_bases_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get term bases # noqa: E501
@@ -5221,7 +5221,7 @@ def get_project_term_bases_with_http_info(self, project_uid : StrictStr, **kwarg
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_trans_memories1(self, project_uid : StrictStr, target_lang : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by target language")] = None, wf_step_uid : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by workflow step")] = None, **kwargs) -> ProjectTransMemoryListDtoV3: # noqa: E501
"""Get translation memories # noqa: E501
@@ -5253,7 +5253,7 @@ def get_project_trans_memories1(self, project_uid : StrictStr, target_lang : Ann
raise ValueError("Error! Please call the get_project_trans_memories1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_trans_memories1_with_http_info(project_uid, target_lang, wf_step_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_trans_memories1_with_http_info(self, project_uid : StrictStr, target_lang : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by target language")] = None, wf_step_uid : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by workflow step")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation memories # noqa: E501
@@ -5385,7 +5385,7 @@ def get_project_trans_memories1_with_http_info(self, project_uid : StrictStr, ta
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_workflow_steps_v2(self, project_uid : StrictStr, with_assigned_jobs : Annotated[Optional[StrictBool], Field(description="Return only steps containing jobs assigned to the calling linguist.")] = None, **kwargs) -> ProjectWorkflowStepListDtoV2: # noqa: E501
"""Get workflow steps # noqa: E501
@@ -5415,7 +5415,7 @@ def get_project_workflow_steps_v2(self, project_uid : StrictStr, with_assigned_j
raise ValueError("Error! Please call the get_project_workflow_steps_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_workflow_steps_v2_with_http_info(project_uid, with_assigned_jobs, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_workflow_steps_v2_with_http_info(self, project_uid : StrictStr, with_assigned_jobs : Annotated[Optional[StrictBool], Field(description="Return only steps containing jobs assigned to the calling linguist.")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get workflow steps # noqa: E501
@@ -5541,8 +5541,8 @@ def get_project_workflow_steps_v2_with_http_info(self, project_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_quotes_for_project(self, project_uid : StrictStr, page_number : Optional[conint(strict=True, ge=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, **kwargs) -> PageDtoQuoteDto: # noqa: E501
+ @validate_call
+ def get_quotes_for_project(self, project_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=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, **kwargs) -> PageDtoQuoteDto: # noqa: E501
"""List quotes # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5573,8 +5573,8 @@ def get_quotes_for_project(self, project_uid : StrictStr, page_number : Optional
raise ValueError("Error! Please call the get_quotes_for_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_quotes_for_project_with_http_info(project_uid, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_quotes_for_project_with_http_info(self, project_uid : StrictStr, page_number : Optional[conint(strict=True, ge=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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_quotes_for_project_with_http_info(self, project_uid : StrictStr, page_number : Optional[Annotated[int, Field(strict=True, ge=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, **kwargs) -> ApiResponse: # noqa: E501
"""List quotes # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5705,8 +5705,8 @@ def get_quotes_for_project_with_http_info(self, project_uid : StrictStr, page_nu
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_assigned_projects(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, target_lang : Optional[conlist(StrictStr)] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoProjectReference: # noqa: E501
+ @validate_call
+ def list_assigned_projects(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, target_lang : Optional[List[StrictStr]] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoProjectReference: # noqa: E501
"""List assigned projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5749,8 +5749,8 @@ def list_assigned_projects(self, user_uid : StrictStr, status : Optional[conlist
raise ValueError("Error! Please call the list_assigned_projects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_assigned_projects_with_http_info(user_uid, status, target_lang, workflow_step_id, due_in_hours, filename, project_name, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_assigned_projects_with_http_info(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, target_lang : Optional[conlist(StrictStr)] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_assigned_projects_with_http_info(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, target_lang : Optional[List[StrictStr]] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List assigned projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5919,8 +5919,8 @@ def list_assigned_projects_with_http_info(self, user_uid : StrictStr, status : O
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_by_project_v3(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[conint(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
+ @validate_call
+ def list_by_project_v3(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> PageDtoAnalyseReference: # noqa: E501
"""List analyses by project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -5961,8 +5961,8 @@ def list_by_project_v3(self, project_uid : StrictStr, name : Annotated[Optional[
raise ValueError("Error! Please call the list_by_project_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_by_project_v3_with_http_info(project_uid, name, uid, page_number, page_size, sort, order, only_owner_org, **kwargs) # noqa: E501
- @validate_arguments
- def list_by_project_v3_with_http_info(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[conint(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_by_project_v3_with_http_info(self, project_uid : StrictStr, name : Annotated[Optional[StrictStr], Field(description="Name to search by")] = None, uid : Annotated[Optional[StrictStr], Field(description="Uid to search by")] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=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, sort : Annotated[Optional[StrictStr], Field(description="Sorting field")] = None, order : Annotated[Optional[StrictStr], Field(description="Sorting order")] = None, only_owner_org : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List analyses by project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -6123,8 +6123,8 @@ def list_by_project_v3_with_http_info(self, project_uid : StrictStr, name : Anno
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_projects(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, business_unit_id : Optional[StrictInt] = None, business_unit_name : Optional[StrictStr] = None, statuses : Optional[conlist(StrictStr)] = None, target_langs : Optional[conlist(StrictStr)] = None, domain_id : Optional[StrictInt] = None, domain_name : Optional[StrictStr] = None, sub_domain_id : Optional[StrictInt] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for projects that are overdue")] = None, created_in_last_hours : Optional[conint(strict=True, ge=0)] = None, source_langs : Optional[conlist(StrictStr)] = None, owner_id : Optional[StrictInt] = None, job_statuses : Annotated[Optional[conlist(StrictStr)], Field(description="Allowed for linguists only")] = None, job_status_group : Annotated[Optional[StrictStr], Field(description="Allowed for linguists only")] = None, buyer_id : Optional[StrictInt] = None, 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_or_internal_id : Annotated[Optional[StrictStr], Field(description="Name or internal ID of project")] = None, include_archived : Annotated[Optional[StrictBool], Field(description="List also archived projects")] = None, archived_only : Annotated[Optional[StrictBool], Field(description="List only archived projects, regardless of `includeArchived`")] = None, **kwargs) -> PageDtoAbstractProjectDto: # noqa: E501
+ @validate_call
+ def list_projects(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, business_unit_id : Optional[StrictInt] = None, business_unit_name : Optional[StrictStr] = None, statuses : Optional[List[StrictStr]] = None, target_langs : Optional[List[StrictStr]] = None, domain_id : Optional[StrictInt] = None, domain_name : Optional[StrictStr] = None, sub_domain_id : Optional[StrictInt] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for projects that are overdue")] = None, created_in_last_hours : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, source_langs : Optional[List[StrictStr]] = None, owner_id : Optional[StrictInt] = None, job_statuses : Annotated[Optional[List[StrictStr]], Field(description="Allowed for linguists only")] = None, job_status_group : Annotated[Optional[StrictStr], Field(description="Allowed for linguists only")] = None, buyer_id : Optional[StrictInt] = None, 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_or_internal_id : Annotated[Optional[StrictStr], Field(description="Name or internal ID of project")] = None, include_archived : Annotated[Optional[StrictBool], Field(description="List also archived projects")] = None, archived_only : Annotated[Optional[StrictBool], Field(description="List only archived projects, regardless of `includeArchived`")] = None, **kwargs) -> PageDtoAbstractProjectDto: # noqa: E501
"""List projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -6199,8 +6199,8 @@ def list_projects(self, name : Optional[StrictStr] = None, client_id : Optional[
raise ValueError("Error! Please call the list_projects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_projects_with_http_info(name, client_id, client_name, business_unit_id, business_unit_name, statuses, target_langs, domain_id, domain_name, sub_domain_id, sub_domain_name, cost_center_id, cost_center_name, due_in_hours, created_in_last_hours, source_langs, owner_id, job_statuses, job_status_group, buyer_id, page_number, page_size, name_or_internal_id, include_archived, archived_only, **kwargs) # noqa: E501
- @validate_arguments
- def list_projects_with_http_info(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, business_unit_id : Optional[StrictInt] = None, business_unit_name : Optional[StrictStr] = None, statuses : Optional[conlist(StrictStr)] = None, target_langs : Optional[conlist(StrictStr)] = None, domain_id : Optional[StrictInt] = None, domain_name : Optional[StrictStr] = None, sub_domain_id : Optional[StrictInt] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for projects that are overdue")] = None, created_in_last_hours : Optional[conint(strict=True, ge=0)] = None, source_langs : Optional[conlist(StrictStr)] = None, owner_id : Optional[StrictInt] = None, job_statuses : Annotated[Optional[conlist(StrictStr)], Field(description="Allowed for linguists only")] = None, job_status_group : Annotated[Optional[StrictStr], Field(description="Allowed for linguists only")] = None, buyer_id : Optional[StrictInt] = None, 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_or_internal_id : Annotated[Optional[StrictStr], Field(description="Name or internal ID of project")] = None, include_archived : Annotated[Optional[StrictBool], Field(description="List also archived projects")] = None, archived_only : Annotated[Optional[StrictBool], Field(description="List only archived projects, regardless of `includeArchived`")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_projects_with_http_info(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, business_unit_id : Optional[StrictInt] = None, business_unit_name : Optional[StrictStr] = None, statuses : Optional[List[StrictStr]] = None, target_langs : Optional[List[StrictStr]] = None, domain_id : Optional[StrictInt] = None, domain_name : Optional[StrictStr] = None, sub_domain_id : Optional[StrictInt] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for projects that are overdue")] = None, created_in_last_hours : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, source_langs : Optional[List[StrictStr]] = None, owner_id : Optional[StrictInt] = None, job_statuses : Annotated[Optional[List[StrictStr]], Field(description="Allowed for linguists only")] = None, job_status_group : Annotated[Optional[StrictStr], Field(description="Allowed for linguists only")] = None, buyer_id : Optional[StrictInt] = None, 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_or_internal_id : Annotated[Optional[StrictStr], Field(description="Name or internal ID of project")] = None, include_archived : Annotated[Optional[StrictBool], Field(description="List also archived projects")] = None, archived_only : Annotated[Optional[StrictBool], Field(description="List only archived projects, regardless of `includeArchived`")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -6467,7 +6467,7 @@ def list_projects_with_http_info(self, name : Optional[StrictStr] = None, client
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_providers3(self, project_uid : StrictStr, **kwargs) -> ProviderListDtoV2: # noqa: E501
"""Get suggested providers # noqa: E501
@@ -6495,7 +6495,7 @@ def list_providers3(self, project_uid : StrictStr, **kwargs) -> ProviderListDtoV
raise ValueError("Error! Please call the list_providers3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_providers3_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_providers3_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get suggested providers # noqa: E501
@@ -6615,7 +6615,7 @@ def list_providers3_with_http_info(self, project_uid : StrictStr, **kwargs) -> A
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def patch_project(self, project_uid : StrictStr, body : Optional[PatchProjectDto] = None, **kwargs) -> AbstractProjectDto: # noqa: E501
"""Edit project # noqa: E501
@@ -6645,7 +6645,7 @@ def patch_project(self, project_uid : StrictStr, body : Optional[PatchProjectDto
raise ValueError("Error! Please call the patch_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.patch_project_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def patch_project_with_http_info(self, project_uid : StrictStr, body : Optional[PatchProjectDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit project # noqa: E501
@@ -6778,8 +6778,8 @@ def patch_project_with_http_info(self, project_uid : StrictStr, body : Optional[
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def relevant_term_bases(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTermBaseDto: # noqa: E501
+ @validate_call
+ def relevant_term_bases(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTermBaseDto: # noqa: E501
"""List project relevant term bases # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -6822,8 +6822,8 @@ def relevant_term_bases(self, project_uid : StrictStr, name : Optional[StrictStr
raise ValueError("Error! Please call the relevant_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.relevant_term_bases_with_http_info(project_uid, name, domain_name, client_name, sub_domain_name, target_langs, strict_lang_matching, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def relevant_term_bases_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def relevant_term_bases_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project relevant term bases # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -6991,8 +6991,8 @@ def relevant_term_bases_with_http_info(self, project_uid : StrictStr, name : Opt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def relevant_trans_memories1(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
+ @validate_call
+ def relevant_trans_memories1(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
"""List project relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -7035,8 +7035,8 @@ def relevant_trans_memories1(self, project_uid : StrictStr, name : Optional[Stri
raise ValueError("Error! Please call the relevant_trans_memories1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.relevant_trans_memories1_with_http_info(project_uid, name, domain_name, client_name, sub_domain_name, target_langs, strict_lang_matching, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def relevant_trans_memories1_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def relevant_trans_memories1_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -7204,7 +7204,7 @@ def relevant_trans_memories1_with_http_info(self, project_uid : StrictStr, name
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_segment1(self, project_uid : StrictStr, body : Optional[SearchTMRequestDto] = None, **kwargs) -> SearchResponseListTmDto: # noqa: E501
"""Search translation memory for segment in the project # noqa: E501
@@ -7235,7 +7235,7 @@ def search_segment1(self, project_uid : StrictStr, body : Optional[SearchTMReque
raise ValueError("Error! Please call the search_segment1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_segment1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_segment1_with_http_info(self, project_uid : StrictStr, body : Optional[SearchTMRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search translation memory for segment in the project # noqa: E501
@@ -7369,7 +7369,7 @@ def search_segment1_with_http_info(self, project_uid : StrictStr, body : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_financial_settings(self, project_uid : StrictStr, body : Optional[SetFinancialSettingsDto] = None, **kwargs) -> FinancialSettingsDto: # noqa: E501
"""Edit financial settings # noqa: E501
@@ -7399,7 +7399,7 @@ def set_financial_settings(self, project_uid : StrictStr, body : Optional[SetFin
raise ValueError("Error! Please call the set_financial_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_financial_settings_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_financial_settings_with_http_info(self, project_uid : StrictStr, body : Optional[SetFinancialSettingsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit financial settings # noqa: E501
@@ -7532,7 +7532,7 @@ def set_financial_settings_with_http_info(self, project_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_mt_settings_for_project(self, project_uid : StrictStr, body : Optional[EditProjectMTSettingsDto] = None, **kwargs) -> MTSettingsPerLanguageListDto: # noqa: E501
"""Edit machine translate settings # noqa: E501
@@ -7563,7 +7563,7 @@ def set_mt_settings_for_project(self, project_uid : StrictStr, body : Optional[E
raise ValueError("Error! Please call the set_mt_settings_for_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_mt_settings_for_project_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_mt_settings_for_project_with_http_info(self, project_uid : StrictStr, body : Optional[EditProjectMTSettingsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit machine translate settings # noqa: E501
@@ -7697,7 +7697,7 @@ def set_mt_settings_for_project_with_http_info(self, project_uid : StrictStr, bo
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_mt_settings_per_language_for_project(self, project_uid : StrictStr, body : Optional[EditProjectMTSettPerLangListDto] = None, **kwargs) -> MTSettingsPerLanguageListDto: # noqa: E501
"""Edit machine translate settings per language # noqa: E501
@@ -7728,7 +7728,7 @@ def set_mt_settings_per_language_for_project(self, project_uid : StrictStr, body
raise ValueError("Error! Please call the set_mt_settings_per_language_for_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_mt_settings_per_language_for_project_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_mt_settings_per_language_for_project_with_http_info(self, project_uid : StrictStr, body : Optional[EditProjectMTSettPerLangListDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit machine translate settings per language # noqa: E501
@@ -7862,7 +7862,7 @@ def set_mt_settings_per_language_for_project_with_http_info(self, project_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_qa_settings_v2(self, project_uid : StrictStr, body : Optional[EditQASettingsDtoV2] = None, **kwargs) -> QASettingsDtoV2: # noqa: E501
"""Edit quality assurance settings # noqa: E501
@@ -7892,7 +7892,7 @@ def set_project_qa_settings_v2(self, project_uid : StrictStr, body : Optional[Ed
raise ValueError("Error! Please call the set_project_qa_settings_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_qa_settings_v2_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_qa_settings_v2_with_http_info(self, project_uid : StrictStr, body : Optional[EditQASettingsDtoV2] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit quality assurance settings # noqa: E501
@@ -8025,7 +8025,7 @@ def set_project_qa_settings_v2_with_http_info(self, project_uid : StrictStr, bod
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_status(self, project_uid : StrictStr, body : Optional[SetProjectStatusDto] = None, **kwargs) -> None: # noqa: E501
"""Edit project status # noqa: E501
@@ -8055,7 +8055,7 @@ def set_project_status(self, project_uid : StrictStr, body : Optional[SetProject
raise ValueError("Error! Please call the set_project_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_status_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_status_with_http_info(self, project_uid : StrictStr, body : Optional[SetProjectStatusDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit project status # noqa: E501
@@ -8171,7 +8171,7 @@ def set_project_status_with_http_info(self, project_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_term_bases(self, project_uid : StrictStr, body : Optional[SetTermBaseDto] = None, **kwargs) -> ProjectTermBaseListDto: # noqa: E501
"""Edit term bases # noqa: E501
@@ -8201,7 +8201,7 @@ def set_project_term_bases(self, project_uid : StrictStr, body : Optional[SetTer
raise ValueError("Error! Please call the set_project_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_term_bases_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_term_bases_with_http_info(self, project_uid : StrictStr, body : Optional[SetTermBaseDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit term bases # noqa: E501
@@ -8334,7 +8334,7 @@ def set_project_term_bases_with_http_info(self, project_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_trans_memories_v3(self, project_uid : StrictStr, body : Optional[SetProjectTransMemoriesV3Dto] = None, **kwargs) -> ProjectTransMemoryListDtoV3: # noqa: E501
"""Edit translation memories # noqa: E501
@@ -8365,7 +8365,7 @@ def set_project_trans_memories_v3(self, project_uid : StrictStr, body : Optional
raise ValueError("Error! Please call the set_project_trans_memories_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_trans_memories_v3_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_trans_memories_v3_with_http_info(self, project_uid : StrictStr, body : Optional[SetProjectTransMemoriesV3Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit translation memories # noqa: E501
@@ -8499,7 +8499,7 @@ def set_project_trans_memories_v3_with_http_info(self, project_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_file_naming_settings(self, project_uid : StrictStr, body : Optional[FileNamingSettingsDto] = None, **kwargs) -> FileNamingSettingsDto: # noqa: E501
"""Update file naming settings for project # noqa: E501
@@ -8529,7 +8529,7 @@ def update_file_naming_settings(self, project_uid : StrictStr, body : Optional[F
raise ValueError("Error! Please call the update_file_naming_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_file_naming_settings_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_file_naming_settings_with_http_info(self, project_uid : StrictStr, body : Optional[FileNamingSettingsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update file naming settings for project # noqa: E501
diff --git a/phrasetms_client/api/project_reference_file_api.py b/phrasetms_client/api/project_reference_file_api.py
index ba30e0f0..16faa108 100644
--- a/phrasetms_client/api/project_reference_file_api.py
+++ b/phrasetms_client/api/project_reference_file_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.create_reference_file_note_dto import CreateReferenceFileNoteDto
from phrasetms_client.models.project_reference_files_request_dto import ProjectReferenceFilesRequestDto
@@ -49,7 +49,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def batch_delete_reference_files(self, project_uid : StrictStr, body : Optional[ProjectReferenceFilesRequestDto] = None, **kwargs) -> None: # noqa: E501
"""Delete project reference files (batch) # noqa: E501
@@ -79,7 +79,7 @@ def batch_delete_reference_files(self, project_uid : StrictStr, body : Optional[
raise ValueError("Error! Please call the batch_delete_reference_files_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.batch_delete_reference_files_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def batch_delete_reference_files_with_http_info(self, project_uid : StrictStr, body : Optional[ProjectReferenceFilesRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete project reference files (batch) # noqa: E501
@@ -195,7 +195,7 @@ def batch_delete_reference_files_with_http_info(self, project_uid : StrictStr, b
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def batch_download_reference_files(self, project_uid : StrictStr, body : Optional[ProjectReferenceFilesRequestDto] = None, **kwargs) -> None: # noqa: E501
"""Download project reference files (batch) # noqa: E501
@@ -225,7 +225,7 @@ def batch_download_reference_files(self, project_uid : StrictStr, body : Optiona
raise ValueError("Error! Please call the batch_download_reference_files_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.batch_download_reference_files_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def batch_download_reference_files_with_http_info(self, project_uid : StrictStr, body : Optional[ProjectReferenceFilesRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download project reference files (batch) # noqa: E501
@@ -341,7 +341,7 @@ def batch_download_reference_files_with_http_info(self, project_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_note_ref(self, project_uid : StrictStr, content_disposition : Annotated[Optional[StrictStr], Field(description="Required for `application/octet-stream`.
Example: `filename*=UTF-8''YourFileName.txt`")] = None, x_memsource_note : Annotated[Optional[StrictStr], Field(description="For use with `application/octet-stream`")] = None, body : Optional[CreateReferenceFileNoteDto] = None, **kwargs) -> ReferenceFileReference: # noqa: E501
"""Create project reference file # noqa: E501
@@ -376,7 +376,7 @@ def create_note_ref(self, project_uid : StrictStr, content_disposition : Annotat
raise ValueError("Error! Please call the create_note_ref_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_note_ref_with_http_info(project_uid, content_disposition, x_memsource_note, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_note_ref_with_http_info(self, project_uid : StrictStr, content_disposition : Annotated[Optional[StrictStr], Field(description="Required for `application/octet-stream`.
Example: `filename*=UTF-8''YourFileName.txt`")] = None, x_memsource_note : Annotated[Optional[StrictStr], Field(description="For use with `application/octet-stream`")] = None, body : Optional[CreateReferenceFileNoteDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create project reference file # noqa: E501
@@ -522,7 +522,7 @@ def create_note_ref_with_http_info(self, project_uid : StrictStr, content_dispos
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def download_reference(self, project_uid : StrictStr, reference_file_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Download project reference file # noqa: E501
@@ -552,7 +552,7 @@ def download_reference(self, project_uid : StrictStr, reference_file_id : Strict
raise ValueError("Error! Please call the download_reference_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.download_reference_with_http_info(project_uid, reference_file_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def download_reference_with_http_info(self, project_uid : StrictStr, reference_file_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Download project reference file # noqa: E501
@@ -661,7 +661,7 @@ def download_reference_with_http_info(self, project_uid : StrictStr, reference_f
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_reference_file_creators(self, project_uid : StrictStr, user_name : Optional[StrictStr] = None, **kwargs) -> UserReferencesDto: # noqa: E501
"""List project reference file creators # noqa: E501
@@ -692,7 +692,7 @@ def list_reference_file_creators(self, project_uid : StrictStr, user_name : Opti
raise ValueError("Error! Please call the list_reference_file_creators_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_reference_file_creators_with_http_info(project_uid, user_name, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_reference_file_creators_with_http_info(self, project_uid : StrictStr, user_name : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List project reference file creators # noqa: E501
@@ -819,8 +819,8 @@ def list_reference_file_creators_with_http_info(self, project_uid : StrictStr, u
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_reference_files(self, project_uid : StrictStr, filename : Optional[StrictStr] = None, date_created_since : Annotated[Optional[StrictStr], Field(description="date time in ISO 8601 UTC format")] = None, created_by : Annotated[Optional[StrictStr], Field(description="UID of user")] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, **kwargs) -> ReferenceFilePageDto: # noqa: E501
+ @validate_call
+ def list_reference_files(self, project_uid : StrictStr, filename : Optional[StrictStr] = None, date_created_since : Annotated[Optional[StrictStr], Field(description="date time in ISO 8601 UTC format")] = None, created_by : Annotated[Optional[StrictStr], Field(description="UID of user")] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, **kwargs) -> ReferenceFilePageDto: # noqa: E501
"""List project reference files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -861,8 +861,8 @@ def list_reference_files(self, project_uid : StrictStr, filename : Optional[Stri
raise ValueError("Error! Please call the list_reference_files_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_reference_files_with_http_info(project_uid, filename, date_created_since, created_by, page_number, page_size, sort, order, **kwargs) # noqa: E501
- @validate_arguments
- def list_reference_files_with_http_info(self, project_uid : StrictStr, filename : Optional[StrictStr] = None, date_created_since : Annotated[Optional[StrictStr], Field(description="date time in ISO 8601 UTC format")] = None, created_by : Annotated[Optional[StrictStr], Field(description="UID of user")] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_reference_files_with_http_info(self, project_uid : StrictStr, filename : Optional[StrictStr] = None, date_created_since : Annotated[Optional[StrictStr], Field(description="date time in ISO 8601 UTC format")] = None, created_by : Annotated[Optional[StrictStr], Field(description="UID of user")] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List project reference files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/project_template_api.py b/phrasetms_client/api/project_template_api.py
index d72b056b..81ae9ba7 100644
--- a/phrasetms_client/api/project_template_api.py
+++ b/phrasetms_client/api/project_template_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, StringConstraints, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator
+from pydantic import Field, StrictBool, StrictInt, StrictStr, StringConstraints
-from typing import Optional
from phrasetms_client.models.abstract_analyse_settings_dto import AbstractAnalyseSettingsDto
from phrasetms_client.models.abstract_project_dto_v2 import AbstractProjectDtoV2
@@ -77,7 +77,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def assign_linguists_from_template(self, template_uid : StrictStr, project_uid : StrictStr, **kwargs) -> JobPartsDto: # noqa: E501
"""Assigns providers from template # noqa: E501
@@ -107,7 +107,7 @@ def assign_linguists_from_template(self, template_uid : StrictStr, project_uid :
raise ValueError("Error! Please call the assign_linguists_from_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.assign_linguists_from_template_with_http_info(template_uid, project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def assign_linguists_from_template_with_http_info(self, template_uid : StrictStr, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Assigns providers from template # noqa: E501
@@ -233,7 +233,7 @@ def assign_linguists_from_template_with_http_info(self, template_uid : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def assign_linguists_from_template_to_job_parts(self, template_uid : StrictStr, project_uid : StrictStr, body : Optional[JobPartReferences] = None, **kwargs) -> JobPartsDto: # noqa: E501
"""Assigns providers from template (specific jobs) # noqa: E501
@@ -265,7 +265,7 @@ def assign_linguists_from_template_to_job_parts(self, template_uid : StrictStr,
raise ValueError("Error! Please call the assign_linguists_from_template_to_job_parts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.assign_linguists_from_template_to_job_parts_with_http_info(template_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def assign_linguists_from_template_to_job_parts_with_http_info(self, template_uid : StrictStr, project_uid : StrictStr, body : Optional[JobPartReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Assigns providers from template (specific jobs) # noqa: E501
@@ -404,7 +404,7 @@ def assign_linguists_from_template_to_job_parts_with_http_info(self, template_ui
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def assignable_templates(self, project_uid : StrictStr, **kwargs) -> AssignableTemplatesDto: # noqa: E501
"""List assignable templates # noqa: E501
@@ -432,7 +432,7 @@ def assignable_templates(self, project_uid : StrictStr, **kwargs) -> AssignableT
raise ValueError("Error! Please call the assignable_templates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.assignable_templates_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def assignable_templates_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""List assignable templates # noqa: E501
@@ -552,7 +552,7 @@ def assignable_templates_with_http_info(self, project_uid : StrictStr, **kwargs)
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_custom_fields1(self, project_template_uid : StrictStr, body : Optional[CreateCustomFieldInstancesDto] = None, **kwargs) -> CustomFieldInstancesDto: # noqa: E501
"""Create custom field instances # noqa: E501
@@ -582,7 +582,7 @@ def create_custom_fields1(self, project_template_uid : StrictStr, body : Optiona
raise ValueError("Error! Please call the create_custom_fields1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_custom_fields1_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_custom_fields1_with_http_info(self, project_template_uid : StrictStr, body : Optional[CreateCustomFieldInstancesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create custom field instances # noqa: E501
@@ -708,7 +708,7 @@ def create_custom_fields1_with_http_info(self, project_template_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_project_from_template_v2(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateV2Dto] = None, **kwargs) -> AbstractProjectDtoV2: # noqa: E501
"""Create project from template # noqa: E501
@@ -738,7 +738,7 @@ def create_project_from_template_v2(self, template_uid : StrictStr, body : Optio
raise ValueError("Error! Please call the create_project_from_template_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_project_from_template_v2_with_http_info(template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_project_from_template_v2_with_http_info(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create project from template # noqa: E501
@@ -871,7 +871,7 @@ def create_project_from_template_v2_with_http_info(self, template_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_project_from_template_v2_async(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateAsyncV2Dto] = None, **kwargs) -> AsyncRequestWrapperV2Dto: # noqa: E501
"""Create project from template (async) # noqa: E501
@@ -901,7 +901,7 @@ def create_project_from_template_v2_async(self, template_uid : StrictStr, body :
raise ValueError("Error! Please call the create_project_from_template_v2_async_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_project_from_template_v2_async_with_http_info(template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_project_from_template_v2_async_with_http_info(self, template_uid : StrictStr, body : Optional[CreateProjectFromTemplateAsyncV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create project from template (async) # noqa: E501
@@ -1034,7 +1034,7 @@ def create_project_from_template_v2_async_with_http_info(self, template_uid : St
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_project_template(self, body : ProjectTemplateCreateActionDto, **kwargs) -> ProjectTemplateDto: # noqa: E501
"""Create project template # noqa: E501
@@ -1062,7 +1062,7 @@ def create_project_template(self, body : ProjectTemplateCreateActionDto, **kwarg
raise ValueError("Error! Please call the create_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_project_template_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_project_template_with_http_info(self, body : ProjectTemplateCreateActionDto, **kwargs) -> ApiResponse: # noqa: E501
"""Create project template # noqa: E501
@@ -1189,7 +1189,7 @@ def create_project_template_with_http_info(self, body : ProjectTemplateCreateAct
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_custom_field2(self, project_template_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete custom field of project template # noqa: E501
@@ -1219,7 +1219,7 @@ def delete_custom_field2(self, project_template_uid : StrictStr, field_instance_
raise ValueError("Error! Please call the delete_custom_field2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_custom_field2_with_http_info(project_template_uid, field_instance_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_custom_field2_with_http_info(self, project_template_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete custom field of project template # noqa: E501
@@ -1328,7 +1328,7 @@ def delete_custom_field2_with_http_info(self, project_template_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_project_template(self, project_template_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete project template # noqa: E501
@@ -1356,7 +1356,7 @@ def delete_project_template(self, project_template_uid : StrictStr, **kwargs) ->
raise ValueError("Error! Please call the delete_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_project_template_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_project_template_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete project template # noqa: E501
@@ -1459,7 +1459,7 @@ def delete_project_template_with_http_info(self, project_template_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_custom_field1(self, project_template_uid : StrictStr, field_instance_uid : StrictStr, body : Optional[UpdateCustomFieldInstanceDto] = None, **kwargs) -> CustomFieldInstanceDto: # noqa: E501
"""Edit custom field of project template # noqa: E501
@@ -1491,7 +1491,7 @@ def edit_custom_field1(self, project_template_uid : StrictStr, field_instance_ui
raise ValueError("Error! Please call the edit_custom_field1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_custom_field1_with_http_info(project_template_uid, field_instance_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_custom_field1_with_http_info(self, project_template_uid : StrictStr, field_instance_uid : StrictStr, body : Optional[UpdateCustomFieldInstanceDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit custom field of project template # noqa: E501
@@ -1623,7 +1623,7 @@ def edit_custom_field1_with_http_info(self, project_template_uid : StrictStr, fi
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_custom_fields1(self, project_template_uid : StrictStr, body : Optional[UpdateCustomFieldInstancesDto] = None, **kwargs) -> CustomFieldInstancesDto: # noqa: E501
"""Edit custom fields of the project template (batch) # noqa: E501
@@ -1653,7 +1653,7 @@ def edit_custom_fields1(self, project_template_uid : StrictStr, body : Optional[
raise ValueError("Error! Please call the edit_custom_fields1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_custom_fields1_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_custom_fields1_with_http_info(self, project_template_uid : StrictStr, body : Optional[UpdateCustomFieldInstancesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit custom fields of the project template (batch) # noqa: E501
@@ -1779,7 +1779,7 @@ def edit_custom_fields1_with_http_info(self, project_template_uid : StrictStr, b
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_project_template(self, project_template_uid : StrictStr, body : ProjectTemplateEditDto, **kwargs) -> ProjectTemplateDto: # noqa: E501
"""Edit project template # noqa: E501
@@ -1809,7 +1809,7 @@ def edit_project_template(self, project_template_uid : StrictStr, body : Project
raise ValueError("Error! Please call the edit_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_project_template_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_project_template_with_http_info(self, project_template_uid : StrictStr, body : ProjectTemplateEditDto, **kwargs) -> ApiResponse: # noqa: E501
"""Edit project template # noqa: E501
@@ -1942,7 +1942,7 @@ def edit_project_template_with_http_info(self, project_template_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_project_template_access_settings(self, project_template_uid : StrictStr, body : Optional[EditProjectSecuritySettingsDtoV2] = None, **kwargs) -> ProjectSecuritySettingsDtoV2: # noqa: E501
"""Edit project template access and security settings # noqa: E501
@@ -1972,7 +1972,7 @@ def edit_project_template_access_settings(self, project_template_uid : StrictStr
raise ValueError("Error! Please call the edit_project_template_access_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_project_template_access_settings_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_project_template_access_settings_with_http_info(self, project_template_uid : StrictStr, body : Optional[EditProjectSecuritySettingsDtoV2] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit project template access and security settings # noqa: E501
@@ -2105,7 +2105,7 @@ def edit_project_template_access_settings_with_http_info(self, project_template_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_project_template_import_settings(self, project_template_uid : StrictStr, body : Optional[FileImportSettingsCreateDto] = None, **kwargs) -> FileImportSettingsDto: # noqa: E501
"""Edit project template import settings # noqa: E501
@@ -2135,7 +2135,7 @@ def edit_project_template_import_settings(self, project_template_uid : StrictStr
raise ValueError("Error! Please call the edit_project_template_import_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_project_template_import_settings_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_project_template_import_settings_with_http_info(self, project_template_uid : StrictStr, body : Optional[FileImportSettingsCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit project template import settings # noqa: E501
@@ -2268,7 +2268,7 @@ def edit_project_template_import_settings_with_http_info(self, project_template_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_analyse_settings_for_project_template(self, project_template_uid : StrictStr, **kwargs) -> AbstractAnalyseSettingsDto: # noqa: E501
"""Get analyse settings # noqa: E501
@@ -2296,7 +2296,7 @@ def get_analyse_settings_for_project_template(self, project_template_uid : Stric
raise ValueError("Error! Please call the get_analyse_settings_for_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_analyse_settings_for_project_template_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_analyse_settings_for_project_template_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get analyse settings # noqa: E501
@@ -2416,7 +2416,7 @@ def get_analyse_settings_for_project_template_with_http_info(self, project_templ
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_custom_field2(self, project_template_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> CustomFieldInstanceDto: # noqa: E501
"""Get custom field of project template # noqa: E501
@@ -2446,7 +2446,7 @@ def get_custom_field2(self, project_template_uid : StrictStr, field_instance_uid
raise ValueError("Error! Please call the get_custom_field2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_field2_with_http_info(project_template_uid, field_instance_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_custom_field2_with_http_info(self, project_template_uid : StrictStr, field_instance_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get custom field of project template # noqa: E501
@@ -2572,8 +2572,8 @@ def get_custom_field2_with_http_info(self, project_template_uid : StrictStr, fie
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_custom_fields_page1(self, project_template_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldInstanceDto: # noqa: E501
+ @validate_call
+ def get_custom_fields_page1(self, project_template_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoCustomFieldInstanceDto: # noqa: E501
"""Get custom fields of project template (page) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2612,8 +2612,8 @@ def get_custom_fields_page1(self, project_template_uid : StrictStr, page_number
raise ValueError("Error! Please call the get_custom_fields_page1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_custom_fields_page1_with_http_info(project_template_uid, page_number, page_size, created_by, modified_by, sort_field, sort_trend, **kwargs) # noqa: E501
- @validate_arguments
- def get_custom_fields_page1_with_http_info(self, project_template_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_custom_fields_page1_with_http_info(self, project_template_uid : StrictStr, 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 20")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get custom fields of project template (page) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2770,7 +2770,7 @@ def get_custom_fields_page1_with_http_info(self, project_template_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_import_settings_for_project_template(self, project_template_uid : StrictStr, **kwargs) -> FileImportSettingsDto: # noqa: E501
"""Get import settings # noqa: E501
@@ -2798,7 +2798,7 @@ def get_import_settings_for_project_template(self, project_template_uid : Strict
raise ValueError("Error! Please call the get_import_settings_for_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_import_settings_for_project_template_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_import_settings_for_project_template_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get import settings # noqa: E501
@@ -2918,7 +2918,7 @@ def get_import_settings_for_project_template_with_http_info(self, project_templa
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_machine_translate_settings_for_project_template(self, project_template_uid : StrictStr, **kwargs) -> MTSettingsPerLanguageListDto: # noqa: E501
"""Get project template machine translate settings # noqa: E501
@@ -2946,7 +2946,7 @@ def get_machine_translate_settings_for_project_template(self, project_template_u
raise ValueError("Error! Please call the get_machine_translate_settings_for_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_machine_translate_settings_for_project_template_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_machine_translate_settings_for_project_template_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get project template machine translate settings # noqa: E501
@@ -3066,7 +3066,7 @@ def get_machine_translate_settings_for_project_template_with_http_info(self, pro
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_pre_translate_settings_for_project_template2(self, project_template_uid : StrictStr, **kwargs) -> PreTranslateSettingsV3Dto: # noqa: E501
"""Get Pre-translate settings # noqa: E501
@@ -3094,7 +3094,7 @@ def get_pre_translate_settings_for_project_template2(self, project_template_uid
raise ValueError("Error! Please call the get_pre_translate_settings_for_project_template2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_pre_translate_settings_for_project_template2_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_pre_translate_settings_for_project_template2_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get Pre-translate settings # noqa: E501
@@ -3214,7 +3214,7 @@ def get_pre_translate_settings_for_project_template2_with_http_info(self, projec
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_template(self, project_template_uid : StrictStr, **kwargs) -> ProjectTemplateDto: # noqa: E501
"""Get project template # noqa: E501
@@ -3243,7 +3243,7 @@ def get_project_template(self, project_template_uid : StrictStr, **kwargs) -> Pr
raise ValueError("Error! Please call the get_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_template_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_template_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get project template # noqa: E501
@@ -3364,7 +3364,7 @@ def get_project_template_with_http_info(self, project_template_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_template_access_settings(self, project_template_uid : StrictStr, **kwargs) -> ProjectSecuritySettingsDtoV2: # noqa: E501
"""Get project template access and security settings # noqa: E501
@@ -3392,7 +3392,7 @@ def get_project_template_access_settings(self, project_template_uid : StrictStr,
raise ValueError("Error! Please call the get_project_template_access_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_template_access_settings_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_template_access_settings_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get project template access and security settings # noqa: E501
@@ -3512,7 +3512,7 @@ def get_project_template_access_settings_with_http_info(self, project_template_u
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_template_qa_settings(self, project_template_uid : StrictStr, **kwargs) -> QASettingsDtoV2: # noqa: E501
"""Get quality assurance settings # noqa: E501
@@ -3540,7 +3540,7 @@ def get_project_template_qa_settings(self, project_template_uid : StrictStr, **k
raise ValueError("Error! Please call the get_project_template_qa_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_template_qa_settings_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_template_qa_settings_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get quality assurance settings # noqa: E501
@@ -3660,7 +3660,7 @@ def get_project_template_qa_settings_with_http_info(self, project_template_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_template_term_bases(self, project_template_uid : StrictStr, **kwargs) -> ProjectTemplateTermBaseListDto: # noqa: E501
"""Get term bases # noqa: E501
@@ -3688,7 +3688,7 @@ def get_project_template_term_bases(self, project_template_uid : StrictStr, **kw
raise ValueError("Error! Please call the get_project_template_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_template_term_bases_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_template_term_bases_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get term bases # noqa: E501
@@ -3808,7 +3808,7 @@ def get_project_template_term_bases_with_http_info(self, project_template_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_template_trans_memories2(self, project_template_uid : StrictStr, target_lang : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by target language")] = None, wf_step_uid : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by workflow step")] = None, **kwargs) -> ProjectTemplateTransMemoryListDtoV3: # noqa: E501
"""Get translation memories # noqa: E501
@@ -3840,7 +3840,7 @@ def get_project_template_trans_memories2(self, project_template_uid : StrictStr,
raise ValueError("Error! Please call the get_project_template_trans_memories2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_template_trans_memories2_with_http_info(project_template_uid, target_lang, wf_step_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_template_trans_memories2_with_http_info(self, project_template_uid : StrictStr, target_lang : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by target language")] = None, wf_step_uid : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by workflow step")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation memories # noqa: E501
@@ -3972,8 +3972,8 @@ def get_project_template_trans_memories2_with_http_info(self, project_template_u
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_project_templates(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, owner_uid : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, business_unit_name : Optional[StrictStr] = None, sort : Optional[constr(strict=True)] = None, direction : Optional[constr(strict=True)] = None, 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, **kwargs) -> PageDtoProjectTemplateReference: # noqa: E501
+ @validate_call
+ def get_project_templates(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, owner_uid : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, business_unit_name : Optional[StrictStr] = None, sort : Optional[Annotated[str, StringConstraints(strict=True)]] = None, direction : Optional[Annotated[str, StringConstraints(strict=True)]] = None, 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, **kwargs) -> PageDtoProjectTemplateReference: # noqa: E501
"""List project templates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4024,8 +4024,8 @@ def get_project_templates(self, name : Optional[StrictStr] = None, client_id : O
raise ValueError("Error! Please call the get_project_templates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_templates_with_http_info(name, client_id, client_name, owner_uid, domain_name, sub_domain_name, cost_center_id, cost_center_name, business_unit_name, sort, direction, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_project_templates_with_http_info(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, owner_uid : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, business_unit_name : Optional[StrictStr] = None, sort : Optional[constr(strict=True)] = None, direction : Optional[constr(strict=True)] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_project_templates_with_http_info(self, name : Optional[StrictStr] = None, client_id : Optional[StrictInt] = None, client_name : Optional[StrictStr] = None, owner_uid : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, cost_center_id : Optional[StrictInt] = None, cost_center_name : Optional[StrictStr] = None, business_unit_name : Optional[StrictStr] = None, sort : Optional[Annotated[str, StringConstraints(strict=True)]] = None, direction : Optional[Annotated[str, StringConstraints(strict=True)]] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project templates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4216,8 +4216,8 @@ def get_project_templates_with_http_info(self, name : Optional[StrictStr] = None
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def relevant_trans_memories(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
+ @validate_call
+ def relevant_trans_memories(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
"""List project template relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4260,8 +4260,8 @@ def relevant_trans_memories(self, project_template_uid : StrictStr, name : Optio
raise ValueError("Error! Please call the relevant_trans_memories_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.relevant_trans_memories_with_http_info(project_template_uid, name, domain_name, client_name, sub_domain_name, target_langs, strict_lang_matching, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def relevant_trans_memories_with_http_info(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def relevant_trans_memories_with_http_info(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project template relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -4429,7 +4429,7 @@ def relevant_trans_memories_with_http_info(self, project_template_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_template_qa_settings(self, project_template_uid : StrictStr, body : Optional[EditQASettingsDtoV2] = None, **kwargs) -> QASettingsDtoV2: # noqa: E501
"""Edit quality assurance settings # noqa: E501
@@ -4459,7 +4459,7 @@ def set_project_template_qa_settings(self, project_template_uid : StrictStr, bod
raise ValueError("Error! Please call the set_project_template_qa_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_template_qa_settings_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_template_qa_settings_with_http_info(self, project_template_uid : StrictStr, body : Optional[EditQASettingsDtoV2] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit quality assurance settings # noqa: E501
@@ -4592,7 +4592,7 @@ def set_project_template_qa_settings_with_http_info(self, project_template_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_template_term_bases(self, project_template_uid : StrictStr, body : Optional[SetProjectTemplateTermBaseDto] = None, **kwargs) -> ProjectTemplateTermBaseListDto: # noqa: E501
"""Edit term bases in project template # noqa: E501
@@ -4622,7 +4622,7 @@ def set_project_template_term_bases(self, project_template_uid : StrictStr, body
raise ValueError("Error! Please call the set_project_template_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_template_term_bases_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_template_term_bases_with_http_info(self, project_template_uid : StrictStr, body : Optional[SetProjectTemplateTermBaseDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit term bases in project template # noqa: E501
@@ -4755,7 +4755,7 @@ def set_project_template_term_bases_with_http_info(self, project_template_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_template_trans_memories_v2(self, project_template_uid : StrictStr, body : Optional[SetProjectTemplateTransMemoriesV2Dto] = None, **kwargs) -> ProjectTemplateTransMemoryListV2Dto: # noqa: E501
"""Edit translation memories # noqa: E501
@@ -4786,7 +4786,7 @@ def set_project_template_trans_memories_v2(self, project_template_uid : StrictSt
raise ValueError("Error! Please call the set_project_template_trans_memories_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_template_trans_memories_v2_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_template_trans_memories_v2_with_http_info(self, project_template_uid : StrictStr, body : Optional[SetProjectTemplateTransMemoriesV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit translation memories # noqa: E501
@@ -4920,7 +4920,7 @@ def set_project_template_trans_memories_v2_with_http_info(self, project_template
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_analyse_settings_for_project_template(self, project_template_uid : StrictStr, body : Optional[EditAnalyseSettingsDto] = None, **kwargs) -> AbstractAnalyseSettingsDto: # noqa: E501
"""Edit analyse settings # noqa: E501
@@ -4950,7 +4950,7 @@ def update_analyse_settings_for_project_template(self, project_template_uid : St
raise ValueError("Error! Please call the update_analyse_settings_for_project_template_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_analyse_settings_for_project_template_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_analyse_settings_for_project_template_with_http_info(self, project_template_uid : StrictStr, body : Optional[EditAnalyseSettingsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit analyse settings # noqa: E501
@@ -5083,7 +5083,7 @@ def update_analyse_settings_for_project_template_with_http_info(self, project_te
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_pre_translate_settings_for_project_template2(self, project_template_uid : StrictStr, body : Optional[PreTranslateSettingsV3Dto] = None, **kwargs) -> PreTranslateSettingsV3Dto: # noqa: E501
"""Update Pre-translate settings # noqa: E501
@@ -5113,7 +5113,7 @@ def update_pre_translate_settings_for_project_template2(self, project_template_u
raise ValueError("Error! Please call the update_pre_translate_settings_for_project_template2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_pre_translate_settings_for_project_template2_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_pre_translate_settings_for_project_template2_with_http_info(self, project_template_uid : StrictStr, body : Optional[PreTranslateSettingsV3Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update Pre-translate settings # noqa: E501
diff --git a/phrasetms_client/api/provider_api.py b/phrasetms_client/api/provider_api.py
index fbd5cf6f..f2dde4fb 100644
--- a/phrasetms_client/api/provider_api.py
+++ b/phrasetms_client/api/provider_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.page_dto_provider_reference import PageDtoProviderReference
from phrasetms_client.models.provider_list_dto_v2 import ProviderListDtoV2
@@ -46,8 +46,8 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
- def get_project_assignments(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoProviderReference: # noqa: E501
+ @validate_call
+ def get_project_assignments(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoProviderReference: # noqa: E501
"""List project providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -80,8 +80,8 @@ def get_project_assignments(self, project_uid : StrictStr, provider_name : Optio
raise ValueError("Error! Please call the get_project_assignments_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_assignments_with_http_info(project_uid, provider_name, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_project_assignments_with_http_info(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_project_assignments_with_http_info(self, project_uid : StrictStr, provider_name : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -218,7 +218,7 @@ def get_project_assignments_with_http_info(self, project_uid : StrictStr, provid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_providers3(self, project_uid : StrictStr, **kwargs) -> ProviderListDtoV2: # noqa: E501
"""Get suggested providers # noqa: E501
@@ -246,7 +246,7 @@ def list_providers3(self, project_uid : StrictStr, **kwargs) -> ProviderListDtoV
raise ValueError("Error! Please call the list_providers3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_providers3_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_providers3_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get suggested providers # noqa: E501
@@ -366,7 +366,7 @@ def list_providers3_with_http_info(self, project_uid : StrictStr, **kwargs) -> A
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_providers4(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ProviderListDtoV2: # noqa: E501
"""Get suggested providers # noqa: E501
@@ -396,7 +396,7 @@ def list_providers4(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs
raise ValueError("Error! Please call the list_providers4_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_providers4_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_providers4_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get suggested providers # noqa: E501
diff --git a/phrasetms_client/api/quality_assurance_api.py b/phrasetms_client/api/quality_assurance_api.py
index 3a75ee72..b81b1984 100644
--- a/phrasetms_client/api/quality_assurance_api.py
+++ b/phrasetms_client/api/quality_assurance_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictStr, conint, conlist, validator
+from pydantic import Field, StrictStr
-from typing import List, Optional
from phrasetms_client.models.create_lqa_profile_dto import CreateLqaProfileDto
from phrasetms_client.models.lqa_profile_detail_dto import LqaProfileDetailDto
@@ -57,7 +57,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def add_ignored_warnings(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> UpdateIgnoredWarningsDto: # noqa: E501
"""Add ignored warnings # noqa: E501
@@ -89,7 +89,7 @@ def add_ignored_warnings(self, project_uid : StrictStr, job_uid : StrictStr, bod
raise ValueError("Error! Please call the add_ignored_warnings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_ignored_warnings_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_ignored_warnings_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add ignored warnings # noqa: E501
@@ -228,7 +228,7 @@ def add_ignored_warnings_with_http_info(self, project_uid : StrictStr, job_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def add_ignored_warnings1(self, project_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> UpdateIgnoredWarningsDto: # noqa: E501
"""Add ignored warnings # noqa: E501
@@ -258,7 +258,7 @@ def add_ignored_warnings1(self, project_uid : StrictStr, body : Optional[UpdateI
raise ValueError("Error! Please call the add_ignored_warnings1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_ignored_warnings1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_ignored_warnings1_with_http_info(self, project_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add ignored warnings # noqa: E501
@@ -384,7 +384,7 @@ def add_ignored_warnings1_with_http_info(self, project_uid : StrictStr, body : O
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_lqa_profile(self, body : Optional[CreateLqaProfileDto] = None, **kwargs) -> LqaProfileDetailDto: # noqa: E501
"""Create LQA profile # noqa: E501
@@ -412,7 +412,7 @@ def create_lqa_profile(self, body : Optional[CreateLqaProfileDto] = None, **kwar
raise ValueError("Error! Please call the create_lqa_profile_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_lqa_profile_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_lqa_profile_with_http_info(self, body : Optional[CreateLqaProfileDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create LQA profile # noqa: E501
@@ -539,7 +539,7 @@ def create_lqa_profile_with_http_info(self, body : Optional[CreateLqaProfileDto]
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_ignored_warnings(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> None: # noqa: E501
"""Delete ignored warnings # noqa: E501
@@ -571,7 +571,7 @@ def delete_ignored_warnings(self, project_uid : StrictStr, job_uid : StrictStr,
raise ValueError("Error! Please call the delete_ignored_warnings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_ignored_warnings_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_ignored_warnings_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete ignored warnings # noqa: E501
@@ -693,7 +693,7 @@ def delete_ignored_warnings_with_http_info(self, project_uid : StrictStr, job_ui
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_ignored_warnings1(self, project_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> None: # noqa: E501
"""Delete ignored warnings # noqa: E501
@@ -723,7 +723,7 @@ def delete_ignored_warnings1(self, project_uid : StrictStr, body : Optional[Upda
raise ValueError("Error! Please call the delete_ignored_warnings1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_ignored_warnings1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_ignored_warnings1_with_http_info(self, project_uid : StrictStr, body : Optional[UpdateIgnoredWarningsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete ignored warnings # noqa: E501
@@ -832,7 +832,7 @@ def delete_ignored_warnings1_with_http_info(self, project_uid : StrictStr, body
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_lqa_profile(self, profile_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete LQA profile # noqa: E501
@@ -860,7 +860,7 @@ def delete_lqa_profile(self, profile_uid : StrictStr, **kwargs) -> None: # noqa
raise ValueError("Error! Please call the delete_lqa_profile_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_lqa_profile_with_http_info(profile_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_lqa_profile_with_http_info(self, profile_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete LQA profile # noqa: E501
@@ -963,7 +963,7 @@ def delete_lqa_profile_with_http_info(self, profile_uid : StrictStr, **kwargs) -
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def duplicate_profile(self, profile_uid : StrictStr, **kwargs) -> LqaProfileReferenceDto: # noqa: E501
"""Duplicate LQA profile # noqa: E501
@@ -991,7 +991,7 @@ def duplicate_profile(self, profile_uid : StrictStr, **kwargs) -> LqaProfileRefe
raise ValueError("Error! Please call the duplicate_profile_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.duplicate_profile_with_http_info(profile_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def duplicate_profile_with_http_info(self, profile_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Duplicate LQA profile # noqa: E501
@@ -1111,7 +1111,7 @@ def duplicate_profile_with_http_info(self, profile_uid : StrictStr, **kwargs) ->
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def enabled_quality_checks_for_job(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> QualityAssuranceChecksDtoV2: # noqa: E501
"""Get QA settings for job # noqa: E501
@@ -1142,7 +1142,7 @@ def enabled_quality_checks_for_job(self, project_uid : StrictStr, job_uid : Stri
raise ValueError("Error! Please call the enabled_quality_checks_for_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.enabled_quality_checks_for_job_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def enabled_quality_checks_for_job_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get QA settings for job # noqa: E501
@@ -1269,7 +1269,7 @@ def enabled_quality_checks_for_job_with_http_info(self, project_uid : StrictStr,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def enabled_quality_checks_for_job1(self, project_uid : StrictStr, **kwargs) -> QualityAssuranceChecksDtoV2: # noqa: E501
"""Get QA settings # noqa: E501
@@ -1298,7 +1298,7 @@ def enabled_quality_checks_for_job1(self, project_uid : StrictStr, **kwargs) ->
raise ValueError("Error! Please call the enabled_quality_checks_for_job1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.enabled_quality_checks_for_job1_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def enabled_quality_checks_for_job1_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get QA settings # noqa: E501
@@ -1419,7 +1419,7 @@ def enabled_quality_checks_for_job1_with_http_info(self, project_uid : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_lqa_profile(self, profile_uid : StrictStr, **kwargs) -> LqaProfileDetailDto: # noqa: E501
"""Get LQA profile details # noqa: E501
@@ -1447,7 +1447,7 @@ def get_lqa_profile(self, profile_uid : StrictStr, **kwargs) -> LqaProfileDetail
raise ValueError("Error! Please call the get_lqa_profile_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_lqa_profile_with_http_info(profile_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_lqa_profile_with_http_info(self, profile_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get LQA profile details # noqa: E501
@@ -1567,7 +1567,7 @@ def get_lqa_profile_with_http_info(self, profile_uid : StrictStr, **kwargs) -> A
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_lqa_profile_authors(self, **kwargs) -> List[UserReference]: # noqa: E501
"""Get list of LQA profile authors # noqa: E501
@@ -1593,7 +1593,7 @@ def get_lqa_profile_authors(self, **kwargs) -> List[UserReference]: # noqa: E50
raise ValueError("Error! Please call the get_lqa_profile_authors_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_lqa_profile_authors_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_lqa_profile_authors_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""Get list of LQA profile authors # noqa: E501
@@ -1707,8 +1707,8 @@ def get_lqa_profile_authors_with_http_info(self, **kwargs) -> ApiResponse: # no
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_lqa_profiles(self, name : Annotated[Optional[StrictStr], Field(description="Name of LQA profiles, it is used for filter the list by name")] = None, created_by : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by who created the profile")] = None, date_created : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by date created")] = None, 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 20")] = None, sort : Optional[conlist(StrictStr)] = None, order : Optional[conlist(StrictStr)] = None, **kwargs) -> PageDtoLqaProfileReferenceDto: # noqa: E501
+ @validate_call
+ def get_lqa_profiles(self, name : Annotated[Optional[StrictStr], Field(description="Name of LQA profiles, it is used for filter the list by name")] = None, created_by : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by who created the profile")] = None, date_created : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by date created")] = None, 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 20")] = None, sort : Optional[List[StrictStr]] = None, order : Optional[List[StrictStr]] = None, **kwargs) -> PageDtoLqaProfileReferenceDto: # noqa: E501
"""GET list LQA profiles # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1747,8 +1747,8 @@ def get_lqa_profiles(self, name : Annotated[Optional[StrictStr], Field(descripti
raise ValueError("Error! Please call the get_lqa_profiles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_lqa_profiles_with_http_info(name, created_by, date_created, page_number, page_size, sort, order, **kwargs) # noqa: E501
- @validate_arguments
- def get_lqa_profiles_with_http_info(self, name : Annotated[Optional[StrictStr], Field(description="Name of LQA profiles, it is used for filter the list by name")] = None, created_by : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by who created the profile")] = None, date_created : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by date created")] = None, 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 20")] = None, sort : Optional[conlist(StrictStr)] = None, order : Optional[conlist(StrictStr)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_lqa_profiles_with_http_info(self, name : Annotated[Optional[StrictStr], Field(description="Name of LQA profiles, it is used for filter the list by name")] = None, created_by : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by who created the profile")] = None, date_created : Annotated[Optional[StrictStr], Field(description="It is used for filter the list by date created")] = None, 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 20")] = None, sort : Optional[List[StrictStr]] = None, order : Optional[List[StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""GET list LQA profiles # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1905,7 +1905,7 @@ def get_lqa_profiles_with_http_info(self, name : Annotated[Optional[StrictStr],
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def make_default(self, profile_uid : StrictStr, **kwargs) -> LqaProfileReferenceDto: # noqa: E501
"""Make LQA profile default # noqa: E501
@@ -1933,7 +1933,7 @@ def make_default(self, profile_uid : StrictStr, **kwargs) -> LqaProfileReference
raise ValueError("Error! Please call the make_default_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.make_default_with_http_info(profile_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def make_default_with_http_info(self, profile_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Make LQA profile default # noqa: E501
@@ -2053,7 +2053,7 @@ def make_default_with_http_info(self, profile_uid : StrictStr, **kwargs) -> ApiR
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def run_qa_for_job_part_v3(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[QualityAssuranceRunDtoV3] = None, **kwargs) -> QualityAssuranceResponseDto: # noqa: E501
"""Run quality assurance # noqa: E501
@@ -2086,7 +2086,7 @@ def run_qa_for_job_part_v3(self, project_uid : StrictStr, job_uid : StrictStr, b
raise ValueError("Error! Please call the run_qa_for_job_part_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.run_qa_for_job_part_v3_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def run_qa_for_job_part_v3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[QualityAssuranceRunDtoV3] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Run quality assurance # noqa: E501
@@ -2226,7 +2226,7 @@ def run_qa_for_job_part_v3_with_http_info(self, project_uid : StrictStr, job_uid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def run_qa_for_job_parts_v3(self, project_uid : StrictStr, body : Optional[QualityAssuranceBatchRunDtoV3] = None, **kwargs) -> QualityAssuranceResponseDto: # noqa: E501
"""Run quality assurance (batch) # noqa: E501
@@ -2257,7 +2257,7 @@ def run_qa_for_job_parts_v3(self, project_uid : StrictStr, body : Optional[Quali
raise ValueError("Error! Please call the run_qa_for_job_parts_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.run_qa_for_job_parts_v3_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def run_qa_for_job_parts_v3_with_http_info(self, project_uid : StrictStr, body : Optional[QualityAssuranceBatchRunDtoV3] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Run quality assurance (batch) # noqa: E501
@@ -2391,7 +2391,7 @@ def run_qa_for_job_parts_v3_with_http_info(self, project_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def run_qa_for_segments_v3(self, project_uid : StrictStr, body : Optional[QualityAssuranceSegmentsRunDtoV3] = None, **kwargs) -> QualityAssuranceResponseDto: # noqa: E501
"""Run quality assurance on selected segments # noqa: E501
@@ -2422,7 +2422,7 @@ def run_qa_for_segments_v3(self, project_uid : StrictStr, body : Optional[Qualit
raise ValueError("Error! Please call the run_qa_for_segments_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.run_qa_for_segments_v3_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def run_qa_for_segments_v3_with_http_info(self, project_uid : StrictStr, body : Optional[QualityAssuranceSegmentsRunDtoV3] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Run quality assurance on selected segments # noqa: E501
@@ -2556,7 +2556,7 @@ def run_qa_for_segments_v3_with_http_info(self, project_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_ignored_checks(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[UpdateIgnoredChecksDto] = None, **kwargs) -> None: # noqa: E501
"""Edit ignored checks # noqa: E501
@@ -2588,7 +2588,7 @@ def update_ignored_checks(self, project_uid : StrictStr, job_uid : StrictStr, bo
raise ValueError("Error! Please call the update_ignored_checks_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_ignored_checks_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_ignored_checks_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[UpdateIgnoredChecksDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit ignored checks # noqa: E501
@@ -2710,7 +2710,7 @@ def update_ignored_checks_with_http_info(self, project_uid : StrictStr, job_uid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_lqa_profile(self, profile_uid : StrictStr, body : Optional[UpdateLqaProfileDto] = None, **kwargs) -> LqaProfileDetailDto: # noqa: E501
"""Update LQA profile # noqa: E501
@@ -2740,7 +2740,7 @@ def update_lqa_profile(self, profile_uid : StrictStr, body : Optional[UpdateLqaP
raise ValueError("Error! Please call the update_lqa_profile_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_lqa_profile_with_http_info(profile_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_lqa_profile_with_http_info(self, profile_uid : StrictStr, body : Optional[UpdateLqaProfileDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update LQA profile # noqa: E501
diff --git a/phrasetms_client/api/quote_api.py b/phrasetms_client/api/quote_api.py
index 622a90d5..0990eb1e 100644
--- a/phrasetms_client/api/quote_api.py
+++ b/phrasetms_client/api/quote_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
+from typing import Optional
from pydantic import StrictStr
-from typing import Optional
from phrasetms_client.models.email_quotes_request_dto import EmailQuotesRequestDto
from phrasetms_client.models.email_quotes_response_dto import EmailQuotesResponseDto
@@ -49,7 +49,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_quote_v2(self, body : Optional[QuoteCreateV2Dto] = None, **kwargs) -> QuoteV2Dto: # noqa: E501
"""Create quote # noqa: E501
@@ -78,7 +78,7 @@ def create_quote_v2(self, body : Optional[QuoteCreateV2Dto] = None, **kwargs) ->
raise ValueError("Error! Please call the create_quote_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_quote_v2_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_quote_v2_with_http_info(self, body : Optional[QuoteCreateV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create quote # noqa: E501
@@ -206,7 +206,7 @@ def create_quote_v2_with_http_info(self, body : Optional[QuoteCreateV2Dto] = Non
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_quote(self, quote_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete quote # noqa: E501
@@ -234,7 +234,7 @@ def delete_quote(self, quote_uid : StrictStr, **kwargs) -> None: # noqa: E501
raise ValueError("Error! Please call the delete_quote_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_quote_with_http_info(quote_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_quote_with_http_info(self, quote_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete quote # noqa: E501
@@ -337,7 +337,7 @@ def delete_quote_with_http_info(self, quote_uid : StrictStr, **kwargs) -> ApiRes
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def email_quotes(self, body : Optional[EmailQuotesRequestDto] = None, **kwargs) -> EmailQuotesResponseDto: # noqa: E501
"""Email quotes # noqa: E501
@@ -365,7 +365,7 @@ def email_quotes(self, body : Optional[EmailQuotesRequestDto] = None, **kwargs)
raise ValueError("Error! Please call the email_quotes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.email_quotes_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def email_quotes_with_http_info(self, body : Optional[EmailQuotesRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Email quotes # noqa: E501
@@ -492,7 +492,7 @@ def email_quotes_with_http_info(self, body : Optional[EmailQuotesRequestDto] = N
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get2(self, quote_uid : StrictStr, **kwargs) -> QuoteDto: # noqa: E501
"""Get quote # noqa: E501
@@ -520,7 +520,7 @@ def get2(self, quote_uid : StrictStr, **kwargs) -> QuoteDto: # noqa: E501
raise ValueError("Error! Please call the get2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get2_with_http_info(quote_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get2_with_http_info(self, quote_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get quote # noqa: E501
diff --git a/phrasetms_client/api/scim_api.py b/phrasetms_client/api/scim_api.py
index 1e5f0a32..b3cff10b 100644
--- a/phrasetms_client/api/scim_api.py
+++ b/phrasetms_client/api/scim_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Any, Dict, List, Optional
-from pydantic import Field, StrictInt, StrictStr, conint
+from pydantic import Field, StrictInt, StrictStr
-from typing import Any, Dict, List, Optional
from phrasetms_client.models.scim_resource_schema import ScimResourceSchema
from phrasetms_client.models.scim_resource_type_schema import ScimResourceTypeSchema
@@ -48,7 +48,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_user_scim(self, authorization : Optional[StrictStr] = None, body : Optional[ScimUserCoreDto] = None, **kwargs) -> ScimUserCoreDto: # noqa: E501
"""Create user using SCIM # noqa: E501
@@ -79,7 +79,7 @@ def create_user_scim(self, authorization : Optional[StrictStr] = None, body : Op
raise ValueError("Error! Please call the create_user_scim_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_user_scim_with_http_info(authorization, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_user_scim_with_http_info(self, authorization : Optional[StrictStr] = None, body : Optional[ScimUserCoreDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create user using SCIM # noqa: E501
@@ -213,7 +213,7 @@ def create_user_scim_with_http_info(self, authorization : Optional[StrictStr] =
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_user(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501
"""Delete user using SCIM # noqa: E501
@@ -243,7 +243,7 @@ def delete_user(self, user_id : StrictInt, authorization : Optional[StrictStr] =
raise ValueError("Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_user_with_http_info(user_id, authorization, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_user_with_http_info(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete user using SCIM # noqa: E501
@@ -352,7 +352,7 @@ def delete_user_with_http_info(self, user_id : StrictInt, authorization : Option
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_user(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, body : Optional[ScimUserCoreDto] = None, **kwargs) -> ScimUserCoreDto: # noqa: E501
"""Edit user using SCIM # noqa: E501
@@ -384,7 +384,7 @@ def edit_user(self, user_id : StrictInt, authorization : Optional[StrictStr] = N
raise ValueError("Error! Please call the edit_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_user_with_http_info(user_id, authorization, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_user_with_http_info(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, body : Optional[ScimUserCoreDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit user using SCIM # noqa: E501
@@ -523,7 +523,7 @@ def edit_user_with_http_info(self, user_id : StrictInt, authorization : Optional
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_resource_types(self, **kwargs) -> List[ScimResourceTypeSchema]: # noqa: E501
"""List the types of SCIM Resources available # noqa: E501
@@ -549,7 +549,7 @@ def get_resource_types(self, **kwargs) -> List[ScimResourceTypeSchema]: # noqa:
raise ValueError("Error! Please call the get_resource_types_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_resource_types_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_resource_types_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""List the types of SCIM Resources available # noqa: E501
@@ -663,7 +663,7 @@ def get_resource_types_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_schema_by_urn(self, schema_urn : StrictStr, **kwargs) -> ScimResourceSchema: # noqa: E501
"""Get supported SCIM Schema by urn # noqa: E501
@@ -691,7 +691,7 @@ def get_schema_by_urn(self, schema_urn : StrictStr, **kwargs) -> ScimResourceSch
raise ValueError("Error! Please call the get_schema_by_urn_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_schema_by_urn_with_http_info(schema_urn, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_schema_by_urn_with_http_info(self, schema_urn : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get supported SCIM Schema by urn # noqa: E501
@@ -811,7 +811,7 @@ def get_schema_by_urn_with_http_info(self, schema_urn : StrictStr, **kwargs) ->
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_schemas(self, **kwargs) -> List[ScimResourceSchema]: # noqa: E501
"""Get supported SCIM Schemas # noqa: E501
@@ -837,7 +837,7 @@ def get_schemas(self, **kwargs) -> List[ScimResourceSchema]: # noqa: E501
raise ValueError("Error! Please call the get_schemas_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_schemas_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_schemas_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""Get supported SCIM Schemas # noqa: E501
@@ -951,7 +951,7 @@ def get_schemas_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_scim_user(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, **kwargs) -> ScimUserCoreDto: # noqa: E501
"""Get user # noqa: E501
@@ -981,7 +981,7 @@ def get_scim_user(self, user_id : StrictInt, authorization : Optional[StrictStr]
raise ValueError("Error! Please call the get_scim_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_scim_user_with_http_info(user_id, authorization, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_scim_user_with_http_info(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get user # noqa: E501
@@ -1107,7 +1107,7 @@ def get_scim_user_with_http_info(self, user_id : StrictInt, authorization : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_service_provider_config_dto(self, **kwargs) -> ServiceProviderConfigDto: # noqa: E501
"""Retrieve the Service Provider's Configuration # noqa: E501
@@ -1133,7 +1133,7 @@ def get_service_provider_config_dto(self, **kwargs) -> ServiceProviderConfigDto:
raise ValueError("Error! Please call the get_service_provider_config_dto_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_service_provider_config_dto_with_http_info(**kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_service_provider_config_dto_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""Retrieve the Service Provider's Configuration # noqa: E501
@@ -1247,7 +1247,7 @@ def get_service_provider_config_dto_with_http_info(self, **kwargs) -> ApiRespons
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def patch_user(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, body : Optional[Dict[str, Dict[str, Any]]] = None, **kwargs) -> ScimUserCoreDto: # noqa: E501
"""Patch user using SCIM # noqa: E501
@@ -1279,7 +1279,7 @@ def patch_user(self, user_id : StrictInt, authorization : Optional[StrictStr] =
raise ValueError("Error! Please call the patch_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.patch_user_with_http_info(user_id, authorization, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def patch_user_with_http_info(self, user_id : StrictInt, authorization : Optional[StrictStr] = None, body : Optional[Dict[str, Dict[str, Any]]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Patch user using SCIM # noqa: E501
@@ -1411,8 +1411,8 @@ def patch_user_with_http_info(self, user_id : StrictInt, authorization : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def search_users(self, authorization : Optional[StrictStr] = None, filter : Annotated[Optional[StrictStr], Field(description="See method description")] = None, attributes : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_order : Annotated[Optional[StrictStr], Field(description="See method description")] = None, start_index : Annotated[Optional[conint(strict=True, ge=1)], Field(description="The 1-based index of the first search result. Default 1")] = None, count : Annotated[Optional[conint(strict=True, le=100, ge=0)], Field(description="Non-negative Integer. Specifies the desired maximum number of search results per page; e.g., 10.")] = None, **kwargs) -> None: # noqa: E501
+ @validate_call
+ def search_users(self, authorization : Optional[StrictStr] = None, filter : Annotated[Optional[StrictStr], Field(description="See method description")] = None, attributes : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_order : Annotated[Optional[StrictStr], Field(description="See method description")] = None, start_index : Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The 1-based index of the first search result. Default 1")] = None, count : Annotated[Optional[Annotated[int, Field(strict=True, le=100, ge=0)]], Field(description="Non-negative Integer. Specifies the desired maximum number of search results per page; e.g., 10.")] = None, **kwargs) -> None: # noqa: E501
"""Search users # noqa: E501
This operation supports SCIM Filter, SCIM attributes and SCIM sort Supported attributes: - `id` - `active` - `userName` - `name.givenName` - `name.familyName` - `emails.value` - `meta.created` # noqa: E501
@@ -1452,8 +1452,8 @@ def search_users(self, authorization : Optional[StrictStr] = None, filter : Anno
raise ValueError("Error! Please call the search_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_users_with_http_info(authorization, filter, attributes, sort_by, sort_order, start_index, count, **kwargs) # noqa: E501
- @validate_arguments
- def search_users_with_http_info(self, authorization : Optional[StrictStr] = None, filter : Annotated[Optional[StrictStr], Field(description="See method description")] = None, attributes : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_order : Annotated[Optional[StrictStr], Field(description="See method description")] = None, start_index : Annotated[Optional[conint(strict=True, ge=1)], Field(description="The 1-based index of the first search result. Default 1")] = None, count : Annotated[Optional[conint(strict=True, le=100, ge=0)], Field(description="Non-negative Integer. Specifies the desired maximum number of search results per page; e.g., 10.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def search_users_with_http_info(self, authorization : Optional[StrictStr] = None, filter : Annotated[Optional[StrictStr], Field(description="See method description")] = None, attributes : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="See method description")] = None, sort_order : Annotated[Optional[StrictStr], Field(description="See method description")] = None, start_index : Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The 1-based index of the first search result. Default 1")] = None, count : Annotated[Optional[Annotated[int, Field(strict=True, le=100, ge=0)]], Field(description="Non-negative Integer. Specifies the desired maximum number of search results per page; e.g., 10.")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search users # noqa: E501
This operation supports SCIM Filter, SCIM attributes and SCIM sort Supported attributes: - `id` - `active` - `userName` - `name.givenName` - `name.familyName` - `emails.value` - `meta.created` # noqa: E501
diff --git a/phrasetms_client/api/segment_api.py b/phrasetms_client/api/segment_api.py
index 304a409f..7b37fb69 100644
--- a/phrasetms_client/api/segment_api.py
+++ b/phrasetms_client/api/segment_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.job_part_ready_references import JobPartReadyReferences
from phrasetms_client.models.segment_list_dto import SegmentListDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def get_segments_count(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> SegmentsCountsResponseListDto: # noqa: E501
"""Get segments count # noqa: E501
@@ -78,7 +78,7 @@ def get_segments_count(self, project_uid : StrictStr, body : Optional[JobPartRea
raise ValueError("Error! Please call the get_segments_count_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_segments_count_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_segments_count_with_http_info(self, project_uid : StrictStr, body : Optional[JobPartReadyReferences] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get segments count # noqa: E501
@@ -212,8 +212,8 @@ def get_segments_count_with_http_info(self, project_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_segments(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[conint(strict=True, ge=0)] = None, end_index : Optional[conint(strict=True, ge=0)] = None, **kwargs) -> SegmentListDto: # noqa: E501
+ @validate_call
+ def list_segments(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, end_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, **kwargs) -> SegmentListDto: # noqa: E501
"""Get segments # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -246,8 +246,8 @@ def list_segments(self, project_uid : StrictStr, job_uid : StrictStr, begin_inde
raise ValueError("Error! Please call the list_segments_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_segments_with_http_info(project_uid, job_uid, begin_index, end_index, **kwargs) # noqa: E501
- @validate_arguments
- def list_segments_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[conint(strict=True, ge=0)] = None, end_index : Optional[conint(strict=True, ge=0)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_segments_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, begin_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, end_index : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get segments # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/segmentation_rules_api.py b/phrasetms_client/api/segmentation_rules_api.py
index 72ca97e8..443af9af 100644
--- a/phrasetms_client/api/segmentation_rules_api.py
+++ b/phrasetms_client/api/segmentation_rules_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, StringConstraints, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Any, Dict, List, Optional
-from pydantic import Field, StrictInt, StrictStr, conint, conlist, constr
+from pydantic import Field, StrictInt, StrictStr, StringConstraints
-from typing import Any, Dict, Optional
from phrasetms_client.models.edit_segmentation_rule_dto import EditSegmentationRuleDto
from phrasetms_client.models.page_dto_segmentation_rule_reference import PageDtoSegmentationRuleReference
@@ -47,8 +47,8 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
- def create_segmentation_rule(self, seg_rule : constr(strict=True, max_length=255, min_length=0), body : Annotated[Dict[str, Any], Field(..., description="streamed file")], **kwargs) -> SegmentationRuleDto: # noqa: E501
+ @validate_call
+ def create_segmentation_rule(self, seg_rule : Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)], body : Annotated[Dict[str, Any], Field(..., description="streamed file")], **kwargs) -> SegmentationRuleDto: # noqa: E501
"""Create segmentation rule # noqa: E501
Creates new Segmentation Rule with file and segRule JSON Object as header parameter. The same object is used for GET action. # noqa: E501
@@ -78,8 +78,8 @@ def create_segmentation_rule(self, seg_rule : constr(strict=True, max_length=255
raise ValueError("Error! Please call the create_segmentation_rule_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_segmentation_rule_with_http_info(seg_rule, body, **kwargs) # noqa: E501
- @validate_arguments
- def create_segmentation_rule_with_http_info(self, seg_rule : constr(strict=True, max_length=255, min_length=0), body : Annotated[Dict[str, Any], Field(..., description="streamed file")], **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def create_segmentation_rule_with_http_info(self, seg_rule : Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)], body : Annotated[Dict[str, Any], Field(..., description="streamed file")], **kwargs) -> ApiResponse: # noqa: E501
"""Create segmentation rule # noqa: E501
Creates new Segmentation Rule with file and segRule JSON Object as header parameter. The same object is used for GET action. # noqa: E501
@@ -212,7 +212,7 @@ def create_segmentation_rule_with_http_info(self, seg_rule : constr(strict=True,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def deletes_segmentation_rule(self, seg_rule_id : StrictInt, **kwargs) -> None: # noqa: E501
"""Delete segmentation rule # noqa: E501
@@ -240,7 +240,7 @@ def deletes_segmentation_rule(self, seg_rule_id : StrictInt, **kwargs) -> None:
raise ValueError("Error! Please call the deletes_segmentation_rule_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.deletes_segmentation_rule_with_http_info(seg_rule_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def deletes_segmentation_rule_with_http_info(self, seg_rule_id : StrictInt, **kwargs) -> ApiResponse: # noqa: E501
"""Delete segmentation rule # noqa: E501
@@ -343,8 +343,8 @@ def deletes_segmentation_rule_with_http_info(self, seg_rule_id : StrictInt, **kw
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_list_of_segmentation_rules(self, locales : Optional[conlist(StrictStr)] = None, 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, **kwargs) -> PageDtoSegmentationRuleReference: # noqa: E501
+ @validate_call
+ def get_list_of_segmentation_rules(self, locales : Optional[List[StrictStr]] = None, 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, **kwargs) -> PageDtoSegmentationRuleReference: # noqa: E501
"""List segmentation rules # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -375,8 +375,8 @@ def get_list_of_segmentation_rules(self, locales : Optional[conlist(StrictStr)]
raise ValueError("Error! Please call the get_list_of_segmentation_rules_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_list_of_segmentation_rules_with_http_info(locales, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_list_of_segmentation_rules_with_http_info(self, locales : Optional[conlist(StrictStr)] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_list_of_segmentation_rules_with_http_info(self, locales : Optional[List[StrictStr]] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List segmentation rules # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -508,7 +508,7 @@ def get_list_of_segmentation_rules_with_http_info(self, locales : Optional[conli
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_segmentation_rule(self, seg_rule_id : StrictInt, **kwargs) -> SegmentationRuleDto: # noqa: E501
"""Get segmentation rule # noqa: E501
@@ -536,7 +536,7 @@ def get_segmentation_rule(self, seg_rule_id : StrictInt, **kwargs) -> Segmentati
raise ValueError("Error! Please call the get_segmentation_rule_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_segmentation_rule_with_http_info(seg_rule_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_segmentation_rule_with_http_info(self, seg_rule_id : StrictInt, **kwargs) -> ApiResponse: # noqa: E501
"""Get segmentation rule # noqa: E501
@@ -656,7 +656,7 @@ def get_segmentation_rule_with_http_info(self, seg_rule_id : StrictInt, **kwargs
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def updates_segmentation_rule(self, seg_rule_id : StrictInt, body : Optional[EditSegmentationRuleDto] = None, **kwargs) -> SegmentationRuleDto: # noqa: E501
"""Edit segmentation rule # noqa: E501
@@ -686,7 +686,7 @@ def updates_segmentation_rule(self, seg_rule_id : StrictInt, body : Optional[Edi
raise ValueError("Error! Please call the updates_segmentation_rule_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.updates_segmentation_rule_with_http_info(seg_rule_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def updates_segmentation_rule_with_http_info(self, seg_rule_id : StrictInt, body : Optional[EditSegmentationRuleDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit segmentation rule # noqa: E501
diff --git a/phrasetms_client/api/spell_check_api.py b/phrasetms_client/api/spell_check_api.py
index 66e5aeff..d8ea4823 100644
--- a/phrasetms_client/api/spell_check_api.py
+++ b/phrasetms_client/api/spell_check_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
+from typing import Optional
from pydantic import StrictStr
-from typing import Optional
from phrasetms_client.models.dictionary_item_dto import DictionaryItemDto
from phrasetms_client.models.spell_check_request_dto import SpellCheckRequestDto
@@ -49,7 +49,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def add_word(self, body : Optional[DictionaryItemDto] = None, **kwargs) -> None: # noqa: E501
"""Add word to dictionary # noqa: E501
@@ -77,7 +77,7 @@ def add_word(self, body : Optional[DictionaryItemDto] = None, **kwargs) -> None:
raise ValueError("Error! Please call the add_word_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_word_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_word_with_http_info(self, body : Optional[DictionaryItemDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add word to dictionary # noqa: E501
@@ -187,7 +187,7 @@ def add_word_with_http_info(self, body : Optional[DictionaryItemDto] = None, **k
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def check(self, body : Optional[SpellCheckRequestDto] = None, **kwargs) -> SpellCheckResponseDto: # noqa: E501
"""Spell check # noqa: E501
@@ -216,7 +216,7 @@ def check(self, body : Optional[SpellCheckRequestDto] = None, **kwargs) -> Spell
raise ValueError("Error! Please call the check_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.check_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def check_with_http_info(self, body : Optional[SpellCheckRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Spell check # noqa: E501
@@ -344,7 +344,7 @@ def check_with_http_info(self, body : Optional[SpellCheckRequestDto] = None, **k
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def check_by_job(self, job_uid : StrictStr, body : Optional[SpellCheckRequestDto] = None, **kwargs) -> SpellCheckResponseDto: # noqa: E501
"""Spell check for job # noqa: E501
@@ -375,7 +375,7 @@ def check_by_job(self, job_uid : StrictStr, body : Optional[SpellCheckRequestDto
raise ValueError("Error! Please call the check_by_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.check_by_job_with_http_info(job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def check_by_job_with_http_info(self, job_uid : StrictStr, body : Optional[SpellCheckRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Spell check for job # noqa: E501
@@ -509,7 +509,7 @@ def check_by_job_with_http_info(self, job_uid : StrictStr, body : Optional[Spell
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def suggest(self, body : Optional[SuggestRequestDto] = None, **kwargs) -> SuggestResponseDto: # noqa: E501
"""Suggest a word # noqa: E501
@@ -538,7 +538,7 @@ def suggest(self, body : Optional[SuggestRequestDto] = None, **kwargs) -> Sugges
raise ValueError("Error! Please call the suggest_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.suggest_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def suggest_with_http_info(self, body : Optional[SuggestRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Suggest a word # noqa: E501
diff --git a/phrasetms_client/api/sub_domain_api.py b/phrasetms_client/api/sub_domain_api.py
index 786b45e6..020710d0 100644
--- a/phrasetms_client/api/sub_domain_api.py
+++ b/phrasetms_client/api/sub_domain_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.page_dto_sub_domain_dto import PageDtoSubDomainDto
from phrasetms_client.models.sub_domain_dto import SubDomainDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_sub_domain(self, body : Optional[SubDomainEditDto] = None, **kwargs) -> SubDomainDto: # noqa: E501
"""Create subdomain # noqa: E501
@@ -75,7 +75,7 @@ def create_sub_domain(self, body : Optional[SubDomainEditDto] = None, **kwargs)
raise ValueError("Error! Please call the create_sub_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_sub_domain_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_sub_domain_with_http_info(self, body : Optional[SubDomainEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create subdomain # noqa: E501
@@ -202,7 +202,7 @@ def create_sub_domain_with_http_info(self, body : Optional[SubDomainEditDto] = N
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_sub_domain(self, sub_domain_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete subdomain # noqa: E501
@@ -230,7 +230,7 @@ def delete_sub_domain(self, sub_domain_uid : StrictStr, **kwargs) -> None: # no
raise ValueError("Error! Please call the delete_sub_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_sub_domain_with_http_info(sub_domain_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_sub_domain_with_http_info(self, sub_domain_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete subdomain # noqa: E501
@@ -333,7 +333,7 @@ def delete_sub_domain_with_http_info(self, sub_domain_uid : StrictStr, **kwargs)
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_sub_domain(self, sub_domain_uid : StrictStr, **kwargs) -> SubDomainDto: # noqa: E501
"""Get subdomain # noqa: E501
@@ -361,7 +361,7 @@ def get_sub_domain(self, sub_domain_uid : StrictStr, **kwargs) -> SubDomainDto:
raise ValueError("Error! Please call the get_sub_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_sub_domain_with_http_info(sub_domain_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_sub_domain_with_http_info(self, sub_domain_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get subdomain # noqa: E501
@@ -481,8 +481,8 @@ def get_sub_domain_with_http_info(self, sub_domain_uid : StrictStr, **kwargs) ->
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_sub_domains(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoSubDomainDto: # noqa: E501
+ @validate_call
+ def list_sub_domains(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoSubDomainDto: # noqa: E501
"""List subdomains # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -519,8 +519,8 @@ def list_sub_domains(self, name : Optional[StrictStr] = None, created_by : Annot
raise ValueError("Error! Please call the list_sub_domains_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_sub_domains_with_http_info(name, created_by, sort, order, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_sub_domains_with_http_info(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_sub_domains_with_http_info(self, name : Optional[StrictStr] = None, created_by : Annotated[Optional[StrictStr], Field(description="Uid of user")] = None, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List subdomains # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -669,7 +669,7 @@ def list_sub_domains_with_http_info(self, name : Optional[StrictStr] = None, cre
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_sub_domain(self, sub_domain_uid : StrictStr, body : Optional[SubDomainEditDto] = None, **kwargs) -> SubDomainDto: # noqa: E501
"""Edit subdomain # noqa: E501
@@ -699,7 +699,7 @@ def update_sub_domain(self, sub_domain_uid : StrictStr, body : Optional[SubDomai
raise ValueError("Error! Please call the update_sub_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_sub_domain_with_http_info(sub_domain_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_sub_domain_with_http_info(self, sub_domain_uid : StrictStr, body : Optional[SubDomainEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit subdomain # noqa: E501
diff --git a/phrasetms_client/api/supported_languages_api.py b/phrasetms_client/api/supported_languages_api.py
index 1552880d..f76c59fd 100644
--- a/phrasetms_client/api/supported_languages_api.py
+++ b/phrasetms_client/api/supported_languages_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
+from typing import Optional
from pydantic import StrictBool
-from typing import Optional
from phrasetms_client.models.language_list_dto import LanguageListDto
@@ -45,7 +45,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def list_of_languages(self, active : Optional[StrictBool] = None, **kwargs) -> LanguageListDto: # noqa: E501
"""List supported languages # noqa: E501
@@ -73,7 +73,7 @@ def list_of_languages(self, active : Optional[StrictBool] = None, **kwargs) -> L
raise ValueError("Error! Please call the list_of_languages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_of_languages_with_http_info(active, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_of_languages_with_http_info(self, active : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List supported languages # noqa: E501
diff --git a/phrasetms_client/api/term_base_api.py b/phrasetms_client/api/term_base_api.py
index 688ffaa5..7846feb8 100644
--- a/phrasetms_client/api/term_base_api.py
+++ b/phrasetms_client/api/term_base_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Any, Dict, List, Optional
-from pydantic import Field, StrictBool, StrictStr, conint, conlist
+from pydantic import Field, StrictBool, StrictStr
-from typing import Any, Dict, Optional
from phrasetms_client.models.background_tasks_tb_dto import BackgroundTasksTbDto
from phrasetms_client.models.browse_request_dto import BrowseRequestDto
@@ -73,7 +73,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def browse_terms(self, term_base_uid : StrictStr, body : Optional[BrowseRequestDto] = None, **kwargs) -> BrowseResponseListDto: # noqa: E501
"""Browse term base # noqa: E501
@@ -103,7 +103,7 @@ def browse_terms(self, term_base_uid : StrictStr, body : Optional[BrowseRequestD
raise ValueError("Error! Please call the browse_terms_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.browse_terms_with_http_info(term_base_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def browse_terms_with_http_info(self, term_base_uid : StrictStr, body : Optional[BrowseRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Browse term base # noqa: E501
@@ -236,7 +236,7 @@ def browse_terms_with_http_info(self, term_base_uid : StrictStr, body : Optional
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def clear_term_base(self, term_base_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Clear term base # noqa: E501
@@ -265,7 +265,7 @@ def clear_term_base(self, term_base_uid : StrictStr, **kwargs) -> None: # noqa:
raise ValueError("Error! Please call the clear_term_base_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.clear_term_base_with_http_info(term_base_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def clear_term_base_with_http_info(self, term_base_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Clear term base # noqa: E501
@@ -369,7 +369,7 @@ def clear_term_base_with_http_info(self, term_base_uid : StrictStr, **kwargs) ->
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_concept(self, term_base_uid : StrictStr, body : Optional[ConceptEditDto] = None, **kwargs) -> ConceptWithMetadataDto: # noqa: E501
"""Create concept # noqa: E501
@@ -399,7 +399,7 @@ def create_concept(self, term_base_uid : StrictStr, body : Optional[ConceptEditD
raise ValueError("Error! Please call the create_concept_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_concept_with_http_info(term_base_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_concept_with_http_info(self, term_base_uid : StrictStr, body : Optional[ConceptEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create concept # noqa: E501
@@ -532,7 +532,7 @@ def create_concept_with_http_info(self, term_base_uid : StrictStr, body : Option
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_term(self, term_base_uid : StrictStr, body : Optional[TermCreateDto] = None, **kwargs) -> TermDto: # noqa: E501
"""Create term # noqa: E501
@@ -563,7 +563,7 @@ def create_term(self, term_base_uid : StrictStr, body : Optional[TermCreateDto]
raise ValueError("Error! Please call the create_term_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_term_with_http_info(term_base_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_term_with_http_info(self, term_base_uid : StrictStr, body : Optional[TermCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create term # noqa: E501
@@ -697,7 +697,7 @@ def create_term_with_http_info(self, term_base_uid : StrictStr, body : Optional[
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_term_base(self, body : Optional[TermBaseEditDto] = None, **kwargs) -> TermBaseDto: # noqa: E501
"""Create term base # noqa: E501
@@ -725,7 +725,7 @@ def create_term_base(self, body : Optional[TermBaseEditDto] = None, **kwargs) ->
raise ValueError("Error! Please call the create_term_base_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_term_base_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_term_base_with_http_info(self, body : Optional[TermBaseEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create term base # noqa: E501
@@ -852,7 +852,7 @@ def create_term_base_with_http_info(self, body : Optional[TermBaseEditDto] = Non
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_term_by_job(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[CreateTermsDto] = None, **kwargs) -> TermPairDto: # noqa: E501
"""Create term in job's term bases # noqa: E501
@@ -885,7 +885,7 @@ def create_term_by_job(self, job_uid : StrictStr, project_uid : StrictStr, body
raise ValueError("Error! Please call the create_term_by_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_term_by_job_with_http_info(job_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_term_by_job_with_http_info(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[CreateTermsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create term in job's term bases # noqa: E501
@@ -1025,7 +1025,7 @@ def create_term_by_job_with_http_info(self, job_uid : StrictStr, project_uid : S
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_concept(self, term_base_uid : StrictStr, concept_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete concept # noqa: E501
@@ -1055,7 +1055,7 @@ def delete_concept(self, term_base_uid : StrictStr, concept_id : StrictStr, **kw
raise ValueError("Error! Please call the delete_concept_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_concept_with_http_info(term_base_uid, concept_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_concept_with_http_info(self, term_base_uid : StrictStr, concept_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete concept # noqa: E501
@@ -1164,7 +1164,7 @@ def delete_concept_with_http_info(self, term_base_uid : StrictStr, concept_id :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_concepts(self, term_base_uid : StrictStr, body : Optional[ConceptListReference] = None, **kwargs) -> None: # noqa: E501
"""Delete concepts # noqa: E501
@@ -1194,7 +1194,7 @@ def delete_concepts(self, term_base_uid : StrictStr, body : Optional[ConceptList
raise ValueError("Error! Please call the delete_concepts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_concepts_with_http_info(term_base_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_concepts_with_http_info(self, term_base_uid : StrictStr, body : Optional[ConceptListReference] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete concepts # noqa: E501
@@ -1310,7 +1310,7 @@ def delete_concepts_with_http_info(self, term_base_uid : StrictStr, body : Optio
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_term(self, term_base_uid : StrictStr, term_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete term # noqa: E501
@@ -1340,7 +1340,7 @@ def delete_term(self, term_base_uid : StrictStr, term_id : StrictStr, **kwargs)
raise ValueError("Error! Please call the delete_term_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_term_with_http_info(term_base_uid, term_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_term_with_http_info(self, term_base_uid : StrictStr, term_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete term # noqa: E501
@@ -1449,7 +1449,7 @@ def delete_term_with_http_info(self, term_base_uid : StrictStr, term_id : Strict
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_term_base(self, term_base_uid : StrictStr, purge : Annotated[Optional[StrictBool], Field(description="purge=false - the Termbase is can later be restored, \"purge=true - the Termbase is completely deleted and cannot be restored")] = None, **kwargs) -> None: # noqa: E501
"""Delete term base # noqa: E501
@@ -1479,7 +1479,7 @@ def delete_term_base(self, term_base_uid : StrictStr, purge : Annotated[Optional
raise ValueError("Error! Please call the delete_term_base_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_term_base_with_http_info(term_base_uid, purge, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_term_base_with_http_info(self, term_base_uid : StrictStr, purge : Annotated[Optional[StrictBool], Field(description="purge=false - the Termbase is can later be restored, \"purge=true - the Termbase is completely deleted and cannot be restored")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete term base # noqa: E501
@@ -1588,7 +1588,7 @@ def delete_term_base_with_http_info(self, term_base_uid : StrictStr, purge : Ann
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def export_term_base(self, term_base_uid : StrictStr, format : Optional[StrictStr] = None, charset : Optional[StrictStr] = None, term_status : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501
"""Export term base # noqa: E501
@@ -1622,7 +1622,7 @@ def export_term_base(self, term_base_uid : StrictStr, format : Optional[StrictSt
raise ValueError("Error! Please call the export_term_base_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.export_term_base_with_http_info(term_base_uid, format, charset, term_status, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def export_term_base_with_http_info(self, term_base_uid : StrictStr, format : Optional[StrictStr] = None, charset : Optional[StrictStr] = None, term_status : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Export term base # noqa: E501
@@ -1743,7 +1743,7 @@ def export_term_base_with_http_info(self, term_base_uid : StrictStr, format : Op
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_concept(self, term_base_uid : StrictStr, concept_uid : StrictStr, **kwargs) -> ConceptWithMetadataDto: # noqa: E501
"""Get concept # noqa: E501
@@ -1773,7 +1773,7 @@ def get_concept(self, term_base_uid : StrictStr, concept_uid : StrictStr, **kwar
raise ValueError("Error! Please call the get_concept_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_concept_with_http_info(term_base_uid, concept_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_concept_with_http_info(self, term_base_uid : StrictStr, concept_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get concept # noqa: E501
@@ -1899,7 +1899,7 @@ def get_concept_with_http_info(self, term_base_uid : StrictStr, concept_uid : St
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_last_background_task(self, term_base_uid : StrictStr, **kwargs) -> BackgroundTasksTbDto: # noqa: E501
"""Last import status # noqa: E501
@@ -1927,7 +1927,7 @@ def get_last_background_task(self, term_base_uid : StrictStr, **kwargs) -> Backg
raise ValueError("Error! Please call the get_last_background_task_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_last_background_task_with_http_info(term_base_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_last_background_task_with_http_info(self, term_base_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Last import status # noqa: E501
@@ -2047,7 +2047,7 @@ def get_last_background_task_with_http_info(self, term_base_uid : StrictStr, **k
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_template_term_bases(self, project_template_uid : StrictStr, **kwargs) -> ProjectTemplateTermBaseListDto: # noqa: E501
"""Get term bases # noqa: E501
@@ -2075,7 +2075,7 @@ def get_project_template_term_bases(self, project_template_uid : StrictStr, **kw
raise ValueError("Error! Please call the get_project_template_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_template_term_bases_with_http_info(project_template_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_template_term_bases_with_http_info(self, project_template_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get term bases # noqa: E501
@@ -2195,7 +2195,7 @@ def get_project_template_term_bases_with_http_info(self, project_template_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_term_bases(self, project_uid : StrictStr, **kwargs) -> ProjectTermBaseListDto: # noqa: E501
"""Get term bases # noqa: E501
@@ -2223,7 +2223,7 @@ def get_project_term_bases(self, project_uid : StrictStr, **kwargs) -> ProjectTe
raise ValueError("Error! Please call the get_project_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_term_bases_with_http_info(project_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_term_bases_with_http_info(self, project_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get term bases # noqa: E501
@@ -2343,7 +2343,7 @@ def get_project_term_bases_with_http_info(self, project_uid : StrictStr, **kwarg
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_term(self, term_base_uid : StrictStr, term_id : StrictStr, **kwargs) -> TermDto: # noqa: E501
"""Get term # noqa: E501
@@ -2373,7 +2373,7 @@ def get_term(self, term_base_uid : StrictStr, term_id : StrictStr, **kwargs) ->
raise ValueError("Error! Please call the get_term_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_term_with_http_info(term_base_uid, term_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_term_with_http_info(self, term_base_uid : StrictStr, term_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get term # noqa: E501
@@ -2499,7 +2499,7 @@ def get_term_with_http_info(self, term_base_uid : StrictStr, term_id : StrictStr
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_term_base(self, term_base_uid : StrictStr, **kwargs) -> TermBaseDto: # noqa: E501
"""Get term base # noqa: E501
@@ -2527,7 +2527,7 @@ def get_term_base(self, term_base_uid : StrictStr, **kwargs) -> TermBaseDto: #
raise ValueError("Error! Please call the get_term_base_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_term_base_with_http_info(term_base_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_term_base_with_http_info(self, term_base_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get term base # noqa: E501
@@ -2647,7 +2647,7 @@ def get_term_base_with_http_info(self, term_base_uid : StrictStr, **kwargs) -> A
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_term_base_metadata(self, term_base_uid : StrictStr, **kwargs) -> MetadataTbDto: # noqa: E501
"""Get term base metadata # noqa: E501
@@ -2675,7 +2675,7 @@ def get_term_base_metadata(self, term_base_uid : StrictStr, **kwargs) -> Metadat
raise ValueError("Error! Please call the get_term_base_metadata_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_term_base_metadata_with_http_info(term_base_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_term_base_metadata_with_http_info(self, term_base_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get term base metadata # noqa: E501
@@ -2795,7 +2795,7 @@ def get_term_base_metadata_with_http_info(self, term_base_uid : StrictStr, **kwa
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> TranslationResourcesDto: # noqa: E501
"""Get translation resources # noqa: E501
@@ -2825,7 +2825,7 @@ def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr
raise ValueError("Error! Please call the get_translation_resources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_translation_resources_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_translation_resources_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation resources # noqa: E501
@@ -2951,7 +2951,7 @@ def get_translation_resources_with_http_info(self, project_uid : StrictStr, job_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def import_term_base(self, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?filename\\*=UTF-8''(.+)`")], term_base_uid : StrictStr, charset : Optional[StrictStr] = None, strict_lang_matching : Optional[StrictBool] = None, update_terms : Optional[StrictBool] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ImportTermBaseResponseDto: # noqa: E501
"""Upload term base # noqa: E501
@@ -2990,7 +2990,7 @@ def import_term_base(self, content_disposition : Annotated[StrictStr, Field(...,
raise ValueError("Error! Please call the import_term_base_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.import_term_base_with_http_info(content_disposition, term_base_uid, charset, strict_lang_matching, update_terms, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def import_term_base_with_http_info(self, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?filename\\*=UTF-8''(.+)`")], term_base_uid : StrictStr, charset : Optional[StrictStr] = None, strict_lang_matching : Optional[StrictBool] = None, update_terms : Optional[StrictBool] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Upload term base # noqa: E501
@@ -3148,8 +3148,8 @@ def import_term_base_with_http_info(self, content_disposition : Annotated[Strict
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_concepts(self, term_base_uid : StrictStr, 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, **kwargs) -> ConceptListResponseDto: # noqa: E501
+ @validate_call
+ def list_concepts(self, term_base_uid : StrictStr, 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, **kwargs) -> ConceptListResponseDto: # noqa: E501
"""List concepts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3180,8 +3180,8 @@ def list_concepts(self, term_base_uid : StrictStr, page_number : Annotated[Optio
raise ValueError("Error! Please call the list_concepts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_concepts_with_http_info(term_base_uid, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_concepts_with_http_info(self, term_base_uid : StrictStr, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_concepts_with_http_info(self, term_base_uid : StrictStr, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List concepts # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3312,8 +3312,8 @@ def list_concepts_with_http_info(self, term_base_uid : StrictStr, page_number :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_term_bases(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[conlist(StrictStr)], Field(description="Language of the term base")] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoTermBaseDto: # noqa: E501
+ @validate_call
+ def list_term_bases(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[List[StrictStr]], Field(description="Language of the term base")] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, 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, **kwargs) -> PageDtoTermBaseDto: # noqa: E501
"""List term bases # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3352,8 +3352,8 @@ def list_term_bases(self, name : Optional[StrictStr] = None, lang : Annotated[Op
raise ValueError("Error! Please call the list_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_term_bases_with_http_info(name, lang, client_id, domain_id, sub_domain_id, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_term_bases_with_http_info(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[conlist(StrictStr)], Field(description="Language of the term base")] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_term_bases_with_http_info(self, name : Optional[StrictStr] = None, lang : Annotated[Optional[List[StrictStr]], Field(description="Language of the term base")] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List term bases # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3509,7 +3509,7 @@ def list_term_bases_with_http_info(self, name : Optional[StrictStr] = None, lang
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def list_terms_of_concept(self, term_base_uid : StrictStr, concept_id : StrictStr, **kwargs) -> ConceptDto: # noqa: E501
"""Get terms of concept # noqa: E501
@@ -3539,7 +3539,7 @@ def list_terms_of_concept(self, term_base_uid : StrictStr, concept_id : StrictSt
raise ValueError("Error! Please call the list_terms_of_concept_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_terms_of_concept_with_http_info(term_base_uid, concept_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def list_terms_of_concept_with_http_info(self, term_base_uid : StrictStr, concept_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get terms of concept # noqa: E501
@@ -3665,8 +3665,8 @@ def list_terms_of_concept_with_http_info(self, term_base_uid : StrictStr, concep
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def relevant_term_bases(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTermBaseDto: # noqa: E501
+ @validate_call
+ def relevant_term_bases(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTermBaseDto: # noqa: E501
"""List project relevant term bases # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3709,8 +3709,8 @@ def relevant_term_bases(self, project_uid : StrictStr, name : Optional[StrictStr
raise ValueError("Error! Please call the relevant_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.relevant_term_bases_with_http_info(project_uid, name, domain_name, client_name, sub_domain_name, target_langs, strict_lang_matching, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def relevant_term_bases_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def relevant_term_bases_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project relevant term bases # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3878,7 +3878,7 @@ def relevant_term_bases_with_http_info(self, project_uid : StrictStr, name : Opt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_terms(self, term_base_uid : StrictStr, body : Optional[TermBaseSearchRequestDto] = None, **kwargs) -> SearchResponseListTbDto: # noqa: E501
"""Search term base # noqa: E501
@@ -3908,7 +3908,7 @@ def search_terms(self, term_base_uid : StrictStr, body : Optional[TermBaseSearch
raise ValueError("Error! Please call the search_terms_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_terms_with_http_info(term_base_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_terms_with_http_info(self, term_base_uid : StrictStr, body : Optional[TermBaseSearchRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search term base # noqa: E501
@@ -4041,7 +4041,7 @@ def search_terms_with_http_info(self, term_base_uid : StrictStr, body : Optional
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_terms_by_job1(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbByJobRequestDto] = None, **kwargs) -> SearchTbResponseListDto: # noqa: E501
"""Search job's term bases # noqa: E501
@@ -4074,7 +4074,7 @@ def search_terms_by_job1(self, job_uid : StrictStr, project_uid : StrictStr, bod
raise ValueError("Error! Please call the search_terms_by_job1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_terms_by_job1_with_http_info(job_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_terms_by_job1_with_http_info(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbByJobRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search job's term bases # noqa: E501
@@ -4214,7 +4214,7 @@ def search_terms_by_job1_with_http_info(self, job_uid : StrictStr, project_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_terms_in_text_by_job_v2(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbInTextByJobRequestDto] = None, **kwargs) -> SearchInTextResponseList2Dto: # noqa: E501
"""Search terms in text # noqa: E501
@@ -4247,7 +4247,7 @@ def search_terms_in_text_by_job_v2(self, job_uid : StrictStr, project_uid : Stri
raise ValueError("Error! Please call the search_terms_in_text_by_job_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_terms_in_text_by_job_v2_with_http_info(job_uid, project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_terms_in_text_by_job_v2_with_http_info(self, job_uid : StrictStr, project_uid : StrictStr, body : Optional[SearchTbInTextByJobRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search terms in text # noqa: E501
@@ -4387,7 +4387,7 @@ def search_terms_in_text_by_job_v2_with_http_info(self, job_uid : StrictStr, pro
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_template_term_bases(self, project_template_uid : StrictStr, body : Optional[SetProjectTemplateTermBaseDto] = None, **kwargs) -> ProjectTemplateTermBaseListDto: # noqa: E501
"""Edit term bases in project template # noqa: E501
@@ -4417,7 +4417,7 @@ def set_project_template_term_bases(self, project_template_uid : StrictStr, body
raise ValueError("Error! Please call the set_project_template_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_template_term_bases_with_http_info(project_template_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_template_term_bases_with_http_info(self, project_template_uid : StrictStr, body : Optional[SetProjectTemplateTermBaseDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit term bases in project template # noqa: E501
@@ -4550,7 +4550,7 @@ def set_project_template_term_bases_with_http_info(self, project_template_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def set_project_term_bases(self, project_uid : StrictStr, body : Optional[SetTermBaseDto] = None, **kwargs) -> ProjectTermBaseListDto: # noqa: E501
"""Edit term bases # noqa: E501
@@ -4580,7 +4580,7 @@ def set_project_term_bases(self, project_uid : StrictStr, body : Optional[SetTer
raise ValueError("Error! Please call the set_project_term_bases_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.set_project_term_bases_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def set_project_term_bases_with_http_info(self, project_uid : StrictStr, body : Optional[SetTermBaseDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit term bases # noqa: E501
@@ -4713,7 +4713,7 @@ def set_project_term_bases_with_http_info(self, project_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_concept(self, term_base_uid : StrictStr, concept_uid : StrictStr, body : Optional[ConceptEditDto] = None, **kwargs) -> ConceptWithMetadataDto: # noqa: E501
"""Update concept # noqa: E501
@@ -4745,7 +4745,7 @@ def update_concept(self, term_base_uid : StrictStr, concept_uid : StrictStr, bod
raise ValueError("Error! Please call the update_concept_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_concept_with_http_info(term_base_uid, concept_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_concept_with_http_info(self, term_base_uid : StrictStr, concept_uid : StrictStr, body : Optional[ConceptEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update concept # noqa: E501
@@ -4884,7 +4884,7 @@ def update_concept_with_http_info(self, term_base_uid : StrictStr, concept_uid :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_term(self, term_base_uid : StrictStr, term_id : StrictStr, body : Optional[TermEditDto] = None, **kwargs) -> TermDto: # noqa: E501
"""Edit term # noqa: E501
@@ -4916,7 +4916,7 @@ def update_term(self, term_base_uid : StrictStr, term_id : StrictStr, body : Opt
raise ValueError("Error! Please call the update_term_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_term_with_http_info(term_base_uid, term_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_term_with_http_info(self, term_base_uid : StrictStr, term_id : StrictStr, body : Optional[TermEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit term # noqa: E501
@@ -5055,7 +5055,7 @@ def update_term_with_http_info(self, term_base_uid : StrictStr, term_id : Strict
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_term_base(self, term_base_uid : StrictStr, body : Optional[TermBaseEditDto] = None, **kwargs) -> TermBaseDto: # noqa: E501
"""Edit term base # noqa: E501
@@ -5086,7 +5086,7 @@ def update_term_base(self, term_base_uid : StrictStr, body : Optional[TermBaseEd
raise ValueError("Error! Please call the update_term_base_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_term_base_with_http_info(term_base_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_term_base_with_http_info(self, term_base_uid : StrictStr, body : Optional[TermBaseEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit term base # noqa: E501
diff --git a/phrasetms_client/api/translation_api.py b/phrasetms_client/api/translation_api.py
index 9bac691f..898e3081 100644
--- a/phrasetms_client/api/translation_api.py
+++ b/phrasetms_client/api/translation_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
+from typing import Optional
from pydantic import StrictStr
-from typing import Optional
from phrasetms_client.models.async_request_wrapper_dto import AsyncRequestWrapperDto
from phrasetms_client.models.async_request_wrapper_v2_dto import AsyncRequestWrapperV2Dto
@@ -50,7 +50,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def human_translate(self, project_uid : StrictStr, body : Optional[HumanTranslateJobsDto] = None, **kwargs) -> AsyncRequestWrapperDto: # noqa: E501
"""Human translate (Gengo or Unbabel) # noqa: E501
@@ -80,7 +80,7 @@ def human_translate(self, project_uid : StrictStr, body : Optional[HumanTranslat
raise ValueError("Error! Please call the human_translate_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.human_translate_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def human_translate_with_http_info(self, project_uid : StrictStr, body : Optional[HumanTranslateJobsDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Human translate (Gengo or Unbabel) # noqa: E501
@@ -213,7 +213,7 @@ def human_translate_with_http_info(self, project_uid : StrictStr, body : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def machine_translation_job(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[TranslationRequestDto] = None, **kwargs) -> MachineTranslateResponse: # noqa: E501
"""Translate using machine translation # noqa: E501
@@ -246,7 +246,7 @@ def machine_translation_job(self, project_uid : StrictStr, job_uid : StrictStr,
raise ValueError("Error! Please call the machine_translation_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.machine_translation_job_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def machine_translation_job_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[TranslationRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Translate using machine translation # noqa: E501
@@ -386,7 +386,7 @@ def machine_translation_job_with_http_info(self, project_uid : StrictStr, job_ui
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def pre_translate1(self, project_uid : StrictStr, body : Optional[PreTranslateJobsV2Dto] = None, **kwargs) -> AsyncRequestWrapperV2Dto: # noqa: E501
"""Pre-translate job # noqa: E501
@@ -416,7 +416,7 @@ def pre_translate1(self, project_uid : StrictStr, body : Optional[PreTranslateJo
raise ValueError("Error! Please call the pre_translate1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.pre_translate1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def pre_translate1_with_http_info(self, project_uid : StrictStr, body : Optional[PreTranslateJobsV2Dto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Pre-translate job # noqa: E501
diff --git a/phrasetms_client/api/translation_memory_api.py b/phrasetms_client/api/translation_memory_api.py
index 2c69686f..2c318259 100644
--- a/phrasetms_client/api/translation_memory_api.py
+++ b/phrasetms_client/api/translation_memory_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Any, Dict, List, Optional
-from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, validator
+from pydantic import Field, StrictBool, StrictInt, StrictStr
-from typing import Any, Dict, Optional
from phrasetms_client.models.async_export_tmby_query_response_dto import AsyncExportTMByQueryResponseDto
from phrasetms_client.models.async_export_tm_response_dto import AsyncExportTMResponseDto
@@ -71,7 +71,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def add_target_lang_to_trans_memory(self, trans_memory_uid : StrictStr, body : Optional[TargetLanguageDto] = None, **kwargs) -> TransMemoryDto: # noqa: E501
"""Add target language to translation memory # noqa: E501
@@ -101,7 +101,7 @@ def add_target_lang_to_trans_memory(self, trans_memory_uid : StrictStr, body : O
raise ValueError("Error! Please call the add_target_lang_to_trans_memory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.add_target_lang_to_trans_memory_with_http_info(trans_memory_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def add_target_lang_to_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[TargetLanguageDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add target language to translation memory # noqa: E501
@@ -234,7 +234,7 @@ def add_target_lang_to_trans_memory_with_http_info(self, trans_memory_uid : Stri
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def clear_trans_memory(self, trans_memory_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete all segments # noqa: E501
@@ -262,7 +262,7 @@ def clear_trans_memory(self, trans_memory_uid : StrictStr, **kwargs) -> None: #
raise ValueError("Error! Please call the clear_trans_memory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.clear_trans_memory_with_http_info(trans_memory_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def clear_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete all segments # noqa: E501
@@ -365,7 +365,7 @@ def clear_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, **kwar
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def clear_trans_memory_v2(self, trans_memory_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete all segments. # noqa: E501
@@ -394,7 +394,7 @@ def clear_trans_memory_v2(self, trans_memory_uid : StrictStr, **kwargs) -> None:
raise ValueError("Error! Please call the clear_trans_memory_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.clear_trans_memory_v2_with_http_info(trans_memory_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def clear_trans_memory_v2_with_http_info(self, trans_memory_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete all segments. # noqa: E501
@@ -498,7 +498,7 @@ def clear_trans_memory_v2_with_http_info(self, trans_memory_uid : StrictStr, **k
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_trans_memory(self, body : Optional[TransMemoryCreateDto] = None, **kwargs) -> TransMemoryDto: # noqa: E501
"""Create translation memory # noqa: E501
@@ -526,7 +526,7 @@ def create_trans_memory(self, body : Optional[TransMemoryCreateDto] = None, **kw
raise ValueError("Error! Please call the create_trans_memory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_trans_memory_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_trans_memory_with_http_info(self, body : Optional[TransMemoryCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create translation memory # noqa: E501
@@ -653,7 +653,7 @@ def create_trans_memory_with_http_info(self, body : Optional[TransMemoryCreateDt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_source_and_translations(self, trans_memory_uid : StrictStr, segment_id : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete both source and translation # noqa: E501
@@ -684,7 +684,7 @@ def delete_source_and_translations(self, trans_memory_uid : StrictStr, segment_i
raise ValueError("Error! Please call the delete_source_and_translations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_source_and_translations_with_http_info(trans_memory_uid, segment_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_source_and_translations_with_http_info(self, trans_memory_uid : StrictStr, segment_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete both source and translation # noqa: E501
@@ -794,7 +794,7 @@ def delete_source_and_translations_with_http_info(self, trans_memory_uid : Stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_trans_memory(self, trans_memory_uid : StrictStr, purge : Optional[StrictBool] = None, **kwargs) -> None: # noqa: E501
"""Delete translation memory # noqa: E501
@@ -824,7 +824,7 @@ def delete_trans_memory(self, trans_memory_uid : StrictStr, purge : Optional[Str
raise ValueError("Error! Please call the delete_trans_memory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_trans_memory_with_http_info(trans_memory_uid, purge, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, purge : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Delete translation memory # noqa: E501
@@ -933,7 +933,7 @@ def delete_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, purge
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_translation(self, trans_memory_uid : StrictStr, segment_id : StrictStr, lang : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete segment of given language # noqa: E501
@@ -966,7 +966,7 @@ def delete_translation(self, trans_memory_uid : StrictStr, segment_id : StrictSt
raise ValueError("Error! Please call the delete_translation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_translation_with_http_info(trans_memory_uid, segment_id, lang, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_translation_with_http_info(self, trans_memory_uid : StrictStr, segment_id : StrictStr, lang : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete segment of given language # noqa: E501
@@ -1082,7 +1082,7 @@ def delete_translation_with_http_info(self, trans_memory_uid : StrictStr, segmen
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def download_cleaned_tm(self, async_request_id : Annotated[StrictStr, Field(..., description="Request ID")], **kwargs) -> None: # noqa: E501
"""Download cleaned TM # noqa: E501
@@ -1110,7 +1110,7 @@ def download_cleaned_tm(self, async_request_id : Annotated[StrictStr, Field(...,
raise ValueError("Error! Please call the download_cleaned_tm_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.download_cleaned_tm_with_http_info(async_request_id, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def download_cleaned_tm_with_http_info(self, async_request_id : Annotated[StrictStr, Field(..., description="Request ID")], **kwargs) -> ApiResponse: # noqa: E501
"""Download cleaned TM # noqa: E501
@@ -1213,8 +1213,8 @@ def download_cleaned_tm_with_http_info(self, async_request_id : Annotated[Strict
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def download_search_result(self, async_request_id : Annotated[StrictStr, Field(..., description="Request ID")], format : Optional[StrictStr] = None, fields : Annotated[Optional[conlist(StrictStr)], Field(description="Fields to include in exported XLSX")] = None, **kwargs) -> None: # noqa: E501
+ @validate_call
+ def download_search_result(self, async_request_id : Annotated[StrictStr, Field(..., description="Request ID")], format : Optional[StrictStr] = None, fields : Annotated[Optional[List[StrictStr]], Field(description="Fields to include in exported XLSX")] = None, **kwargs) -> None: # noqa: E501
"""Download export # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1245,8 +1245,8 @@ def download_search_result(self, async_request_id : Annotated[StrictStr, Field(.
raise ValueError("Error! Please call the download_search_result_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.download_search_result_with_http_info(async_request_id, format, fields, **kwargs) # noqa: E501
- @validate_arguments
- def download_search_result_with_http_info(self, async_request_id : Annotated[StrictStr, Field(..., description="Request ID")], format : Optional[StrictStr] = None, fields : Annotated[Optional[conlist(StrictStr)], Field(description="Fields to include in exported XLSX")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def download_search_result_with_http_info(self, async_request_id : Annotated[StrictStr, Field(..., description="Request ID")], format : Optional[StrictStr] = None, fields : Annotated[Optional[List[StrictStr]], Field(description="Fields to include in exported XLSX")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download export # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1361,7 +1361,7 @@ def download_search_result_with_http_info(self, async_request_id : Annotated[Str
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_trans_memory(self, trans_memory_uid : StrictStr, body : Optional[TransMemoryEditDto] = None, **kwargs) -> TransMemoryDto: # noqa: E501
"""Edit translation memory # noqa: E501
@@ -1391,7 +1391,7 @@ def edit_trans_memory(self, trans_memory_uid : StrictStr, body : Optional[TransM
raise ValueError("Error! Please call the edit_trans_memory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_trans_memory_with_http_info(trans_memory_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[TransMemoryEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit translation memory # noqa: E501
@@ -1524,7 +1524,7 @@ def edit_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, body :
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def export_by_query_async(self, trans_memory_uid : StrictStr, body : Optional[ExportByQueryDto] = None, **kwargs) -> AsyncExportTMByQueryResponseDto: # noqa: E501
"""Search translation memory # noqa: E501
@@ -1555,7 +1555,7 @@ def export_by_query_async(self, trans_memory_uid : StrictStr, body : Optional[Ex
raise ValueError("Error! Please call the export_by_query_async_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.export_by_query_async_with_http_info(trans_memory_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def export_by_query_async_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[ExportByQueryDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search translation memory # noqa: E501
@@ -1689,7 +1689,7 @@ def export_by_query_async_with_http_info(self, trans_memory_uid : StrictStr, bod
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def export_cleaned_tms(self, body : Optional[CleanedTransMemoriesDto] = None, **kwargs) -> AsyncRequestWrapperDto: # noqa: E501
"""Extract cleaned translation memory # noqa: E501
@@ -1718,7 +1718,7 @@ def export_cleaned_tms(self, body : Optional[CleanedTransMemoriesDto] = None, **
raise ValueError("Error! Please call the export_cleaned_tms_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.export_cleaned_tms_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def export_cleaned_tms_with_http_info(self, body : Optional[CleanedTransMemoriesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Extract cleaned translation memory # noqa: E501
@@ -1846,7 +1846,7 @@ def export_cleaned_tms_with_http_info(self, body : Optional[CleanedTransMemories
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def export_v2(self, trans_memory_uid : StrictStr, body : Optional[ExportTMDto] = None, **kwargs) -> AsyncExportTMResponseDto: # noqa: E501
"""Export translation memory # noqa: E501
@@ -1877,7 +1877,7 @@ def export_v2(self, trans_memory_uid : StrictStr, body : Optional[ExportTMDto] =
raise ValueError("Error! Please call the export_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.export_v2_with_http_info(trans_memory_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def export_v2_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[ExportTMDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Export translation memory # noqa: E501
@@ -2004,7 +2004,7 @@ def export_v2_with_http_info(self, trans_memory_uid : StrictStr, body : Optional
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_background_tasks1(self, trans_memory_uid : StrictStr, **kwargs) -> BackgroundTasksTmDto: # noqa: E501
"""Get last task information # noqa: E501
@@ -2032,7 +2032,7 @@ def get_background_tasks1(self, trans_memory_uid : StrictStr, **kwargs) -> Backg
raise ValueError("Error! Please call the get_background_tasks1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_background_tasks1_with_http_info(trans_memory_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_background_tasks1_with_http_info(self, trans_memory_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get last task information # noqa: E501
@@ -2152,7 +2152,7 @@ def get_background_tasks1_with_http_info(self, trans_memory_uid : StrictStr, **k
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_metadata(self, trans_memory_uid : StrictStr, by_language : Optional[StrictBool] = None, **kwargs) -> MetadataResponse: # noqa: E501
"""Get translation memory metadata # noqa: E501
@@ -2182,7 +2182,7 @@ def get_metadata(self, trans_memory_uid : StrictStr, by_language : Optional[Stri
raise ValueError("Error! Please call the get_metadata_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_metadata_with_http_info(trans_memory_uid, by_language, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_metadata_with_http_info(self, trans_memory_uid : StrictStr, by_language : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation memory metadata # noqa: E501
@@ -2308,7 +2308,7 @@ def get_metadata_with_http_info(self, trans_memory_uid : StrictStr, by_language
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_project_template_trans_memories2(self, project_template_uid : StrictStr, target_lang : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by target language")] = None, wf_step_uid : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by workflow step")] = None, **kwargs) -> ProjectTemplateTransMemoryListDtoV3: # noqa: E501
"""Get translation memories # noqa: E501
@@ -2340,7 +2340,7 @@ def get_project_template_trans_memories2(self, project_template_uid : StrictStr,
raise ValueError("Error! Please call the get_project_template_trans_memories2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_project_template_trans_memories2_with_http_info(project_template_uid, target_lang, wf_step_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_project_template_trans_memories2_with_http_info(self, project_template_uid : StrictStr, target_lang : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by target language")] = None, wf_step_uid : Annotated[Optional[StrictStr], Field(description="Filter project translation memories by workflow step")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation memories # noqa: E501
@@ -2472,8 +2472,8 @@ def get_project_template_trans_memories2_with_http_info(self, project_template_u
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_related_projects(self, trans_memory_uid : StrictStr, 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, **kwargs) -> PageDtoAbstractProjectDto: # noqa: E501
+ @validate_call
+ def get_related_projects(self, trans_memory_uid : StrictStr, 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, **kwargs) -> PageDtoAbstractProjectDto: # noqa: E501
"""List related projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2504,8 +2504,8 @@ def get_related_projects(self, trans_memory_uid : StrictStr, page_number : Annot
raise ValueError("Error! Please call the get_related_projects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_related_projects_with_http_info(trans_memory_uid, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def get_related_projects_with_http_info(self, trans_memory_uid : StrictStr, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_related_projects_with_http_info(self, trans_memory_uid : StrictStr, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List related projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2636,7 +2636,7 @@ def get_related_projects_with_http_info(self, trans_memory_uid : StrictStr, page
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_trans_memory(self, trans_memory_uid : StrictStr, **kwargs) -> TransMemoryDto: # noqa: E501
"""Get translation memory # noqa: E501
@@ -2664,7 +2664,7 @@ def get_trans_memory(self, trans_memory_uid : StrictStr, **kwargs) -> TransMemor
raise ValueError("Error! Please call the get_trans_memory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_trans_memory_with_http_info(trans_memory_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation memory # noqa: E501
@@ -2784,7 +2784,7 @@ def get_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, **kwargs
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> TranslationResourcesDto: # noqa: E501
"""Get translation resources # noqa: E501
@@ -2814,7 +2814,7 @@ def get_translation_resources(self, project_uid : StrictStr, job_uid : StrictStr
raise ValueError("Error! Please call the get_translation_resources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_translation_resources_with_http_info(project_uid, job_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_translation_resources_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get translation resources # noqa: E501
@@ -2940,7 +2940,7 @@ def get_translation_resources_with_http_info(self, project_uid : StrictStr, job_
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def import_trans_memory_v2(self, trans_memory_uid : StrictStr, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?filename\\*=UTF-8''(.+)`")], content_length : Optional[StrictInt] = None, strict_lang_matching : Optional[StrictBool] = None, strip_native_codes : Optional[StrictBool] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> AsyncRequestWrapperV2Dto: # noqa: E501
"""Import TMX # noqa: E501
@@ -2978,7 +2978,7 @@ def import_trans_memory_v2(self, trans_memory_uid : StrictStr, content_dispositi
raise ValueError("Error! Please call the import_trans_memory_v2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.import_trans_memory_v2_with_http_info(trans_memory_uid, content_disposition, content_length, strict_lang_matching, strip_native_codes, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def import_trans_memory_v2_with_http_info(self, trans_memory_uid : StrictStr, content_disposition : Annotated[StrictStr, Field(..., description="must match pattern `((inline|attachment); )?filename\\*=UTF-8''(.+)`")], content_length : Optional[StrictInt] = None, strict_lang_matching : Optional[StrictBool] = None, strip_native_codes : Optional[StrictBool] = None, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Import TMX # noqa: E501
@@ -3135,7 +3135,7 @@ def import_trans_memory_v2_with_http_info(self, trans_memory_uid : StrictStr, co
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def insert_to_trans_memory(self, trans_memory_uid : StrictStr, body : Optional[SegmentDto] = None, **kwargs) -> None: # noqa: E501
"""Insert segment # noqa: E501
@@ -3165,7 +3165,7 @@ def insert_to_trans_memory(self, trans_memory_uid : StrictStr, body : Optional[S
raise ValueError("Error! Please call the insert_to_trans_memory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.insert_to_trans_memory_with_http_info(trans_memory_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def insert_to_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[SegmentDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Insert segment # noqa: E501
@@ -3281,8 +3281,8 @@ def insert_to_trans_memory_with_http_info(self, trans_memory_uid : StrictStr, bo
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_trans_memories(self, name : Optional[StrictStr] = None, source_lang : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, business_unit_id : Optional[StrictStr] = None, page_number : Annotated[Optional[StrictInt], 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
+ @validate_call
+ def list_trans_memories(self, name : Optional[StrictStr] = None, source_lang : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, business_unit_id : Optional[StrictStr] = None, page_number : Annotated[Optional[StrictInt], 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
"""List translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3325,8 +3325,8 @@ def list_trans_memories(self, name : Optional[StrictStr] = None, source_lang : O
raise ValueError("Error! Please call the list_trans_memories_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_trans_memories_with_http_info(name, source_lang, target_lang, client_id, domain_id, sub_domain_id, business_unit_id, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_trans_memories_with_http_info(self, name : Optional[StrictStr] = None, source_lang : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, business_unit_id : Optional[StrictStr] = None, page_number : Annotated[Optional[StrictInt], 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_trans_memories_with_http_info(self, name : Optional[StrictStr] = None, source_lang : Optional[StrictStr] = None, target_lang : Optional[StrictStr] = None, client_id : Optional[StrictStr] = None, domain_id : Optional[StrictStr] = None, sub_domain_id : Optional[StrictStr] = None, business_unit_id : Optional[StrictStr] = None, page_number : Annotated[Optional[StrictInt], 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, **kwargs) -> ApiResponse: # noqa: E501
"""List translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3493,8 +3493,8 @@ def list_trans_memories_with_http_info(self, name : Optional[StrictStr] = None,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def relevant_trans_memories(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
+ @validate_call
+ def relevant_trans_memories(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
"""List project template relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3537,8 +3537,8 @@ def relevant_trans_memories(self, project_template_uid : StrictStr, name : Optio
raise ValueError("Error! Please call the relevant_trans_memories_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.relevant_trans_memories_with_http_info(project_template_uid, name, domain_name, client_name, sub_domain_name, target_langs, strict_lang_matching, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def relevant_trans_memories_with_http_info(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def relevant_trans_memories_with_http_info(self, project_template_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project template relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3706,8 +3706,8 @@ def relevant_trans_memories_with_http_info(self, project_template_uid : StrictSt
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def relevant_trans_memories1(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
+ @validate_call
+ def relevant_trans_memories1(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> PageDtoTransMemoryDto: # noqa: E501
"""List project relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3750,8 +3750,8 @@ def relevant_trans_memories1(self, project_uid : StrictStr, name : Optional[Stri
raise ValueError("Error! Please call the relevant_trans_memories1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.relevant_trans_memories1_with_http_info(project_uid, name, domain_name, client_name, sub_domain_name, target_langs, strict_lang_matching, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def relevant_trans_memories1_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[conlist(StrictStr)] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def relevant_trans_memories1_with_http_info(self, project_uid : StrictStr, name : Optional[StrictStr] = None, domain_name : Optional[StrictStr] = None, client_name : Optional[StrictStr] = None, sub_domain_name : Optional[StrictStr] = None, target_langs : Optional[List[StrictStr]] = None, strict_lang_matching : Optional[StrictBool] = None, 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, **kwargs) -> ApiResponse: # noqa: E501
"""List project relevant translation memories # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -3919,7 +3919,7 @@ def relevant_trans_memories1_with_http_info(self, project_uid : StrictStr, name
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search(self, trans_memory_uid : StrictStr, body : Optional[SearchRequestDto] = None, **kwargs) -> SearchResponseListTmDto: # noqa: E501
"""Search translation memory (sync) # noqa: E501
@@ -3949,7 +3949,7 @@ def search(self, trans_memory_uid : StrictStr, body : Optional[SearchRequestDto]
raise ValueError("Error! Please call the search_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_with_http_info(trans_memory_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[SearchRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search translation memory (sync) # noqa: E501
@@ -4082,7 +4082,7 @@ def search_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[Se
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDtoV3] = None, **kwargs) -> SearchResponseListTmDtoV3: # noqa: E501
"""Search job's translation memories # noqa: E501
@@ -4114,7 +4114,7 @@ def search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr, body : Op
raise ValueError("Error! Please call the search_by_job3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_by_job3_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_by_job3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDtoV3] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search job's translation memories # noqa: E501
@@ -4246,7 +4246,7 @@ def search_by_job3_with_http_info(self, project_uid : StrictStr, job_uid : Stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_segment1(self, project_uid : StrictStr, body : Optional[SearchTMRequestDto] = None, **kwargs) -> SearchResponseListTmDto: # noqa: E501
"""Search translation memory for segment in the project # noqa: E501
@@ -4277,7 +4277,7 @@ def search_segment1(self, project_uid : StrictStr, body : Optional[SearchTMReque
raise ValueError("Error! Please call the search_segment1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_segment1_with_http_info(project_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_segment1_with_http_info(self, project_uid : StrictStr, body : Optional[SearchTMRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search translation memory for segment in the project # noqa: E501
@@ -4411,7 +4411,7 @@ def search_segment1_with_http_info(self, project_uid : StrictStr, body : Optiona
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def search_segment_by_job(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDto] = None, **kwargs) -> SearchResponseListTmDto: # noqa: E501
"""Search translation memory for segment by job # noqa: E501
@@ -4444,7 +4444,7 @@ def search_segment_by_job(self, project_uid : StrictStr, job_uid : StrictStr, bo
raise ValueError("Error! Please call the search_segment_by_job_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.search_segment_by_job_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def search_segment_by_job_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[SearchTMByJobRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Search translation memory for segment by job # noqa: E501
@@ -4584,7 +4584,7 @@ def search_segment_by_job_with_http_info(self, project_uid : StrictStr, job_uid
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_translation(self, trans_memory_uid : StrictStr, segment_id : StrictStr, body : Optional[TranslationDto] = None, **kwargs) -> None: # noqa: E501
"""Edit segment # noqa: E501
@@ -4616,7 +4616,7 @@ def update_translation(self, trans_memory_uid : StrictStr, segment_id : StrictSt
raise ValueError("Error! Please call the update_translation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_translation_with_http_info(trans_memory_uid, segment_id, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_translation_with_http_info(self, trans_memory_uid : StrictStr, segment_id : StrictStr, body : Optional[TranslationDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit segment # noqa: E501
@@ -4738,7 +4738,7 @@ def update_translation_with_http_info(self, trans_memory_uid : StrictStr, segmen
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def wild_card_search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[WildCardSearchByJobRequestDtoV3] = None, **kwargs) -> SearchResponseListTmDtoV3: # noqa: E501
"""Wildcard search job's translation memories # noqa: E501
@@ -4770,7 +4770,7 @@ def wild_card_search_by_job3(self, project_uid : StrictStr, job_uid : StrictStr,
raise ValueError("Error! Please call the wild_card_search_by_job3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.wild_card_search_by_job3_with_http_info(project_uid, job_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def wild_card_search_by_job3_with_http_info(self, project_uid : StrictStr, job_uid : StrictStr, body : Optional[WildCardSearchByJobRequestDtoV3] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Wildcard search job's translation memories # noqa: E501
@@ -4909,7 +4909,7 @@ def wild_card_search_by_job3_with_http_info(self, project_uid : StrictStr, job_u
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def wildcard_search(self, trans_memory_uid : StrictStr, body : Optional[WildCardSearchRequestDto] = None, **kwargs) -> SearchResponseListTmDto: # noqa: E501
"""Wildcard search # noqa: E501
@@ -4939,7 +4939,7 @@ def wildcard_search(self, trans_memory_uid : StrictStr, body : Optional[WildCard
raise ValueError("Error! Please call the wildcard_search_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.wildcard_search_with_http_info(trans_memory_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def wildcard_search_with_http_info(self, trans_memory_uid : StrictStr, body : Optional[WildCardSearchRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Wildcard search # noqa: E501
diff --git a/phrasetms_client/api/user_api.py b/phrasetms_client/api/user_api.py
index 365457a5..86db6dab 100644
--- a/phrasetms_client/api/user_api.py
+++ b/phrasetms_client/api/user_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, StringConstraints, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator
+from pydantic import Field, StrictBool, StrictInt, StrictStr, StringConstraints
-from typing import Optional
from phrasetms_client.models.abstract_user_create_dto import AbstractUserCreateDto
from phrasetms_client.models.abstract_user_edit_dto import AbstractUserEditDto
@@ -56,7 +56,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def cancel_deletion(self, user_uid : StrictStr, **kwargs) -> UserDto: # noqa: E501
"""Restore user # noqa: E501
@@ -84,7 +84,7 @@ def cancel_deletion(self, user_uid : StrictStr, **kwargs) -> UserDto: # noqa: E
raise ValueError("Error! Please call the cancel_deletion_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.cancel_deletion_with_http_info(user_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def cancel_deletion_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Restore user # noqa: E501
@@ -204,7 +204,7 @@ def cancel_deletion_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiR
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def create_user_v3(self, body : Optional[AbstractUserCreateDto] = None, **kwargs) -> UserDetailsDtoV3: # noqa: E501
"""Create user # noqa: E501
@@ -232,7 +232,7 @@ def create_user_v3(self, body : Optional[AbstractUserCreateDto] = None, **kwargs
raise ValueError("Error! Please call the create_user_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_user_v3_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_user_v3_with_http_info(self, body : Optional[AbstractUserCreateDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create user # noqa: E501
@@ -359,7 +359,7 @@ def create_user_v3_with_http_info(self, body : Optional[AbstractUserCreateDto] =
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_user1(self, user_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete user # noqa: E501
@@ -387,7 +387,7 @@ def delete_user1(self, user_uid : StrictStr, **kwargs) -> None: # noqa: E501
raise ValueError("Error! Please call the delete_user1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_user1_with_http_info(user_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_user1_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete user # noqa: E501
@@ -490,7 +490,7 @@ def delete_user1_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiResp
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def disable_two_factor_auth_v3(self, user_uid : StrictStr, **kwargs) -> UserDetailsDtoV3: # noqa: E501
"""Disable two-factor authentication # noqa: E501
@@ -518,7 +518,7 @@ def disable_two_factor_auth_v3(self, user_uid : StrictStr, **kwargs) -> UserDeta
raise ValueError("Error! Please call the disable_two_factor_auth_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.disable_two_factor_auth_v3_with_http_info(user_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def disable_two_factor_auth_v3_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Disable two-factor authentication # noqa: E501
@@ -638,8 +638,8 @@ def disable_two_factor_auth_v3_with_http_info(self, user_uid : StrictStr, **kwar
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_list_of_users_filtered(self, first_name : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for first name, that starts with value")] = None, last_name : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for last name, that starts with value")] = None, name : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for last name or first name, that starts with value")] = None, user_name : Optional[constr(strict=True, max_length=255, min_length=0)] = None, email : Optional[constr(strict=True, max_length=255, min_length=0)] = None, name_or_email : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for last name, first name or email starting with the value")] = None, role : Optional[conlist(StrictStr)] = None, include_deleted : Optional[StrictBool] = None, 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, sort : Optional[conlist(StrictStr)] = None, order : Optional[conlist(StrictStr)] = None, **kwargs) -> PageDtoUserDto: # noqa: E501
+ @validate_call
+ def get_list_of_users_filtered(self, first_name : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for first name, that starts with value")] = None, last_name : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for last name, that starts with value")] = None, name : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for last name or first name, that starts with value")] = None, user_name : Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None, email : Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None, name_or_email : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for last name, first name or email starting with the value")] = None, role : Optional[List[StrictStr]] = None, include_deleted : Optional[StrictBool] = None, 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, sort : Optional[List[StrictStr]] = None, order : Optional[List[StrictStr]] = None, **kwargs) -> PageDtoUserDto: # noqa: E501
"""List users # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -688,8 +688,8 @@ def get_list_of_users_filtered(self, first_name : Annotated[Optional[constr(stri
raise ValueError("Error! Please call the get_list_of_users_filtered_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_list_of_users_filtered_with_http_info(first_name, last_name, name, user_name, email, name_or_email, role, include_deleted, page_number, page_size, sort, order, **kwargs) # noqa: E501
- @validate_arguments
- def get_list_of_users_filtered_with_http_info(self, first_name : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for first name, that starts with value")] = None, last_name : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for last name, that starts with value")] = None, name : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for last name or first name, that starts with value")] = None, user_name : Optional[constr(strict=True, max_length=255, min_length=0)] = None, email : Optional[constr(strict=True, max_length=255, min_length=0)] = None, name_or_email : Annotated[Optional[constr(strict=True, max_length=255, min_length=0)], Field(description="Filter for last name, first name or email starting with the value")] = None, role : Optional[conlist(StrictStr)] = None, include_deleted : Optional[StrictBool] = None, 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, sort : Optional[conlist(StrictStr)] = None, order : Optional[conlist(StrictStr)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_list_of_users_filtered_with_http_info(self, first_name : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for first name, that starts with value")] = None, last_name : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for last name, that starts with value")] = None, name : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for last name or first name, that starts with value")] = None, user_name : Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None, email : Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None, name_or_email : Annotated[Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]], Field(description="Filter for last name, first name or email starting with the value")] = None, role : Optional[List[StrictStr]] = None, include_deleted : Optional[StrictBool] = None, 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, sort : Optional[List[StrictStr]] = None, order : Optional[List[StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List users # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -877,7 +877,7 @@ def get_list_of_users_filtered_with_http_info(self, first_name : Annotated[Optio
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_user_v3(self, user_uid : StrictStr, **kwargs) -> UserDetailsDtoV3: # noqa: E501
"""Get user # noqa: E501
@@ -905,7 +905,7 @@ def get_user_v3(self, user_uid : StrictStr, **kwargs) -> UserDetailsDtoV3: # no
raise ValueError("Error! Please call the get_user_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_user_v3_with_http_info(user_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_user_v3_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get user # noqa: E501
@@ -1025,8 +1025,8 @@ def get_user_v3_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiRespo
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_assigned_projects(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, target_lang : Optional[conlist(StrictStr)] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoProjectReference: # noqa: E501
+ @validate_call
+ def list_assigned_projects(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, target_lang : Optional[List[StrictStr]] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoProjectReference: # noqa: E501
"""List assigned projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1069,8 +1069,8 @@ def list_assigned_projects(self, user_uid : StrictStr, status : Optional[conlist
raise ValueError("Error! Please call the list_assigned_projects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_assigned_projects_with_http_info(user_uid, status, target_lang, workflow_step_id, due_in_hours, filename, project_name, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_assigned_projects_with_http_info(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, target_lang : Optional[conlist(StrictStr)] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_assigned_projects_with_http_info(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, target_lang : Optional[List[StrictStr]] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, project_name : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List assigned projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1239,8 +1239,8 @@ def list_assigned_projects_with_http_info(self, user_uid : StrictStr, status : O
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_jobs(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[conlist(StrictStr)] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoAssignedJobDto: # noqa: E501
+ @validate_call
+ def list_jobs(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[List[StrictStr]] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoAssignedJobDto: # noqa: E501
"""List assigned jobs # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1283,8 +1283,8 @@ def list_jobs(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)]
raise ValueError("Error! Please call the list_jobs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_jobs_with_http_info(user_uid, status, project_uid, target_lang, workflow_step_id, due_in_hours, filename, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_jobs_with_http_info(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[conlist(StrictStr)] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_jobs_with_http_info(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[List[StrictStr]] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List assigned jobs # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1453,8 +1453,8 @@ def list_jobs_with_http_info(self, user_uid : StrictStr, status : Optional[conli
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_target_langs(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoString: # noqa: E501
+ @validate_call
+ def list_target_langs(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoString: # noqa: E501
"""List assigned target languages # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1495,8 +1495,8 @@ def list_target_langs(self, user_uid : StrictStr, status : Optional[conlist(Stri
raise ValueError("Error! Please call the list_target_langs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_target_langs_with_http_info(user_uid, status, project_uid, workflow_step_id, due_in_hours, filename, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_target_langs_with_http_info(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_target_langs_with_http_info(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, workflow_step_id : Optional[StrictInt] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List assigned target languages # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1658,8 +1658,8 @@ def list_target_langs_with_http_info(self, user_uid : StrictStr, status : Option
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_workflow_steps(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[conlist(StrictStr)] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoWorkflowStepReference: # noqa: E501
+ @validate_call
+ def list_workflow_steps(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[List[StrictStr]] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoWorkflowStepReference: # noqa: E501
"""List assigned workflow steps # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1700,8 +1700,8 @@ def list_workflow_steps(self, user_uid : StrictStr, status : Optional[conlist(St
raise ValueError("Error! Please call the list_workflow_steps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_workflow_steps_with_http_info(user_uid, status, project_uid, target_lang, due_in_hours, filename, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_workflow_steps_with_http_info(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[conlist(StrictStr)] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_workflow_steps_with_http_info(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[List[StrictStr]] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List assigned workflow steps # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1864,7 +1864,7 @@ def list_workflow_steps_with_http_info(self, user_uid : StrictStr, status : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def login_activity(self, user_uid : StrictStr, **kwargs) -> UserStatisticsListDto: # noqa: E501
"""Login statistics # noqa: E501
@@ -1892,7 +1892,7 @@ def login_activity(self, user_uid : StrictStr, **kwargs) -> UserStatisticsListDt
raise ValueError("Error! Please call the login_activity_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.login_activity_with_http_info(user_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def login_activity_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Login statistics # noqa: E501
@@ -2012,7 +2012,7 @@ def login_activity_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiRe
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def send_login_info(self, user_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Send login information # noqa: E501
@@ -2040,7 +2040,7 @@ def send_login_info(self, user_uid : StrictStr, **kwargs) -> None: # noqa: E501
raise ValueError("Error! Please call the send_login_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.send_login_info_with_http_info(user_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def send_login_info_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Send login information # noqa: E501
@@ -2143,7 +2143,7 @@ def send_login_info_with_http_info(self, user_uid : StrictStr, **kwargs) -> ApiR
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_password(self, user_uid : StrictStr, body : Optional[UserPasswordEditDto] = None, **kwargs) -> None: # noqa: E501
"""Update password # noqa: E501
@@ -2174,7 +2174,7 @@ def update_password(self, user_uid : StrictStr, body : Optional[UserPasswordEdit
raise ValueError("Error! Please call the update_password_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_password_with_http_info(user_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_password_with_http_info(self, user_uid : StrictStr, body : Optional[UserPasswordEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Update password # noqa: E501
@@ -2291,7 +2291,7 @@ def update_password_with_http_info(self, user_uid : StrictStr, body : Optional[U
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_user_v3(self, user_uid : StrictStr, body : Optional[AbstractUserEditDto] = None, **kwargs) -> UserDetailsDtoV3: # noqa: E501
"""Edit user # noqa: E501
@@ -2321,7 +2321,7 @@ def update_user_v3(self, user_uid : StrictStr, body : Optional[AbstractUserEditD
raise ValueError("Error! Please call the update_user_v3_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_user_v3_with_http_info(user_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_user_v3_with_http_info(self, user_uid : StrictStr, body : Optional[AbstractUserEditDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit user # noqa: E501
@@ -2454,8 +2454,8 @@ def update_user_v3_with_http_info(self, user_uid : StrictStr, body : Optional[Ab
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def user_last_logins(self, user_name : Optional[constr(strict=True, max_length=255, min_length=0)] = None, role : Optional[conlist(StrictStr)] = None, sort : Optional[conlist(StrictStr)] = None, order : Optional[conlist(StrictStr)] = None, 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=100, ge=1)], Field(description="Page size, accepts values between 1 and 100, default 100")] = None, **kwargs) -> PageDtoLastLoginDto: # noqa: E501
+ @validate_call
+ def user_last_logins(self, user_name : Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None, role : Optional[List[StrictStr]] = None, sort : Optional[List[StrictStr]] = None, order : Optional[List[StrictStr]] = None, 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=100, ge=1)]], Field(description="Page size, accepts values between 1 and 100, default 100")] = None, **kwargs) -> PageDtoLastLoginDto: # noqa: E501
"""List last login dates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -2492,8 +2492,8 @@ def user_last_logins(self, user_name : Optional[constr(strict=True, max_length=2
raise ValueError("Error! Please call the user_last_logins_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.user_last_logins_with_http_info(user_name, role, sort, order, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def user_last_logins_with_http_info(self, user_name : Optional[constr(strict=True, max_length=255, min_length=0)] = None, role : Optional[conlist(StrictStr)] = None, sort : Optional[conlist(StrictStr)] = None, order : Optional[conlist(StrictStr)] = None, 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=100, ge=1)], Field(description="Page size, accepts values between 1 and 100, default 100")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def user_last_logins_with_http_info(self, user_name : Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None, role : Optional[List[StrictStr]] = None, sort : Optional[List[StrictStr]] = None, order : Optional[List[StrictStr]] = None, 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=100, ge=1)]], Field(description="Page size, accepts values between 1 and 100, default 100")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List last login dates # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/vendor_api.py b/phrasetms_client/api/vendor_api.py
index f80da226..c2fd3e9c 100644
--- a/phrasetms_client/api/vendor_api.py
+++ b/phrasetms_client/api/vendor_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import Optional
-from pydantic import Field, StrictStr, conint
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.create_vendor_dto import CreateVendorDto
from phrasetms_client.models.page_dto_vendor_dto import PageDtoVendorDto
@@ -47,7 +47,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_vendor(self, body : Optional[CreateVendorDto] = None, **kwargs) -> VendorDto: # noqa: E501
"""Create vendor # noqa: E501
@@ -75,7 +75,7 @@ def create_vendor(self, body : Optional[CreateVendorDto] = None, **kwargs) -> Ve
raise ValueError("Error! Please call the create_vendor_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_vendor_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_vendor_with_http_info(self, body : Optional[CreateVendorDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create vendor # noqa: E501
@@ -195,7 +195,7 @@ def create_vendor_with_http_info(self, body : Optional[CreateVendorDto] = None,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_vendor(self, vendor_uid : StrictStr, **kwargs) -> VendorDto: # noqa: E501
"""Get vendor # noqa: E501
@@ -223,7 +223,7 @@ def get_vendor(self, vendor_uid : StrictStr, **kwargs) -> VendorDto: # noqa: E5
raise ValueError("Error! Please call the get_vendor_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_vendor_with_http_info(vendor_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_vendor_with_http_info(self, vendor_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get vendor # noqa: E501
@@ -343,8 +343,8 @@ def get_vendor_with_http_info(self, vendor_uid : StrictStr, **kwargs) -> ApiResp
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_vendors(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 or the vendor, for filtering")] = None, **kwargs) -> PageDtoVendorDto: # noqa: E501
+ @validate_call
+ def list_vendors(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 or the vendor, for filtering")] = None, **kwargs) -> PageDtoVendorDto: # noqa: E501
"""List vendors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -375,8 +375,8 @@ def list_vendors(self, page_number : Annotated[Optional[conint(strict=True, ge=0
raise ValueError("Error! Please call the list_vendors_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_vendors_with_http_info(page_number, page_size, name, **kwargs) # noqa: E501
- @validate_arguments
- def list_vendors_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 or the vendor, for filtering")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_vendors_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 or the vendor, for filtering")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List vendors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/api/webhook_api.py b/phrasetms_client/api/webhook_api.py
index 04aebeee..2ef7a738 100644
--- a/phrasetms_client/api/webhook_api.py
+++ b/phrasetms_client/api/webhook_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictInt, StrictStr, conint, conlist, validator
+from pydantic import Field, StrictInt, StrictStr
-from typing import Optional
from phrasetms_client.models.create_web_hook_dto import CreateWebHookDto
from phrasetms_client.models.page_dto_web_hook_dto_v2 import PageDtoWebHookDtoV2
@@ -50,7 +50,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_web_hook1(self, body : Optional[CreateWebHookDto] = None, **kwargs) -> WebHookDtoV2: # noqa: E501
"""Create webhook # noqa: E501
@@ -78,7 +78,7 @@ def create_web_hook1(self, body : Optional[CreateWebHookDto] = None, **kwargs) -
raise ValueError("Error! Please call the create_web_hook1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_web_hook1_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_web_hook1_with_http_info(self, body : Optional[CreateWebHookDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create webhook # noqa: E501
@@ -205,7 +205,7 @@ def create_web_hook1_with_http_info(self, body : Optional[CreateWebHookDto] = No
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def delete_web_hook1(self, web_hook_uid : StrictStr, **kwargs) -> None: # noqa: E501
"""Delete webhook # noqa: E501
@@ -233,7 +233,7 @@ def delete_web_hook1(self, web_hook_uid : StrictStr, **kwargs) -> None: # noqa:
raise ValueError("Error! Please call the delete_web_hook1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.delete_web_hook1_with_http_info(web_hook_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def delete_web_hook1_with_http_info(self, web_hook_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Delete webhook # noqa: E501
@@ -336,7 +336,7 @@ def delete_web_hook1_with_http_info(self, web_hook_uid : StrictStr, **kwargs) ->
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def get_web_hook1(self, web_hook_uid : StrictStr, **kwargs) -> WebHookDtoV2: # noqa: E501
"""Get webhook # noqa: E501
@@ -364,7 +364,7 @@ def get_web_hook1(self, web_hook_uid : StrictStr, **kwargs) -> WebHookDtoV2: #
raise ValueError("Error! Please call the get_web_hook1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_web_hook1_with_http_info(web_hook_uid, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def get_web_hook1_with_http_info(self, web_hook_uid : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
"""Get webhook # noqa: E501
@@ -484,8 +484,8 @@ def get_web_hook1_with_http_info(self, web_hook_uid : StrictStr, **kwargs) -> Ap
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_web_hook_list1(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="Filter by webhook name")] = None, status : Annotated[Optional[StrictStr], Field(description="Filter by enabled/disabled status")] = None, url : Annotated[Optional[StrictStr], Field(description="Filter by webhook URL")] = None, events : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook events")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoWebHookDtoV2: # noqa: E501
+ @validate_call
+ def get_web_hook_list1(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="Filter by webhook name")] = None, status : Annotated[Optional[StrictStr], Field(description="Filter by enabled/disabled status")] = None, url : Annotated[Optional[StrictStr], Field(description="Filter by webhook URL")] = None, events : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook events")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> PageDtoWebHookDtoV2: # noqa: E501
"""Lists webhooks # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -530,8 +530,8 @@ def get_web_hook_list1(self, page_number : Annotated[Optional[conint(strict=True
raise ValueError("Error! Please call the get_web_hook_list1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_web_hook_list1_with_http_info(page_number, page_size, name, status, url, events, created_by, modified_by, sort_field, sort_trend, **kwargs) # noqa: E501
- @validate_arguments
- def get_web_hook_list1_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="Filter by webhook name")] = None, status : Annotated[Optional[StrictStr], Field(description="Filter by enabled/disabled status")] = None, url : Annotated[Optional[StrictStr], Field(description="Filter by webhook URL")] = None, events : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook events")] = None, created_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_web_hook_list1_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="Filter by webhook name")] = None, status : Annotated[Optional[StrictStr], Field(description="Filter by enabled/disabled status")] = None, url : Annotated[Optional[StrictStr], Field(description="Filter by webhook URL")] = None, events : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook events")] = None, created_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook creators UIDs")] = None, modified_by : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook updaters UIDs")] = None, sort_field : Annotated[Optional[StrictStr], Field(description="Sort by this field")] = None, sort_trend : Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Lists webhooks # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -707,8 +707,8 @@ def get_web_hook_list1_with_http_info(self, page_number : Annotated[Optional[con
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_webhook_calls_list(self, page_number : Annotated[Optional[StrictInt], 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, events : Annotated[Optional[conlist(StrictStr)], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, webhook_uid : Annotated[Optional[StrictStr], Field(description="UID of Webhook to filter by")] = None, parent_uid : Annotated[Optional[StrictStr], Field(description="UID of parent webhook call to filter by")] = None, **kwargs) -> PageDtoWebhookCallDto: # noqa: E501
+ @validate_call
+ def get_webhook_calls_list(self, page_number : Annotated[Optional[StrictInt], 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, events : Annotated[Optional[List[StrictStr]], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, webhook_uid : Annotated[Optional[StrictStr], Field(description="UID of Webhook to filter by")] = None, parent_uid : Annotated[Optional[StrictStr], Field(description="UID of parent webhook call to filter by")] = None, **kwargs) -> PageDtoWebhookCallDto: # noqa: E501
"""Lists webhook calls # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -745,8 +745,8 @@ def get_webhook_calls_list(self, page_number : Annotated[Optional[StrictInt], Fi
raise ValueError("Error! Please call the get_webhook_calls_list_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_webhook_calls_list_with_http_info(page_number, page_size, events, status, webhook_uid, parent_uid, **kwargs) # noqa: E501
- @validate_arguments
- def get_webhook_calls_list_with_http_info(self, page_number : Annotated[Optional[StrictInt], 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, events : Annotated[Optional[conlist(StrictStr)], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, webhook_uid : Annotated[Optional[StrictStr], Field(description="UID of Webhook to filter by")] = None, parent_uid : Annotated[Optional[StrictStr], Field(description="UID of parent webhook call to filter by")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_webhook_calls_list_with_http_info(self, page_number : Annotated[Optional[StrictInt], 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, events : Annotated[Optional[List[StrictStr]], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, webhook_uid : Annotated[Optional[StrictStr], Field(description="UID of Webhook to filter by")] = None, parent_uid : Annotated[Optional[StrictStr], Field(description="UID of parent webhook call to filter by")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Lists webhook calls # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -896,8 +896,8 @@ def get_webhook_calls_list_with_http_info(self, page_number : Annotated[Optional
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def get_webhook_previews(self, events : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook events, example for multiple: ?events=JOB_CREATED&events=JOB_UPDATED")] = None, **kwargs) -> WebhookPreviewsDto: # noqa: E501
+ @validate_call
+ def get_webhook_previews(self, events : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook events, example for multiple: ?events=JOB_CREATED&events=JOB_UPDATED")] = None, **kwargs) -> WebhookPreviewsDto: # noqa: E501
"""Get webhook body previews # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -924,8 +924,8 @@ def get_webhook_previews(self, events : Annotated[Optional[conlist(StrictStr)],
raise ValueError("Error! Please call the get_webhook_previews_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_webhook_previews_with_http_info(events, **kwargs) # noqa: E501
- @validate_arguments
- def get_webhook_previews_with_http_info(self, events : Annotated[Optional[conlist(StrictStr)], Field(description="Filter by webhook events, example for multiple: ?events=JOB_CREATED&events=JOB_UPDATED")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def get_webhook_previews_with_http_info(self, events : Annotated[Optional[List[StrictStr]], Field(description="Filter by webhook events, example for multiple: ?events=JOB_CREATED&events=JOB_UPDATED")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Get webhook body previews # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -1045,8 +1045,8 @@ def get_webhook_previews_with_http_info(self, events : Annotated[Optional[conlis
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def replay_last(self, number_of_calls : Annotated[Optional[conint(strict=True, le=100, ge=1)], Field(description="Number of calls to be replayed")] = None, events : Annotated[Optional[conlist(StrictStr)], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, **kwargs) -> None: # noqa: E501
+ @validate_call
+ def replay_last(self, number_of_calls : Annotated[Optional[Annotated[int, Field(strict=True, le=100, ge=1)]], Field(description="Number of calls to be replayed")] = None, events : Annotated[Optional[List[StrictStr]], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, **kwargs) -> None: # noqa: E501
"""Replay last webhook calls # noqa: E501
Replays specified number of last Webhook calls from oldest to the newest one # noqa: E501
@@ -1078,8 +1078,8 @@ def replay_last(self, number_of_calls : Annotated[Optional[conint(strict=True, l
raise ValueError("Error! Please call the replay_last_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.replay_last_with_http_info(number_of_calls, events, status, **kwargs) # noqa: E501
- @validate_arguments
- def replay_last_with_http_info(self, number_of_calls : Annotated[Optional[conint(strict=True, le=100, ge=1)], Field(description="Number of calls to be replayed")] = None, events : Annotated[Optional[conlist(StrictStr)], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def replay_last_with_http_info(self, number_of_calls : Annotated[Optional[Annotated[int, Field(strict=True, le=100, ge=1)]], Field(description="Number of calls to be replayed")] = None, events : Annotated[Optional[List[StrictStr]], Field(description="List of Webhook events to filter by")] = None, status : Annotated[Optional[StrictStr], Field(description="Status of Webhook calls to filter by")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Replay last webhook calls # noqa: E501
Replays specified number of last Webhook calls from oldest to the newest one # noqa: E501
@@ -1195,7 +1195,7 @@ def replay_last_with_http_info(self, number_of_calls : Annotated[Optional[conint
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def replay_webhook_calls(self, body : Optional[ReplayRequestDto] = None, **kwargs) -> None: # noqa: E501
"""Replay webhook calls # noqa: E501
@@ -1224,7 +1224,7 @@ def replay_webhook_calls(self, body : Optional[ReplayRequestDto] = None, **kwarg
raise ValueError("Error! Please call the replay_webhook_calls_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.replay_webhook_calls_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def replay_webhook_calls_with_http_info(self, body : Optional[ReplayRequestDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Replay webhook calls # noqa: E501
@@ -1328,7 +1328,7 @@ def replay_webhook_calls_with_http_info(self, body : Optional[ReplayRequestDto]
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def send_test_webhook(self, webhook_uid : Annotated[StrictStr, Field(..., description="UID of the webhook")], event : Annotated[StrictStr, Field(..., description="Event of test webhook")], **kwargs) -> None: # noqa: E501
"""Send test webhook # noqa: E501
@@ -1358,7 +1358,7 @@ def send_test_webhook(self, webhook_uid : Annotated[StrictStr, Field(..., descri
raise ValueError("Error! Please call the send_test_webhook_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.send_test_webhook_with_http_info(webhook_uid, event, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def send_test_webhook_with_http_info(self, webhook_uid : Annotated[StrictStr, Field(..., description="UID of the webhook")], event : Annotated[StrictStr, Field(..., description="Event of test webhook")], **kwargs) -> ApiResponse: # noqa: E501
"""Send test webhook # noqa: E501
@@ -1467,7 +1467,7 @@ def send_test_webhook_with_http_info(self, webhook_uid : Annotated[StrictStr, Fi
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def update_web_hook1(self, web_hook_uid : StrictStr, body : Optional[CreateWebHookDto] = None, **kwargs) -> WebHookDtoV2: # noqa: E501
"""Edit webhook # noqa: E501
@@ -1497,7 +1497,7 @@ def update_web_hook1(self, web_hook_uid : StrictStr, body : Optional[CreateWebHo
raise ValueError("Error! Please call the update_web_hook1_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.update_web_hook1_with_http_info(web_hook_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def update_web_hook1_with_http_info(self, web_hook_uid : StrictStr, body : Optional[CreateWebHookDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit webhook # noqa: E501
diff --git a/phrasetms_client/api/workflow_changes_api.py b/phrasetms_client/api/workflow_changes_api.py
index 35744c45..cf7b9204 100644
--- a/phrasetms_client/api/workflow_changes_api.py
+++ b/phrasetms_client/api/workflow_changes_api.py
@@ -16,11 +16,11 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import validate_call, ValidationError
from typing_extensions import Annotated
-
from typing import Optional
+
from phrasetms_client.models.workflow_changes_dto import WorkflowChangesDto
from phrasetms_client.api_client import ApiClient
@@ -43,7 +43,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def download_workflow_changes(self, body : Optional[WorkflowChangesDto] = None, **kwargs) -> None: # noqa: E501
"""Download workflow changes report # noqa: E501
@@ -71,7 +71,7 @@ def download_workflow_changes(self, body : Optional[WorkflowChangesDto] = None,
raise ValueError("Error! Please call the download_workflow_changes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.download_workflow_changes_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def download_workflow_changes_with_http_info(self, body : Optional[WorkflowChangesDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Download workflow changes report # noqa: E501
diff --git a/phrasetms_client/api/workflow_step_api.py b/phrasetms_client/api/workflow_step_api.py
index 93be17a9..a6b6b0a4 100644
--- a/phrasetms_client/api/workflow_step_api.py
+++ b/phrasetms_client/api/workflow_step_api.py
@@ -16,12 +16,12 @@
import io
import warnings
-from pydantic import validate_arguments, ValidationError
+from pydantic import Field, ValidationError, validate_call
from typing_extensions import Annotated
+from typing import List, Optional
-from pydantic import Field, StrictStr, conint, conlist, validator
+from pydantic import Field, StrictStr
-from typing import Optional
from phrasetms_client.models.create_workflow_step_dto import CreateWorkflowStepDto
from phrasetms_client.models.edit_workflow_step_dto import EditWorkflowStepDto
@@ -49,7 +49,7 @@ def __init__(self, api_client=None):
api_client = ApiClient.get_default()
self.api_client = api_client
- @validate_arguments
+ @validate_call
def create_wf_step(self, body : Optional[CreateWorkflowStepDto] = None, **kwargs) -> WorkflowStepDto: # noqa: E501
"""Create workflow step # noqa: E501
@@ -77,7 +77,7 @@ def create_wf_step(self, body : Optional[CreateWorkflowStepDto] = None, **kwargs
raise ValueError("Error! Please call the create_wf_step_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.create_wf_step_with_http_info(body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def create_wf_step_with_http_info(self, body : Optional[CreateWorkflowStepDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Create workflow step # noqa: E501
@@ -204,7 +204,7 @@ def create_wf_step_with_http_info(self, body : Optional[CreateWorkflowStepDto] =
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
+ @validate_call
def edit_wf_step(self, workflow_step_uid : StrictStr, body : Optional[EditWorkflowStepDto] = None, **kwargs) -> WorkflowStepDto: # noqa: E501
"""Edit workflow step # noqa: E501
@@ -234,7 +234,7 @@ def edit_wf_step(self, workflow_step_uid : StrictStr, body : Optional[EditWorkfl
raise ValueError("Error! Please call the edit_wf_step_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.edit_wf_step_with_http_info(workflow_step_uid, body, **kwargs) # noqa: E501
- @validate_arguments
+ @validate_call
def edit_wf_step_with_http_info(self, workflow_step_uid : StrictStr, body : Optional[EditWorkflowStepDto] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Edit workflow step # noqa: E501
@@ -367,8 +367,8 @@ def edit_wf_step_with_http_info(self, workflow_step_uid : StrictStr, body : Opti
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_wf_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, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the workflow step")] = None, abbr : Annotated[Optional[StrictStr], Field(description="Abbreviation of workflow step")] = None, **kwargs) -> PageDtoWorkflowStepDto: # noqa: E501
+ @validate_call
+ def list_wf_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, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the workflow step")] = None, abbr : Annotated[Optional[StrictStr], Field(description="Abbreviation of workflow step")] = None, **kwargs) -> PageDtoWorkflowStepDto: # noqa: E501
"""List workflow steps # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -405,8 +405,8 @@ def list_wf_steps(self, page_number : Annotated[Optional[conint(strict=True, ge=
raise ValueError("Error! Please call the list_wf_steps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_wf_steps_with_http_info(page_number, page_size, sort, order, name, abbr, **kwargs) # noqa: E501
- @validate_arguments
- def list_wf_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, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the workflow step")] = None, abbr : Annotated[Optional[StrictStr], Field(description="Abbreviation of workflow step")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_wf_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, sort : Optional[StrictStr] = None, order : Optional[StrictStr] = None, name : Annotated[Optional[StrictStr], Field(description="Name of the workflow step")] = None, abbr : Annotated[Optional[StrictStr], Field(description="Abbreviation of workflow step")] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List workflow steps # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -555,8 +555,8 @@ def list_wf_steps_with_http_info(self, page_number : Annotated[Optional[conint(s
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def list_workflow_steps(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[conlist(StrictStr)] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> PageDtoWorkflowStepReference: # noqa: E501
+ @validate_call
+ def list_workflow_steps(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[List[StrictStr]] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> PageDtoWorkflowStepReference: # noqa: E501
"""List assigned workflow steps # noqa: E501
This method makes a synchronous HTTP request by default. To make an
@@ -597,8 +597,8 @@ def list_workflow_steps(self, user_uid : StrictStr, status : Optional[conlist(St
raise ValueError("Error! Please call the list_workflow_steps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.list_workflow_steps_with_http_info(user_uid, status, project_uid, target_lang, due_in_hours, filename, page_number, page_size, **kwargs) # noqa: E501
- @validate_arguments
- def list_workflow_steps_with_http_info(self, user_uid : StrictStr, status : Optional[conlist(StrictStr)] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[conlist(StrictStr)] = None, due_in_hours : Annotated[Optional[conint(strict=True, ge=-1)], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[conint(strict=True, ge=0)] = None, page_size : Optional[conint(strict=True, le=50, ge=1)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ @validate_call
+ def list_workflow_steps_with_http_info(self, user_uid : StrictStr, status : Optional[List[StrictStr]] = None, project_uid : Optional[StrictStr] = None, target_lang : Optional[List[StrictStr]] = None, due_in_hours : Annotated[Optional[Annotated[int, Field(strict=True, ge=-1)]], Field(description="-1 for jobs that are overdue")] = None, filename : Optional[StrictStr] = None, page_number : Optional[Annotated[int, Field(strict=True, ge=0)]] = None, page_size : Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None, **kwargs) -> ApiResponse: # noqa: E501
"""List assigned workflow steps # noqa: E501
This method makes a synchronous HTTP request by default. To make an
diff --git a/phrasetms_client/models/absolute_translation_length_warning_dto.py b/phrasetms_client/models/absolute_translation_length_warning_dto.py
index 4cfa0391..ea1a3407 100644
--- a/phrasetms_client/models/absolute_translation_length_warning_dto.py
+++ b/phrasetms_client/models/absolute_translation_length_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class AbsoluteTranslationLengthWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class AbsoluteTranslationLengthWarningDto(SegmentWarning):
limit: Optional[StrictStr] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "limit"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AbsoluteTranslationLengthWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> AbsoluteTranslationLengthWarningDto:
return None
if not isinstance(obj, dict):
- return AbsoluteTranslationLengthWarningDto.parse_obj(obj)
+ return AbsoluteTranslationLengthWarningDto.model_validate(obj)
- _obj = AbsoluteTranslationLengthWarningDto.parse_obj({
+ _obj = AbsoluteTranslationLengthWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/absolute_translation_length_warning_dto_all_of.py b/phrasetms_client/models/absolute_translation_length_warning_dto_all_of.py
index 560f5d6c..51a37795 100644
--- a/phrasetms_client/models/absolute_translation_length_warning_dto_all_of.py
+++ b/phrasetms_client/models/absolute_translation_length_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class AbsoluteTranslationLengthWarningDtoAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class AbsoluteTranslationLengthWarningDtoAllOf(BaseModel):
limit: Optional[StrictStr] = None
__properties = ["limit"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> AbsoluteTranslationLengthWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> AbsoluteTranslationLengthWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return AbsoluteTranslationLengthWarningDtoAllOf.parse_obj(obj)
+ return AbsoluteTranslationLengthWarningDtoAllOf.model_validate(obj)
- _obj = AbsoluteTranslationLengthWarningDtoAllOf.parse_obj({
+ _obj = AbsoluteTranslationLengthWarningDtoAllOf.model_validate({
"limit": obj.get("limit")
})
return _obj
diff --git a/phrasetms_client/models/abstract_analyse_settings_dto.py b/phrasetms_client/models/abstract_analyse_settings_dto.py
index 329d4aff..b04570c6 100644
--- a/phrasetms_client/models/abstract_analyse_settings_dto.py
+++ b/phrasetms_client/models/abstract_analyse_settings_dto.py
@@ -20,7 +20,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class AbstractAnalyseSettingsDto(BaseModel):
"""
@@ -38,7 +38,8 @@ class AbstractAnalyseSettingsDto(BaseModel):
allow_automatic_post_analysis: Optional[StrictBool] = Field(None, alias="allowAutomaticPostAnalysis", description="If automatic post analysis should be created after update source. Default: false")
__properties = ["type", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "countSourceUnits", "includeTransMemory", "namingPattern", "analyzeByLanguage", "analyzeByProvider", "allowAutomaticPostAnalysis"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -48,11 +49,7 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'PreAnalyseTarget', 'Compare')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'type'
@@ -75,7 +72,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -88,7 +85,7 @@ def from_json(cls, json_str: str) -> Union(PostAnalyse, PreAnalyse, PreAnalyseTa
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/abstract_connector_dto.py b/phrasetms_client/models/abstract_connector_dto.py
index 0a6a2c16..36d35028 100644
--- a/phrasetms_client/models/abstract_connector_dto.py
+++ b/phrasetms_client/models/abstract_connector_dto.py
@@ -16,26 +16,23 @@
import pprint
import re # noqa: F401
import json
+from typing_extensions import Annotated
from typing import Union
import phrasetms_client.models
-from pydantic import BaseModel, Field, StrictStr, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
class AbstractConnectorDto(BaseModel):
"""
AbstractConnectorDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(..., description="Name of the connector")
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., description="Name of the connector")
type: StrictStr = Field(..., description="Connector type")
__properties = ["name", "type"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'type'
@@ -71,7 +68,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -84,7 +81,7 @@ def from_json(cls, json_str: str) -> Union(AdobeExperienceManager, AmazonS3, Bit
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/abstract_project_dto.py b/phrasetms_client/models/abstract_project_dto.py
index 0b6bc504..dedae4f8 100644
--- a/phrasetms_client/models/abstract_project_dto.py
+++ b/phrasetms_client/models/abstract_project_dto.py
@@ -20,7 +20,7 @@
from datetime import datetime
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.domain_reference import DomainReference
from phrasetms_client.models.mt_settings_per_language_reference import MTSettingsPerLanguageReference
from phrasetms_client.models.reference_file_reference import ReferenceFileReference
@@ -40,17 +40,13 @@ class AbstractProjectDto(BaseModel):
sub_domain: Optional[SubDomainReference] = Field(None, alias="subDomain")
owner: Optional[UserReference] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr, unique_items=True)] = Field(None, alias="targetLangs")
- references: Optional[conlist(ReferenceFileReference)] = None
- mt_settings_per_language_list: Optional[conlist(MTSettingsPerLanguageReference)] = Field(None, alias="mtSettingsPerLanguageList")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
+ references: Optional[List[ReferenceFileReference]] = None
+ mt_settings_per_language_list: Optional[List[MTSettingsPerLanguageReference]] = Field(None, alias="mtSettingsPerLanguageList")
user_role: Optional[StrictStr] = Field(None, alias="userRole", description="Response differs based on user's role")
__properties = ["uid", "internalId", "id", "name", "dateCreated", "domain", "subDomain", "owner", "sourceLang", "targetLangs", "references", "mtSettingsPerLanguageList", "userRole"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'userRole'
@@ -74,7 +70,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -87,7 +83,7 @@ def from_json(cls, json_str: str) -> Union(AdminProjectManager, Buyer, Linguist,
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"user_role",
},
diff --git a/phrasetms_client/models/abstract_project_dto_v2.py b/phrasetms_client/models/abstract_project_dto_v2.py
index f38248da..82e55c7a 100644
--- a/phrasetms_client/models/abstract_project_dto_v2.py
+++ b/phrasetms_client/models/abstract_project_dto_v2.py
@@ -20,7 +20,7 @@
from datetime import datetime
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.domain_reference import DomainReference
from phrasetms_client.models.mt_settings_per_language_reference import MTSettingsPerLanguageReference
from phrasetms_client.models.reference_file_reference import ReferenceFileReference
@@ -40,20 +40,16 @@ class AbstractProjectDtoV2(BaseModel):
sub_domain: Optional[SubDomainReference] = Field(None, alias="subDomain")
owner: Optional[UserReference] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr, unique_items=True)] = Field(None, alias="targetLangs")
- references: Optional[conlist(ReferenceFileReference)] = None
- mt_settings_per_language_list: Optional[conlist(MTSettingsPerLanguageReference)] = Field(None, alias="mtSettingsPerLanguageList")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
+ references: Optional[List[ReferenceFileReference]] = None
+ mt_settings_per_language_list: Optional[List[MTSettingsPerLanguageReference]] = Field(None, alias="mtSettingsPerLanguageList")
user_role: Optional[StrictStr] = Field(None, alias="userRole", description="Response differs based on user's role")
__properties = ["uid", "internalId", "id", "name", "dateCreated", "domain", "subDomain", "owner", "sourceLang", "targetLangs", "references", "mtSettingsPerLanguageList", "userRole"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -66,7 +62,7 @@ def from_json(cls, json_str: str) -> AbstractProjectDtoV2: # noqa: F821
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"user_role",
},
@@ -103,9 +99,9 @@ def from_dict(cls, obj: dict) -> AbstractProjectDtoV2: # noqa: F821
return None
if not isinstance(obj, dict):
- return AbstractProjectDtoV2.parse_obj(obj)
+ return AbstractProjectDtoV2.model_validate(obj)
- _obj = AbstractProjectDtoV2.parse_obj({
+ _obj = AbstractProjectDtoV2.model_validate({
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
"id": obj.get("id"),
diff --git a/phrasetms_client/models/abstract_user_create_dto.py b/phrasetms_client/models/abstract_user_create_dto.py
index 7086a3c8..8b746c8f 100644
--- a/phrasetms_client/models/abstract_user_create_dto.py
+++ b/phrasetms_client/models/abstract_user_create_dto.py
@@ -19,37 +19,43 @@
import phrasetms_client.models
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictStr, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
class AbstractUserCreateDto(BaseModel):
"""
AbstractUserCreateDto
"""
- user_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="userName")
- first_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="firstName")
- last_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="lastName")
- email: constr(strict=True, max_length=255, min_length=0) = Field(...)
- password: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ user_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="userName")
+ first_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="firstName")
+ last_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="lastName")
+ email: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ password: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
role: StrictStr = Field(..., description="Enum: \"ADMIN\", \"PROJECT_MANAGER\", \"LINGUIST\", \"GUEST\", \"SUBMITTER\"")
- timezone: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ timezone: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
receive_newsletter: Optional[StrictBool] = Field(None, alias="receiveNewsletter", description="Default: true")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
active: Optional[StrictBool] = Field(None, description="Default: true")
__properties = ["userName", "firstName", "lastName", "email", "password", "role", "timezone", "receiveNewsletter", "note", "active"]
- @validator('role')
+ @field_validator('role')
+ @classmethod
def role_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER'):
raise ValueError("must be one of enum values ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'role'
@@ -73,7 +79,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -86,7 +92,7 @@ def from_json(cls, json_str: str) -> Union(ADMIN, GUEST, LINGUIST, PROJECTMANAGE
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/abstract_user_edit_dto.py b/phrasetms_client/models/abstract_user_edit_dto.py
index 67d7f852..6db9e703 100644
--- a/phrasetms_client/models/abstract_user_edit_dto.py
+++ b/phrasetms_client/models/abstract_user_edit_dto.py
@@ -19,36 +19,42 @@
import phrasetms_client.models
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictStr, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
class AbstractUserEditDto(BaseModel):
"""
AbstractUserEditDto
"""
- user_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="userName")
- first_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="firstName")
- last_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="lastName")
- email: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ user_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="userName")
+ first_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="firstName")
+ last_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="lastName")
+ email: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
role: StrictStr = Field(..., description="Enum: \"ADMIN\", \"PROJECT_MANAGER\", \"LINGUIST\", \"GUEST\", \"SUBMITTER\"")
- timezone: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ timezone: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
receive_newsletter: Optional[StrictBool] = Field(None, alias="receiveNewsletter", description="Default: true")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
active: Optional[StrictBool] = Field(None, description="Default: true")
__properties = ["userName", "firstName", "lastName", "email", "role", "timezone", "receiveNewsletter", "note", "active"]
- @validator('role')
+ @field_validator('role')
+ @classmethod
def role_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER'):
raise ValueError("must be one of enum values ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'role'
@@ -72,7 +78,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -85,7 +91,7 @@ def from_json(cls, json_str: str) -> Union(ADMINEDIT, GUESTEDIT, LINGUISTEDIT, P
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/accuracy_weights_dto.py b/phrasetms_client/models/accuracy_weights_dto.py
index 849a0422..2cbcd755 100644
--- a/phrasetms_client/models/accuracy_weights_dto.py
+++ b/phrasetms_client/models/accuracy_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class AccuracyWeightsDto(BaseModel):
@@ -36,14 +36,10 @@ class AccuracyWeightsDto(BaseModel):
over_translation: Optional[ToggleableWeightDto] = Field(None, alias="overTranslation")
__properties = ["accuracy", "addition", "omission", "mistranslation", "underTranslation", "untranslated", "improperTmMatch", "overTranslation"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> AccuracyWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -93,9 +89,9 @@ def from_dict(cls, obj: dict) -> AccuracyWeightsDto:
return None
if not isinstance(obj, dict):
- return AccuracyWeightsDto.parse_obj(obj)
+ return AccuracyWeightsDto.model_validate(obj)
- _obj = AccuracyWeightsDto.parse_obj({
+ _obj = AccuracyWeightsDto.model_validate({
"accuracy": ToggleableWeightDto.from_dict(obj.get("accuracy")) if obj.get("accuracy") is not None else None,
"addition": ToggleableWeightDto.from_dict(obj.get("addition")) if obj.get("addition") is not None else None,
"omission": ToggleableWeightDto.from_dict(obj.get("omission")) if obj.get("omission") is not None else None,
diff --git a/phrasetms_client/models/add_comment_dto.py b/phrasetms_client/models/add_comment_dto.py
index c97a1b57..1b3cc5df 100644
--- a/phrasetms_client/models/add_comment_dto.py
+++ b/phrasetms_client/models/add_comment_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class AddCommentDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class AddCommentDto(BaseModel):
text: StrictStr = Field(...)
__properties = ["text"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> AddCommentDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> AddCommentDto:
return None
if not isinstance(obj, dict):
- return AddCommentDto.parse_obj(obj)
+ return AddCommentDto.model_validate(obj)
- _obj = AddCommentDto.parse_obj({
+ _obj = AddCommentDto.model_validate({
"text": obj.get("text")
})
return _obj
diff --git a/phrasetms_client/models/add_lqa_comment_result_dto.py b/phrasetms_client/models/add_lqa_comment_result_dto.py
index 869c4538..71dbfa30 100644
--- a/phrasetms_client/models/add_lqa_comment_result_dto.py
+++ b/phrasetms_client/models/add_lqa_comment_result_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.lqa_conversation_dto import LQAConversationDto
class AddLqaCommentResultDto(BaseModel):
@@ -30,14 +30,10 @@ class AddLqaCommentResultDto(BaseModel):
conversation: Optional[LQAConversationDto] = None
__properties = ["id", "conversation"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AddLqaCommentResultDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> AddLqaCommentResultDto:
return None
if not isinstance(obj, dict):
- return AddLqaCommentResultDto.parse_obj(obj)
+ return AddLqaCommentResultDto.model_validate(obj)
- _obj = AddLqaCommentResultDto.parse_obj({
+ _obj = AddLqaCommentResultDto.model_validate({
"id": obj.get("id"),
"conversation": LQAConversationDto.from_dict(obj.get("conversation")) if obj.get("conversation") is not None else None
})
diff --git a/phrasetms_client/models/add_plain_comment_result_dto.py b/phrasetms_client/models/add_plain_comment_result_dto.py
index cfabf4f0..f48a0675 100644
--- a/phrasetms_client/models/add_plain_comment_result_dto.py
+++ b/phrasetms_client/models/add_plain_comment_result_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.plain_conversation_dto import PlainConversationDto
class AddPlainCommentResultDto(BaseModel):
@@ -30,14 +30,10 @@ class AddPlainCommentResultDto(BaseModel):
conversation: Optional[PlainConversationDto] = None
__properties = ["id", "conversation"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AddPlainCommentResultDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> AddPlainCommentResultDto:
return None
if not isinstance(obj, dict):
- return AddPlainCommentResultDto.parse_obj(obj)
+ return AddPlainCommentResultDto.model_validate(obj)
- _obj = AddPlainCommentResultDto.parse_obj({
+ _obj = AddPlainCommentResultDto.model_validate({
"id": obj.get("id"),
"conversation": PlainConversationDto.from_dict(obj.get("conversation")) if obj.get("conversation") is not None else None
})
diff --git a/phrasetms_client/models/add_target_lang_dto.py b/phrasetms_client/models/add_target_lang_dto.py
index 1769eeea..d73fd4ff 100644
--- a/phrasetms_client/models/add_target_lang_dto.py
+++ b/phrasetms_client/models/add_target_lang_dto.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class AddTargetLangDto(BaseModel):
"""
AddTargetLangDto
"""
- target_langs: Optional[conlist(StrictStr, max_items=2147483647, min_items=1)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
__properties = ["targetLangs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> AddTargetLangDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> AddTargetLangDto:
return None
if not isinstance(obj, dict):
- return AddTargetLangDto.parse_obj(obj)
+ return AddTargetLangDto.model_validate(obj)
- _obj = AddTargetLangDto.parse_obj({
+ _obj = AddTargetLangDto.model_validate({
"target_langs": obj.get("targetLangs")
})
return _obj
diff --git a/phrasetms_client/models/add_workflow_steps_dto.py b/phrasetms_client/models/add_workflow_steps_dto.py
index f9ba7812..3618e447 100644
--- a/phrasetms_client/models/add_workflow_steps_dto.py
+++ b/phrasetms_client/models/add_workflow_steps_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class AddWorkflowStepsDto(BaseModel):
"""
AddWorkflowStepsDto
"""
- workflow_steps: Optional[conlist(IdReference, max_items=2147483647, min_items=1)] = Field(None, alias="workflowSteps")
+ workflow_steps: Optional[List[IdReference]] = Field(None, alias="workflowSteps")
__properties = ["workflowSteps"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AddWorkflowStepsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> AddWorkflowStepsDto:
return None
if not isinstance(obj, dict):
- return AddWorkflowStepsDto.parse_obj(obj)
+ return AddWorkflowStepsDto.model_validate(obj)
- _obj = AddWorkflowStepsDto.parse_obj({
+ _obj = AddWorkflowStepsDto.model_validate({
"workflow_steps": [IdReference.from_dict(_item) for _item in obj.get("workflowSteps")] if obj.get("workflowSteps") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/additional_workflow_step_dto.py b/phrasetms_client/models/additional_workflow_step_dto.py
index 804f82d3..4a1f5ab5 100644
--- a/phrasetms_client/models/additional_workflow_step_dto.py
+++ b/phrasetms_client/models/additional_workflow_step_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class AdditionalWorkflowStepDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class AdditionalWorkflowStepDto(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AdditionalWorkflowStepDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> AdditionalWorkflowStepDto:
return None
if not isinstance(obj, dict):
- return AdditionalWorkflowStepDto.parse_obj(obj)
+ return AdditionalWorkflowStepDto.model_validate(obj)
- _obj = AdditionalWorkflowStepDto.parse_obj({
+ _obj = AdditionalWorkflowStepDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/additional_workflow_step_request_dto.py b/phrasetms_client/models/additional_workflow_step_request_dto.py
index 20d42f6f..602f8e69 100644
--- a/phrasetms_client/models/additional_workflow_step_request_dto.py
+++ b/phrasetms_client/models/additional_workflow_step_request_dto.py
@@ -13,29 +13,26 @@
from __future__ import annotations
+from typing_extensions import Annotated
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
class AdditionalWorkflowStepRequestDto(BaseModel):
"""
AdditionalWorkflowStepRequestDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(..., description="Name of the additional workflow step")
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., description="Name of the additional workflow step")
__properties = ["name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +45,7 @@ def from_json(cls, json_str: str) -> AdditionalWorkflowStepRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +58,9 @@ def from_dict(cls, obj: dict) -> AdditionalWorkflowStepRequestDto:
return None
if not isinstance(obj, dict):
- return AdditionalWorkflowStepRequestDto.parse_obj(obj)
+ return AdditionalWorkflowStepRequestDto.model_validate(obj)
- _obj = AdditionalWorkflowStepRequestDto.parse_obj({
+ _obj = AdditionalWorkflowStepRequestDto.model_validate({
"name": obj.get("name")
})
return _obj
diff --git a/phrasetms_client/models/additional_workflow_step_v2_dto.py b/phrasetms_client/models/additional_workflow_step_v2_dto.py
index 2befada4..a94605ad 100644
--- a/phrasetms_client/models/additional_workflow_step_v2_dto.py
+++ b/phrasetms_client/models/additional_workflow_step_v2_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class AdditionalWorkflowStepV2Dto(BaseModel):
"""
@@ -29,14 +29,10 @@ class AdditionalWorkflowStepV2Dto(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AdditionalWorkflowStepV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> AdditionalWorkflowStepV2Dto:
return None
if not isinstance(obj, dict):
- return AdditionalWorkflowStepV2Dto.parse_obj(obj)
+ return AdditionalWorkflowStepV2Dto.model_validate(obj)
- _obj = AdditionalWorkflowStepV2Dto.parse_obj({
+ _obj = AdditionalWorkflowStepV2Dto.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/admin.py b/phrasetms_client/models/admin.py
index 4e62a7bd..a95cd330 100644
--- a/phrasetms_client/models/admin.py
+++ b/phrasetms_client/models/admin.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.abstract_user_create_dto import AbstractUserCreateDto
class ADMIN(AbstractUserCreateDto):
@@ -28,14 +28,10 @@ class ADMIN(AbstractUserCreateDto):
"""
__properties = ["userName", "firstName", "lastName", "email", "password", "role", "timezone", "receiveNewsletter", "note", "active"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> ADMIN:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> ADMIN:
return None
if not isinstance(obj, dict):
- return ADMIN.parse_obj(obj)
+ return ADMIN.model_validate(obj)
- _obj = ADMIN.parse_obj({
+ _obj = ADMIN.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/admin_project_manager.py b/phrasetms_client/models/admin_project_manager.py
index c5e86a76..d8e1ec2c 100644
--- a/phrasetms_client/models/admin_project_manager.py
+++ b/phrasetms_client/models/admin_project_manager.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.abstract_project_dto import AbstractProjectDto
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
@@ -54,7 +54,7 @@ class AdminProjectManager(AbstractProjectDto):
quality_assurance_settings: Optional[Dict[str, Any]] = Field(
None, alias="qualityAssuranceSettings"
)
- workflow_steps: Optional[conlist(ProjectWorkflowStepDto)] = Field(
+ workflow_steps: Optional[List[ProjectWorkflowStepDto]] = Field(
None, alias="workflowSteps"
)
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
@@ -96,7 +96,8 @@ class AdminProjectManager(AbstractProjectDto):
"archived",
]
- @validator("status")
+ @field_validator("status")
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -116,15 +117,10 @@ def status_validate_enum(cls, value):
)
return value
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -137,7 +133,7 @@ def from_json(cls, json_str: str) -> AdminProjectManager:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of domain
if self.domain:
_dict["domain"] = self.domain.to_dict()
@@ -192,9 +188,9 @@ def from_dict(cls, obj: dict) -> AdminProjectManager:
return None
if not isinstance(obj, dict):
- return AdminProjectManager.parse_obj(obj)
+ return AdminProjectManager.model_validate(obj)
- _obj = AdminProjectManager.parse_obj(
+ _obj = AdminProjectManager.model_validate(
{
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/admin_project_manager_all_of.py b/phrasetms_client/models/admin_project_manager_all_of.py
index 346e19d7..abc7b016 100644
--- a/phrasetms_client/models/admin_project_manager_all_of.py
+++ b/phrasetms_client/models/admin_project_manager_all_of.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.cost_center_reference import CostCenterReference
@@ -43,14 +43,15 @@ class AdminProjectManagerAllOf(BaseModel):
note: Optional[StrictStr] = None
created_by: Optional[UserReference] = Field(None, alias="createdBy")
quality_assurance_settings: Optional[Dict[str, Any]] = Field(None, alias="qualityAssuranceSettings")
- workflow_steps: Optional[conlist(ProjectWorkflowStepDto)] = Field(None, alias="workflowSteps")
+ workflow_steps: Optional[List[ProjectWorkflowStepDto]] = Field(None, alias="workflowSteps")
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
access_settings: Optional[Dict[str, Any]] = Field(None, alias="accessSettings")
financial_settings: Optional[Dict[str, Any]] = Field(None, alias="financialSettings")
archived: Optional[StrictBool] = None
__properties = ["shared", "progress", "client", "costCenter", "businessUnit", "dateDue", "status", "purchaseOrder", "isPublishedOnJobBoard", "note", "createdBy", "qualityAssuranceSettings", "workflowSteps", "analyseSettings", "accessSettings", "financialSettings", "archived"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -60,14 +61,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ASSIGNED', 'COMPLETED', 'ACCEPTED_BY_VENDOR', 'DECLINED_BY_VENDOR', 'COMPLETED_BY_VENDOR', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -80,7 +77,7 @@ def from_json(cls, json_str: str) -> AdminProjectManagerAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -115,9 +112,9 @@ def from_dict(cls, obj: dict) -> AdminProjectManagerAllOf:
return None
if not isinstance(obj, dict):
- return AdminProjectManagerAllOf.parse_obj(obj)
+ return AdminProjectManagerAllOf.model_validate(obj)
- _obj = AdminProjectManagerAllOf.parse_obj({
+ _obj = AdminProjectManagerAllOf.model_validate({
"shared": obj.get("shared"),
"progress": ProgressDto.from_dict(obj.get("progress")) if obj.get("progress") is not None else None,
"client": ClientReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
diff --git a/phrasetms_client/models/admin_project_manager_v2.py b/phrasetms_client/models/admin_project_manager_v2.py
index 806faefe..92a8cd3d 100644
--- a/phrasetms_client/models/admin_project_manager_v2.py
+++ b/phrasetms_client/models/admin_project_manager_v2.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.abstract_project_dto_v2 import AbstractProjectDtoV2
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
@@ -48,13 +48,14 @@ class AdminProjectManagerV2(AbstractProjectDtoV2):
note: Optional[StrictStr] = None
created_by: Optional[UserReference] = Field(None, alias="createdBy")
quality_assurance_settings: Optional[Dict[str, Any]] = Field(None, alias="qualityAssuranceSettings")
- workflow_steps: Optional[conlist(ProjectWorkflowStepDtoV2)] = Field(None, alias="workflowSteps")
+ workflow_steps: Optional[List[ProjectWorkflowStepDtoV2]] = Field(None, alias="workflowSteps")
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
access_settings: Optional[Dict[str, Any]] = Field(None, alias="accessSettings")
financial_settings: Optional[Dict[str, Any]] = Field(None, alias="financialSettings")
__properties = ["uid", "internalId", "id", "name", "dateCreated", "domain", "subDomain", "owner", "sourceLang", "targetLangs", "references", "mtSettingsPerLanguageList", "userRole", "shared", "progress", "client", "costCenter", "businessUnit", "dateDue", "status", "purchaseOrder", "isPublishedOnJobBoard", "note", "createdBy", "qualityAssuranceSettings", "workflowSteps", "analyseSettings", "accessSettings", "financialSettings"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -64,14 +65,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ASSIGNED', 'COMPLETED', 'ACCEPTED_BY_VENDOR', 'DECLINED_BY_VENDOR', 'COMPLETED_BY_VENDOR', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -84,7 +81,7 @@ def from_json(cls, json_str: str) -> AdminProjectManagerV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -142,9 +139,9 @@ def from_dict(cls, obj: dict) -> AdminProjectManagerV2:
return None
if not isinstance(obj, dict):
- return AdminProjectManagerV2.parse_obj(obj)
+ return AdminProjectManagerV2.model_validate(obj)
- _obj = AdminProjectManagerV2.parse_obj({
+ _obj = AdminProjectManagerV2.model_validate({
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
"id": obj.get("id"),
diff --git a/phrasetms_client/models/admin_project_manager_v2_all_of.py b/phrasetms_client/models/admin_project_manager_v2_all_of.py
index 4741ca2b..7243f259 100644
--- a/phrasetms_client/models/admin_project_manager_v2_all_of.py
+++ b/phrasetms_client/models/admin_project_manager_v2_all_of.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.cost_center_reference import CostCenterReference
@@ -43,13 +43,14 @@ class AdminProjectManagerV2AllOf(BaseModel):
note: Optional[StrictStr] = None
created_by: Optional[UserReference] = Field(None, alias="createdBy")
quality_assurance_settings: Optional[Dict[str, Any]] = Field(None, alias="qualityAssuranceSettings")
- workflow_steps: Optional[conlist(ProjectWorkflowStepDtoV2)] = Field(None, alias="workflowSteps")
+ workflow_steps: Optional[List[ProjectWorkflowStepDtoV2]] = Field(None, alias="workflowSteps")
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
access_settings: Optional[Dict[str, Any]] = Field(None, alias="accessSettings")
financial_settings: Optional[Dict[str, Any]] = Field(None, alias="financialSettings")
__properties = ["shared", "progress", "client", "costCenter", "businessUnit", "dateDue", "status", "purchaseOrder", "isPublishedOnJobBoard", "note", "createdBy", "qualityAssuranceSettings", "workflowSteps", "analyseSettings", "accessSettings", "financialSettings"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -59,14 +60,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ASSIGNED', 'COMPLETED', 'ACCEPTED_BY_VENDOR', 'DECLINED_BY_VENDOR', 'COMPLETED_BY_VENDOR', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -79,7 +76,7 @@ def from_json(cls, json_str: str) -> AdminProjectManagerV2AllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -114,9 +111,9 @@ def from_dict(cls, obj: dict) -> AdminProjectManagerV2AllOf:
return None
if not isinstance(obj, dict):
- return AdminProjectManagerV2AllOf.parse_obj(obj)
+ return AdminProjectManagerV2AllOf.model_validate(obj)
- _obj = AdminProjectManagerV2AllOf.parse_obj({
+ _obj = AdminProjectManagerV2AllOf.model_validate({
"shared": obj.get("shared"),
"progress": ProgressDtoV2.from_dict(obj.get("progress")) if obj.get("progress") is not None else None,
"client": ClientReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
diff --git a/phrasetms_client/models/adminedit.py b/phrasetms_client/models/adminedit.py
index 3bf727e0..fe6467ad 100644
--- a/phrasetms_client/models/adminedit.py
+++ b/phrasetms_client/models/adminedit.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.abstract_user_edit_dto import AbstractUserEditDto
class ADMINEDIT(AbstractUserEditDto):
@@ -28,14 +28,10 @@ class ADMINEDIT(AbstractUserEditDto):
"""
__properties = ["userName", "firstName", "lastName", "email", "role", "timezone", "receiveNewsletter", "note", "active"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> ADMINEDIT:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> ADMINEDIT:
return None
if not isinstance(obj, dict):
- return ADMINEDIT.parse_obj(obj)
+ return ADMINEDIT.model_validate(obj)
- _obj = ADMINEDIT.parse_obj({
+ _obj = ADMINEDIT.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/adminresponse.py b/phrasetms_client/models/adminresponse.py
index 5066effd..8ad0bbe1 100644
--- a/phrasetms_client/models/adminresponse.py
+++ b/phrasetms_client/models/adminresponse.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.user_details_dto_v3 import UserDetailsDtoV3
from phrasetms_client.models.user_reference import UserReference
@@ -29,14 +29,10 @@ class ADMINRESPONSE(UserDetailsDtoV3):
"""
__properties = ["uid", "userName", "firstName", "lastName", "email", "dateCreated", "dateDeleted", "createdBy", "role", "timezone", "note", "receiveNewsletter", "active", "pendingEmailChange"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ADMINRESPONSE:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> ADMINRESPONSE:
return None
if not isinstance(obj, dict):
- return ADMINRESPONSE.parse_obj(obj)
+ return ADMINRESPONSE.model_validate(obj)
- _obj = ADMINRESPONSE.parse_obj({
+ _obj = ADMINRESPONSE.model_validate({
"uid": obj.get("uid"),
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
diff --git a/phrasetms_client/models/adobe_experience_manager.py b/phrasetms_client/models/adobe_experience_manager.py
index 5d491159..a442d729 100644
--- a/phrasetms_client/models/adobe_experience_manager.py
+++ b/phrasetms_client/models/adobe_experience_manager.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class AdobeExperienceManager(AbstractConnectorDto):
@@ -31,14 +31,10 @@ class AdobeExperienceManager(AbstractConnectorDto):
host: StrictStr = Field(...)
__properties = ["name", "type", "urlRewriteFind", "urlRewriteReplace", "host"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> AdobeExperienceManager:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> AdobeExperienceManager:
return None
if not isinstance(obj, dict):
- return AdobeExperienceManager.parse_obj(obj)
+ return AdobeExperienceManager.model_validate(obj)
- _obj = AdobeExperienceManager.parse_obj({
+ _obj = AdobeExperienceManager.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"url_rewrite_find": obj.get("urlRewriteFind"),
diff --git a/phrasetms_client/models/adobe_experience_manager_all_of.py b/phrasetms_client/models/adobe_experience_manager_all_of.py
index 8c82fc45..20ab17ea 100644
--- a/phrasetms_client/models/adobe_experience_manager_all_of.py
+++ b/phrasetms_client/models/adobe_experience_manager_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class AdobeExperienceManagerAllOf(BaseModel):
"""
@@ -30,14 +30,10 @@ class AdobeExperienceManagerAllOf(BaseModel):
host: StrictStr = Field(...)
__properties = ["urlRewriteFind", "urlRewriteReplace", "host"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AdobeExperienceManagerAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> AdobeExperienceManagerAllOf:
return None
if not isinstance(obj, dict):
- return AdobeExperienceManagerAllOf.parse_obj(obj)
+ return AdobeExperienceManagerAllOf.model_validate(obj)
- _obj = AdobeExperienceManagerAllOf.parse_obj({
+ _obj = AdobeExperienceManagerAllOf.model_validate({
"url_rewrite_find": obj.get("urlRewriteFind"),
"url_rewrite_replace": obj.get("urlRewriteReplace"),
"host": obj.get("host")
diff --git a/phrasetms_client/models/amazon_s3.py b/phrasetms_client/models/amazon_s3.py
index bc26ea5f..eaedfee7 100644
--- a/phrasetms_client/models/amazon_s3.py
+++ b/phrasetms_client/models/amazon_s3.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class AmazonS3(AbstractConnectorDto):
@@ -30,14 +30,10 @@ class AmazonS3(AbstractConnectorDto):
api_secret: StrictStr = Field(..., alias="apiSecret")
__properties = ["name", "type", "apiKey", "apiSecret"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AmazonS3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> AmazonS3:
return None
if not isinstance(obj, dict):
- return AmazonS3.parse_obj(obj)
+ return AmazonS3.model_validate(obj)
- _obj = AmazonS3.parse_obj({
+ _obj = AmazonS3.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"api_key": obj.get("apiKey"),
diff --git a/phrasetms_client/models/amazon_s3_all_of.py b/phrasetms_client/models/amazon_s3_all_of.py
index bd236c9b..61847a30 100644
--- a/phrasetms_client/models/amazon_s3_all_of.py
+++ b/phrasetms_client/models/amazon_s3_all_of.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class AmazonS3AllOf(BaseModel):
"""
@@ -29,14 +29,10 @@ class AmazonS3AllOf(BaseModel):
api_secret: StrictStr = Field(..., alias="apiSecret")
__properties = ["apiKey", "apiSecret"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AmazonS3AllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> AmazonS3AllOf:
return None
if not isinstance(obj, dict):
- return AmazonS3AllOf.parse_obj(obj)
+ return AmazonS3AllOf.model_validate(obj)
- _obj = AmazonS3AllOf.parse_obj({
+ _obj = AmazonS3AllOf.model_validate({
"api_key": obj.get("apiKey"),
"api_secret": obj.get("apiSecret")
})
diff --git a/phrasetms_client/models/analyse_job_dto.py b/phrasetms_client/models/analyse_job_dto.py
index 83b04a1e..f6f5417b 100644
--- a/phrasetms_client/models/analyse_job_dto.py
+++ b/phrasetms_client/models/analyse_job_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.data_dto_v1 import DataDtoV1
class AnalyseJobDto(BaseModel):
@@ -32,14 +32,10 @@ class AnalyseJobDto(BaseModel):
discounted_data: Optional[DataDtoV1] = Field(None, alias="discountedData")
__properties = ["uid", "filename", "data", "discountedData"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> AnalyseJobDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> AnalyseJobDto:
return None
if not isinstance(obj, dict):
- return AnalyseJobDto.parse_obj(obj)
+ return AnalyseJobDto.model_validate(obj)
- _obj = AnalyseJobDto.parse_obj({
+ _obj = AnalyseJobDto.model_validate({
"uid": obj.get("uid"),
"filename": obj.get("filename"),
"data": DataDtoV1.from_dict(obj.get("data")) if obj.get("data") is not None else None,
diff --git a/phrasetms_client/models/analyse_job_reference.py b/phrasetms_client/models/analyse_job_reference.py
index 4f6dadb8..49f23897 100644
--- a/phrasetms_client/models/analyse_job_reference.py
+++ b/phrasetms_client/models/analyse_job_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class AnalyseJobReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class AnalyseJobReference(BaseModel):
inner_id: Optional[StrictStr] = Field(None, alias="innerId")
__properties = ["uid", "filename", "innerId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AnalyseJobReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> AnalyseJobReference:
return None
if not isinstance(obj, dict):
- return AnalyseJobReference.parse_obj(obj)
+ return AnalyseJobReference.model_validate(obj)
- _obj = AnalyseJobReference.parse_obj({
+ _obj = AnalyseJobReference.model_validate({
"uid": obj.get("uid"),
"filename": obj.get("filename"),
"inner_id": obj.get("innerId")
diff --git a/phrasetms_client/models/analyse_language_part_dto.py b/phrasetms_client/models/analyse_language_part_dto.py
index 13e1192b..90f1dcd7 100644
--- a/phrasetms_client/models/analyse_language_part_dto.py
+++ b/phrasetms_client/models/analyse_language_part_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.analyse_job_reference import AnalyseJobReference
from phrasetms_client.models.data_dto_v1 import DataDtoV1
@@ -32,17 +32,13 @@ class AnalyseLanguagePartDto(BaseModel):
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
data: Optional[DataDtoV1] = None
discounted_data: Optional[DataDtoV1] = Field(None, alias="discountedData")
- jobs: Optional[conlist(AnalyseJobReference)] = None
+ jobs: Optional[List[AnalyseJobReference]] = None
__properties = ["id", "sourceLang", "targetLang", "data", "discountedData", "jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> AnalyseLanguagePartDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +77,9 @@ def from_dict(cls, obj: dict) -> AnalyseLanguagePartDto:
return None
if not isinstance(obj, dict):
- return AnalyseLanguagePartDto.parse_obj(obj)
+ return AnalyseLanguagePartDto.model_validate(obj)
- _obj = AnalyseLanguagePartDto.parse_obj({
+ _obj = AnalyseLanguagePartDto.model_validate({
"id": obj.get("id"),
"source_lang": obj.get("sourceLang"),
"target_lang": obj.get("targetLang"),
diff --git a/phrasetms_client/models/analyse_language_part_reference.py b/phrasetms_client/models/analyse_language_part_reference.py
index 75700c12..ddcd784b 100644
--- a/phrasetms_client/models/analyse_language_part_reference.py
+++ b/phrasetms_client/models/analyse_language_part_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.analyse_job_reference import AnalyseJobReference
class AnalyseLanguagePartReference(BaseModel):
@@ -29,17 +29,13 @@ class AnalyseLanguagePartReference(BaseModel):
id: Optional[StrictStr] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
- jobs: Optional[conlist(AnalyseJobReference)] = None
+ jobs: Optional[List[AnalyseJobReference]] = None
__properties = ["id", "sourceLang", "targetLang", "jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> AnalyseLanguagePartReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> AnalyseLanguagePartReference:
return None
if not isinstance(obj, dict):
- return AnalyseLanguagePartReference.parse_obj(obj)
+ return AnalyseLanguagePartReference.model_validate(obj)
- _obj = AnalyseLanguagePartReference.parse_obj({
+ _obj = AnalyseLanguagePartReference.model_validate({
"id": obj.get("id"),
"source_lang": obj.get("sourceLang"),
"target_lang": obj.get("targetLang"),
diff --git a/phrasetms_client/models/analyse_language_part_v2_dto.py b/phrasetms_client/models/analyse_language_part_v2_dto.py
index 098aa416..f7ce5740 100644
--- a/phrasetms_client/models/analyse_language_part_v2_dto.py
+++ b/phrasetms_client/models/analyse_language_part_v2_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.analyse_job_reference import AnalyseJobReference
from phrasetms_client.models.data_dto import DataDto
@@ -32,17 +32,13 @@ class AnalyseLanguagePartV2Dto(BaseModel):
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
data: Optional[DataDto] = None
discounted_data: Optional[DataDto] = Field(None, alias="discountedData")
- jobs: Optional[conlist(AnalyseJobReference)] = None
+ jobs: Optional[List[AnalyseJobReference]] = None
__properties = ["id", "sourceLang", "targetLang", "data", "discountedData", "jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> AnalyseLanguagePartV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +77,9 @@ def from_dict(cls, obj: dict) -> AnalyseLanguagePartV2Dto:
return None
if not isinstance(obj, dict):
- return AnalyseLanguagePartV2Dto.parse_obj(obj)
+ return AnalyseLanguagePartV2Dto.model_validate(obj)
- _obj = AnalyseLanguagePartV2Dto.parse_obj({
+ _obj = AnalyseLanguagePartV2Dto.model_validate({
"id": obj.get("id"),
"source_lang": obj.get("sourceLang"),
"target_lang": obj.get("targetLang"),
diff --git a/phrasetms_client/models/analyse_language_part_v3_dto.py b/phrasetms_client/models/analyse_language_part_v3_dto.py
index 90a4ab89..e22109bd 100644
--- a/phrasetms_client/models/analyse_language_part_v3_dto.py
+++ b/phrasetms_client/models/analyse_language_part_v3_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.analyse_job_reference import AnalyseJobReference
from phrasetms_client.models.data_dto import DataDto
from phrasetms_client.models.trans_memory_reference_dto_v2 import TransMemoryReferenceDtoV2
@@ -33,18 +33,14 @@ class AnalyseLanguagePartV3Dto(BaseModel):
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
data: Optional[DataDto] = None
discounted_data: Optional[DataDto] = Field(None, alias="discountedData")
- jobs: Optional[conlist(AnalyseJobReference)] = None
- trans_memories: Optional[conlist(TransMemoryReferenceDtoV2)] = Field(None, alias="transMemories")
+ jobs: Optional[List[AnalyseJobReference]] = None
+ trans_memories: Optional[List[TransMemoryReferenceDtoV2]] = Field(None, alias="transMemories")
__properties = ["id", "sourceLang", "targetLang", "data", "discountedData", "jobs", "transMemories"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> AnalyseLanguagePartV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -90,9 +86,9 @@ def from_dict(cls, obj: dict) -> AnalyseLanguagePartV3Dto:
return None
if not isinstance(obj, dict):
- return AnalyseLanguagePartV3Dto.parse_obj(obj)
+ return AnalyseLanguagePartV3Dto.model_validate(obj)
- _obj = AnalyseLanguagePartV3Dto.parse_obj({
+ _obj = AnalyseLanguagePartV3Dto.model_validate({
"id": obj.get("id"),
"source_lang": obj.get("sourceLang"),
"target_lang": obj.get("targetLang"),
diff --git a/phrasetms_client/models/analyse_recalculate_request_dto.py b/phrasetms_client/models/analyse_recalculate_request_dto.py
index 13c3132f..5b058606 100644
--- a/phrasetms_client/models/analyse_recalculate_request_dto.py
+++ b/phrasetms_client/models/analyse_recalculate_request_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.id_reference import IdReference
class AnalyseRecalculateRequestDto(BaseModel):
"""
AnalyseRecalculateRequestDto
"""
- analyses: conlist(IdReference, max_items=100, min_items=1) = Field(...)
+ analyses: List[IdReference] = Field(...)
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
__properties = ["analyses", "callbackUrl"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AnalyseRecalculateRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> AnalyseRecalculateRequestDto:
return None
if not isinstance(obj, dict):
- return AnalyseRecalculateRequestDto.parse_obj(obj)
+ return AnalyseRecalculateRequestDto.model_validate(obj)
- _obj = AnalyseRecalculateRequestDto.parse_obj({
+ _obj = AnalyseRecalculateRequestDto.model_validate({
"analyses": [IdReference.from_dict(_item) for _item in obj.get("analyses")] if obj.get("analyses") is not None else None,
"callback_url": obj.get("callbackUrl")
})
diff --git a/phrasetms_client/models/analyse_recalculate_response_dto.py b/phrasetms_client/models/analyse_recalculate_response_dto.py
index 5892ae77..e4f97e7e 100644
--- a/phrasetms_client/models/analyse_recalculate_response_dto.py
+++ b/phrasetms_client/models/analyse_recalculate_response_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.async_analyse_response_dto import AsyncAnalyseResponseDto
class AnalyseRecalculateResponseDto(BaseModel):
"""
AnalyseRecalculateResponseDto
"""
- analyses: Optional[conlist(AsyncAnalyseResponseDto)] = None
+ analyses: Optional[List[AsyncAnalyseResponseDto]] = None
__properties = ["analyses"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AnalyseRecalculateResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> AnalyseRecalculateResponseDto:
return None
if not isinstance(obj, dict):
- return AnalyseRecalculateResponseDto.parse_obj(obj)
+ return AnalyseRecalculateResponseDto.model_validate(obj)
- _obj = AnalyseRecalculateResponseDto.parse_obj({
+ _obj = AnalyseRecalculateResponseDto.model_validate({
"analyses": [AsyncAnalyseResponseDto.from_dict(_item) for _item in obj.get("analyses")] if obj.get("analyses") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/analyse_reference.py b/phrasetms_client/models/analyse_reference.py
index 5c599c1b..c809d81d 100644
--- a/phrasetms_client/models/analyse_reference.py
+++ b/phrasetms_client/models/analyse_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.analyse_language_part_reference import AnalyseLanguagePartReference
from phrasetms_client.models.import_status_dto import ImportStatusDto
from phrasetms_client.models.net_rate_scheme_reference import NetRateSchemeReference
@@ -39,13 +39,14 @@ class AnalyseReference(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
date_created: Optional[datetime] = Field(None, alias="dateCreated")
net_rate_scheme: Optional[NetRateSchemeReference] = Field(None, alias="netRateScheme")
- analyse_language_parts: Optional[conlist(AnalyseLanguagePartReference)] = Field(None, alias="analyseLanguageParts")
+ analyse_language_parts: Optional[List[AnalyseLanguagePartReference]] = Field(None, alias="analyseLanguageParts")
outdated: Optional[StrictBool] = None
import_status: Optional[ImportStatusDto] = Field(None, alias="importStatus")
- pure_warnings: Optional[conlist(StrictStr)] = Field(None, alias="pureWarnings")
+ pure_warnings: Optional[List[StrictStr]] = Field(None, alias="pureWarnings")
__properties = ["id", "uid", "innerId", "type", "name", "provider", "createdBy", "dateCreated", "netRateScheme", "analyseLanguageParts", "outdated", "importStatus", "pureWarnings"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -55,14 +56,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'PreAnalyseTarget', 'Compare', 'PreAnalyseProvider')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -75,7 +72,7 @@ def from_json(cls, json_str: str) -> AnalyseReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -107,9 +104,9 @@ def from_dict(cls, obj: dict) -> AnalyseReference:
return None
if not isinstance(obj, dict):
- return AnalyseReference.parse_obj(obj)
+ return AnalyseReference.model_validate(obj)
- _obj = AnalyseReference.parse_obj({
+ _obj = AnalyseReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"inner_id": obj.get("innerId"),
diff --git a/phrasetms_client/models/analyse_settings_dto.py b/phrasetms_client/models/analyse_settings_dto.py
index 6ca0718e..784a074e 100644
--- a/phrasetms_client/models/analyse_settings_dto.py
+++ b/phrasetms_client/models/analyse_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class AnalyseSettingsDto(BaseModel):
"""
@@ -44,7 +44,8 @@ class AnalyseSettingsDto(BaseModel):
machine_translate_post_editing: Optional[StrictBool] = Field(None, alias="machineTranslatePostEditing", description="Default: false")
__properties = ["type", "includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeNonTranslatables", "includeMachineTranslationMatches", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "countSourceUnits", "includeTransMemory", "namingPattern", "analyzeByLanguage", "analyzeByProvider", "allowAutomaticPostAnalysis", "transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -54,14 +55,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'PreAnalyseTarget', 'Compare')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -74,7 +71,7 @@ def from_json(cls, json_str: str) -> AnalyseSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +84,9 @@ def from_dict(cls, obj: dict) -> AnalyseSettingsDto:
return None
if not isinstance(obj, dict):
- return AnalyseSettingsDto.parse_obj(obj)
+ return AnalyseSettingsDto.model_validate(obj)
- _obj = AnalyseSettingsDto.parse_obj({
+ _obj = AnalyseSettingsDto.model_validate({
"type": obj.get("type"),
"include_fuzzy_repetitions": obj.get("includeFuzzyRepetitions"),
"separate_fuzzy_repetitions": obj.get("separateFuzzyRepetitions"),
diff --git a/phrasetms_client/models/analyse_v2_dto.py b/phrasetms_client/models/analyse_v2_dto.py
index 55614408..491afdad 100644
--- a/phrasetms_client/models/analyse_v2_dto.py
+++ b/phrasetms_client/models/analyse_v2_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.analyse_language_part_v2_dto import AnalyseLanguagePartV2Dto
from phrasetms_client.models.net_rate_scheme_reference import NetRateSchemeReference
from phrasetms_client.models.provider_reference import ProviderReference
@@ -37,10 +37,11 @@ class AnalyseV2Dto(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
date_created: Optional[datetime] = Field(None, alias="dateCreated")
net_rate_scheme: Optional[NetRateSchemeReference] = Field(None, alias="netRateScheme")
- analyse_language_parts: Optional[conlist(AnalyseLanguagePartV2Dto)] = Field(None, alias="analyseLanguageParts")
+ analyse_language_parts: Optional[List[AnalyseLanguagePartV2Dto]] = Field(None, alias="analyseLanguageParts")
__properties = ["id", "uid", "type", "name", "provider", "createdBy", "dateCreated", "netRateScheme", "analyseLanguageParts"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -50,14 +51,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'PreAnalyseTarget', 'Compare', 'PreAnalyseProvider')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -70,7 +67,7 @@ def from_json(cls, json_str: str) -> AnalyseV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -99,9 +96,9 @@ def from_dict(cls, obj: dict) -> AnalyseV2Dto:
return None
if not isinstance(obj, dict):
- return AnalyseV2Dto.parse_obj(obj)
+ return AnalyseV2Dto.model_validate(obj)
- _obj = AnalyseV2Dto.parse_obj({
+ _obj = AnalyseV2Dto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/analyse_v3_dto.py b/phrasetms_client/models/analyse_v3_dto.py
index 363cff2a..328c42ce 100644
--- a/phrasetms_client/models/analyse_v3_dto.py
+++ b/phrasetms_client/models/analyse_v3_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator
from phrasetms_client.models.abstract_analyse_settings_dto import AbstractAnalyseSettingsDto
from phrasetms_client.models.analyse_language_part_v3_dto import AnalyseLanguagePartV3Dto
from phrasetms_client.models.import_status_dto import ImportStatusDto
@@ -42,15 +42,16 @@ class AnalyseV3Dto(BaseModel):
date_created: Optional[datetime] = Field(None, alias="dateCreated")
net_rate_scheme: Optional[NetRateSchemeReference] = Field(None, alias="netRateScheme")
can_change_net_rate_scheme: Optional[StrictBool] = Field(None, alias="canChangeNetRateScheme")
- analyse_language_parts: Optional[conlist(AnalyseLanguagePartV3Dto)] = Field(None, alias="analyseLanguageParts")
+ analyse_language_parts: Optional[List[AnalyseLanguagePartV3Dto]] = Field(None, alias="analyseLanguageParts")
settings: Optional[AbstractAnalyseSettingsDto] = None
outdated: Optional[StrictBool] = None
import_status: Optional[ImportStatusDto] = Field(None, alias="importStatus")
- pure_warnings: Optional[conlist(StrictStr)] = Field(None, alias="pureWarnings")
+ pure_warnings: Optional[List[StrictStr]] = Field(None, alias="pureWarnings")
project: Optional[ProjectReference] = None
__properties = ["id", "uid", "innerId", "type", "name", "provider", "createdBy", "dateCreated", "netRateScheme", "canChangeNetRateScheme", "analyseLanguageParts", "settings", "outdated", "importStatus", "pureWarnings", "project"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -60,14 +61,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'PreAnalyseTarget', 'Compare', 'PreAnalyseProvider')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -80,7 +77,7 @@ def from_json(cls, json_str: str) -> AnalyseV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -118,9 +115,9 @@ def from_dict(cls, obj: dict) -> AnalyseV3Dto:
return None
if not isinstance(obj, dict):
- return AnalyseV3Dto.parse_obj(obj)
+ return AnalyseV3Dto.model_validate(obj)
- _obj = AnalyseV3Dto.parse_obj({
+ _obj = AnalyseV3Dto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"inner_id": obj.get("innerId"),
diff --git a/phrasetms_client/models/analyses_v2_dto.py b/phrasetms_client/models/analyses_v2_dto.py
index 9e54fb4e..41f99f69 100644
--- a/phrasetms_client/models/analyses_v2_dto.py
+++ b/phrasetms_client/models/analyses_v2_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.analyse_v2_dto import AnalyseV2Dto
class AnalysesV2Dto(BaseModel):
"""
AnalysesV2Dto
"""
- analyses: Optional[conlist(AnalyseV2Dto)] = None
+ analyses: Optional[List[AnalyseV2Dto]] = None
__properties = ["analyses"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AnalysesV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> AnalysesV2Dto:
return None
if not isinstance(obj, dict):
- return AnalysesV2Dto.parse_obj(obj)
+ return AnalysesV2Dto.model_validate(obj)
- _obj = AnalysesV2Dto.parse_obj({
+ _obj = AnalysesV2Dto.model_validate({
"analyses": [AnalyseV2Dto.from_dict(_item) for _item in obj.get("analyses")] if obj.get("analyses") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/android_settings_dto.py b/phrasetms_client/models/android_settings_dto.py
index e578bc17..db8added 100644
--- a/phrasetms_client/models/android_settings_dto.py
+++ b/phrasetms_client/models/android_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class AndroidSettingsDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class AndroidSettingsDto(BaseModel):
icu_sub_filter: Optional[StrictBool] = Field(None, alias="icuSubFilter", description="Default: `false`")
__properties = ["tagRegexp", "icuSubFilter"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AndroidSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> AndroidSettingsDto:
return None
if not isinstance(obj, dict):
- return AndroidSettingsDto.parse_obj(obj)
+ return AndroidSettingsDto.model_validate(obj)
- _obj = AndroidSettingsDto.parse_obj({
+ _obj = AndroidSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp"),
"icu_sub_filter": obj.get("icuSubFilter")
})
diff --git a/phrasetms_client/models/apple_token_response_dto.py b/phrasetms_client/models/apple_token_response_dto.py
index 8cbb68c2..ce958acb 100644
--- a/phrasetms_client/models/apple_token_response_dto.py
+++ b/phrasetms_client/models/apple_token_response_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class AppleTokenResponseDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class AppleTokenResponseDto(BaseModel):
id_token: Optional[StrictStr] = None
__properties = ["access_token", "token_type", "expires_in", "refresh_token", "id_token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> AppleTokenResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> AppleTokenResponseDto:
return None
if not isinstance(obj, dict):
- return AppleTokenResponseDto.parse_obj(obj)
+ return AppleTokenResponseDto.model_validate(obj)
- _obj = AppleTokenResponseDto.parse_obj({
+ _obj = AppleTokenResponseDto.model_validate({
"access_token": obj.get("access_token"),
"token_type": obj.get("token_type"),
"expires_in": obj.get("expires_in"),
diff --git a/phrasetms_client/models/asciidoc_settings_dto.py b/phrasetms_client/models/asciidoc_settings_dto.py
index ddfb83a4..4f7b499f 100644
--- a/phrasetms_client/models/asciidoc_settings_dto.py
+++ b/phrasetms_client/models/asciidoc_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class AsciidocSettingsDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class AsciidocSettingsDto(BaseModel):
extract_btn_menu_labels: Optional[StrictBool] = Field(None, alias="extractBtnMenuLabels", description="Default: `false`")
__properties = ["tagRegexp", "htmlInPassthrough", "nontranslatableMonospaceCustomStylesRegexp", "extractCustomDocumentAttributeNameRegexp", "extractBtnMenuLabels"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> AsciidocSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> AsciidocSettingsDto:
return None
if not isinstance(obj, dict):
- return AsciidocSettingsDto.parse_obj(obj)
+ return AsciidocSettingsDto.model_validate(obj)
- _obj = AsciidocSettingsDto.parse_obj({
+ _obj = AsciidocSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp"),
"html_in_passthrough": obj.get("htmlInPassthrough"),
"nontranslatable_monospace_custom_styles_regexp": obj.get("nontranslatableMonospaceCustomStylesRegexp"),
diff --git a/phrasetms_client/models/assign_vendor_dto.py b/phrasetms_client/models/assign_vendor_dto.py
index 9a1f0a47..fb50b2ab 100644
--- a/phrasetms_client/models/assign_vendor_dto.py
+++ b/phrasetms_client/models/assign_vendor_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class AssignVendorDto(BaseModel):
@@ -30,14 +30,10 @@ class AssignVendorDto(BaseModel):
date_due: Optional[datetime] = Field(None, alias="dateDue")
__properties = ["vendor", "dateDue"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AssignVendorDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> AssignVendorDto:
return None
if not isinstance(obj, dict):
- return AssignVendorDto.parse_obj(obj)
+ return AssignVendorDto.model_validate(obj)
- _obj = AssignVendorDto.parse_obj({
+ _obj = AssignVendorDto.model_validate({
"vendor": IdReference.from_dict(obj.get("vendor")) if obj.get("vendor") is not None else None,
"date_due": obj.get("dateDue")
})
diff --git a/phrasetms_client/models/assignable_templates_dto.py b/phrasetms_client/models/assignable_templates_dto.py
index 19981891..6d383362 100644
--- a/phrasetms_client/models/assignable_templates_dto.py
+++ b/phrasetms_client/models/assignable_templates_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_template_dto import ProjectTemplateDto
class AssignableTemplatesDto(BaseModel):
"""
AssignableTemplatesDto
"""
- assignable_templates: Optional[conlist(ProjectTemplateDto)] = Field(None, alias="assignableTemplates")
+ assignable_templates: Optional[List[ProjectTemplateDto]] = Field(None, alias="assignableTemplates")
__properties = ["assignableTemplates"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AssignableTemplatesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> AssignableTemplatesDto:
return None
if not isinstance(obj, dict):
- return AssignableTemplatesDto.parse_obj(obj)
+ return AssignableTemplatesDto.model_validate(obj)
- _obj = AssignableTemplatesDto.parse_obj({
+ _obj = AssignableTemplatesDto.model_validate({
"assignable_templates": [ProjectTemplateDto.from_dict(_item) for _item in obj.get("assignableTemplates")] if obj.get("assignableTemplates") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/assigned_job_dto.py b/phrasetms_client/models/assigned_job_dto.py
index 9a1ed4ad..91634414 100644
--- a/phrasetms_client/models/assigned_job_dto.py
+++ b/phrasetms_client/models/assigned_job_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.import_status_dto import ImportStatusDto
from phrasetms_client.models.project_reference import ProjectReference
from phrasetms_client.models.project_workflow_step_reference import ProjectWorkflowStepReference
@@ -42,7 +42,8 @@ class AssignedJobDto(BaseModel):
imported: Optional[StrictBool] = None
__properties = ["uid", "innerId", "filename", "dateDue", "dateCreated", "status", "targetLang", "sourceLang", "project", "workflowStep", "importStatus", "imported"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -52,14 +53,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -72,7 +69,7 @@ def from_json(cls, json_str: str) -> AssignedJobDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -94,9 +91,9 @@ def from_dict(cls, obj: dict) -> AssignedJobDto:
return None
if not isinstance(obj, dict):
- return AssignedJobDto.parse_obj(obj)
+ return AssignedJobDto.model_validate(obj)
- _obj = AssignedJobDto.parse_obj({
+ _obj = AssignedJobDto.model_validate({
"uid": obj.get("uid"),
"inner_id": obj.get("innerId"),
"filename": obj.get("filename"),
diff --git a/phrasetms_client/models/assignment_per_target_lang_dto.py b/phrasetms_client/models/assignment_per_target_lang_dto.py
index 45fb77b0..6104844d 100644
--- a/phrasetms_client/models/assignment_per_target_lang_dto.py
+++ b/phrasetms_client/models/assignment_per_target_lang_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.provider_reference import ProviderReference
class AssignmentPerTargetLangDto(BaseModel):
@@ -27,17 +27,13 @@ class AssignmentPerTargetLangDto(BaseModel):
AssignmentPerTargetLangDto
"""
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
__properties = ["targetLang", "providers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AssignmentPerTargetLangDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> AssignmentPerTargetLangDto:
return None
if not isinstance(obj, dict):
- return AssignmentPerTargetLangDto.parse_obj(obj)
+ return AssignmentPerTargetLangDto.model_validate(obj)
- _obj = AssignmentPerTargetLangDto.parse_obj({
+ _obj = AssignmentPerTargetLangDto.model_validate({
"target_lang": obj.get("targetLang"),
"providers": [ProviderReference.from_dict(_item) for _item in obj.get("providers")] if obj.get("providers") is not None else None
})
diff --git a/phrasetms_client/models/async_analyse_list_response_dto.py b/phrasetms_client/models/async_analyse_list_response_dto.py
index 56c53596..66ea9f7b 100644
--- a/phrasetms_client/models/async_analyse_list_response_dto.py
+++ b/phrasetms_client/models/async_analyse_list_response_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.async_analyse_response_dto import AsyncAnalyseResponseDto
class AsyncAnalyseListResponseDto(BaseModel):
"""
AsyncAnalyseListResponseDto
"""
- analyses: Optional[conlist(AsyncAnalyseResponseDto)] = None
+ analyses: Optional[List[AsyncAnalyseResponseDto]] = None
__properties = ["analyses"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AsyncAnalyseListResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> AsyncAnalyseListResponseDto:
return None
if not isinstance(obj, dict):
- return AsyncAnalyseListResponseDto.parse_obj(obj)
+ return AsyncAnalyseListResponseDto.model_validate(obj)
- _obj = AsyncAnalyseListResponseDto.parse_obj({
+ _obj = AsyncAnalyseListResponseDto.model_validate({
"analyses": [AsyncAnalyseResponseDto.from_dict(_item) for _item in obj.get("analyses")] if obj.get("analyses") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/async_analyse_list_response_v2_dto.py b/phrasetms_client/models/async_analyse_list_response_v2_dto.py
index d4ed2e15..49ad899a 100644
--- a/phrasetms_client/models/async_analyse_list_response_v2_dto.py
+++ b/phrasetms_client/models/async_analyse_list_response_v2_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_analyse_response_v2_dto import AsyncAnalyseResponseV2Dto
class AsyncAnalyseListResponseV2Dto(BaseModel):
"""
AsyncAnalyseListResponseV2Dto
"""
- async_requests: Optional[conlist(AsyncAnalyseResponseV2Dto)] = Field(None, alias="asyncRequests")
+ async_requests: Optional[List[AsyncAnalyseResponseV2Dto]] = Field(None, alias="asyncRequests")
__properties = ["asyncRequests"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AsyncAnalyseListResponseV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> AsyncAnalyseListResponseV2Dto:
return None
if not isinstance(obj, dict):
- return AsyncAnalyseListResponseV2Dto.parse_obj(obj)
+ return AsyncAnalyseListResponseV2Dto.model_validate(obj)
- _obj = AsyncAnalyseListResponseV2Dto.parse_obj({
+ _obj = AsyncAnalyseListResponseV2Dto.model_validate({
"async_requests": [AsyncAnalyseResponseV2Dto.from_dict(_item) for _item in obj.get("asyncRequests")] if obj.get("asyncRequests") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/async_analyse_response_dto.py b/phrasetms_client/models/async_analyse_response_dto.py
index ce8df2da..64ad2267 100644
--- a/phrasetms_client/models/async_analyse_response_dto.py
+++ b/phrasetms_client/models/async_analyse_response_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_request_dto import AsyncRequestDto
class AsyncAnalyseResponseDto(BaseModel):
@@ -30,14 +30,10 @@ class AsyncAnalyseResponseDto(BaseModel):
analyse: Optional[Dict[str, Any]] = None
__properties = ["asyncRequest", "analyse"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AsyncAnalyseResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> AsyncAnalyseResponseDto:
return None
if not isinstance(obj, dict):
- return AsyncAnalyseResponseDto.parse_obj(obj)
+ return AsyncAnalyseResponseDto.model_validate(obj)
- _obj = AsyncAnalyseResponseDto.parse_obj({
+ _obj = AsyncAnalyseResponseDto.model_validate({
"async_request": AsyncRequestDto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None,
"analyse": obj.get("analyse")
})
diff --git a/phrasetms_client/models/async_analyse_response_v2_dto.py b/phrasetms_client/models/async_analyse_response_v2_dto.py
index e7c2168b..dbd2e2cf 100644
--- a/phrasetms_client/models/async_analyse_response_v2_dto.py
+++ b/phrasetms_client/models/async_analyse_response_v2_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_request_v2_dto import AsyncRequestV2Dto
class AsyncAnalyseResponseV2Dto(BaseModel):
@@ -30,14 +30,10 @@ class AsyncAnalyseResponseV2Dto(BaseModel):
analyse: Optional[Dict[str, Any]] = None
__properties = ["asyncRequest", "analyse"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> AsyncAnalyseResponseV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> AsyncAnalyseResponseV2Dto:
return None
if not isinstance(obj, dict):
- return AsyncAnalyseResponseV2Dto.parse_obj(obj)
+ return AsyncAnalyseResponseV2Dto.model_validate(obj)
- _obj = AsyncAnalyseResponseV2Dto.parse_obj({
+ _obj = AsyncAnalyseResponseV2Dto.model_validate({
"async_request": AsyncRequestV2Dto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None,
"analyse": obj.get("analyse")
})
diff --git a/phrasetms_client/models/async_export_tm_dto.py b/phrasetms_client/models/async_export_tm_dto.py
index 46942866..a5ba8b85 100644
--- a/phrasetms_client/models/async_export_tm_dto.py
+++ b/phrasetms_client/models/async_export_tm_dto.py
@@ -19,24 +19,20 @@
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class AsyncExportTMDto(BaseModel):
"""
AsyncExportTMDto
"""
trans_memory: Optional[Dict[str, Any]] = Field(None, alias="transMemory")
- export_target_langs: Optional[conlist(StrictStr)] = Field(None, alias="exportTargetLangs")
+ export_target_langs: Optional[List[StrictStr]] = Field(None, alias="exportTargetLangs")
__properties = ["transMemory", "exportTargetLangs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AsyncExportTMDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> AsyncExportTMDto:
return None
if not isinstance(obj, dict):
- return AsyncExportTMDto.parse_obj(obj)
+ return AsyncExportTMDto.model_validate(obj)
- _obj = AsyncExportTMDto.parse_obj({
+ _obj = AsyncExportTMDto.model_validate({
"trans_memory": obj.get("transMemory"),
"export_target_langs": obj.get("exportTargetLangs")
})
diff --git a/phrasetms_client/models/async_export_tm_response_dto.py b/phrasetms_client/models/async_export_tm_response_dto.py
index 84c540d2..c8a06f3c 100644
--- a/phrasetms_client/models/async_export_tm_response_dto.py
+++ b/phrasetms_client/models/async_export_tm_response_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_export_tm_dto import AsyncExportTMDto
from phrasetms_client.models.async_request_v2_dto import AsyncRequestV2Dto
@@ -31,14 +31,10 @@ class AsyncExportTMResponseDto(BaseModel):
async_export: Optional[AsyncExportTMDto] = Field(None, alias="asyncExport")
__properties = ["asyncRequest", "asyncExport"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> AsyncExportTMResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> AsyncExportTMResponseDto:
return None
if not isinstance(obj, dict):
- return AsyncExportTMResponseDto.parse_obj(obj)
+ return AsyncExportTMResponseDto.model_validate(obj)
- _obj = AsyncExportTMResponseDto.parse_obj({
+ _obj = AsyncExportTMResponseDto.model_validate({
"async_request": AsyncRequestV2Dto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None,
"async_export": AsyncExportTMDto.from_dict(obj.get("asyncExport")) if obj.get("asyncExport") is not None else None
})
diff --git a/phrasetms_client/models/async_export_tmby_query_dto.py b/phrasetms_client/models/async_export_tmby_query_dto.py
index 69891261..e4ff55cc 100644
--- a/phrasetms_client/models/async_export_tmby_query_dto.py
+++ b/phrasetms_client/models/async_export_tmby_query_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.query import Query
class AsyncExportTMByQueryDto(BaseModel):
@@ -28,18 +28,14 @@ class AsyncExportTMByQueryDto(BaseModel):
"""
async_request: Optional[Dict[str, Any]] = Field(None, alias="asyncRequest")
trans_memory: Optional[Dict[str, Any]] = Field(None, alias="transMemory")
- export_target_langs: Optional[conlist(StrictStr)] = Field(None, alias="exportTargetLangs")
- queries: Optional[conlist(Query)] = None
+ export_target_langs: Optional[List[StrictStr]] = Field(None, alias="exportTargetLangs")
+ queries: Optional[List[Query]] = None
__properties = ["asyncRequest", "transMemory", "exportTargetLangs", "queries"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> AsyncExportTMByQueryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> AsyncExportTMByQueryDto:
return None
if not isinstance(obj, dict):
- return AsyncExportTMByQueryDto.parse_obj(obj)
+ return AsyncExportTMByQueryDto.model_validate(obj)
- _obj = AsyncExportTMByQueryDto.parse_obj({
+ _obj = AsyncExportTMByQueryDto.model_validate({
"async_request": obj.get("asyncRequest"),
"trans_memory": obj.get("transMemory"),
"export_target_langs": obj.get("exportTargetLangs"),
diff --git a/phrasetms_client/models/async_export_tmby_query_response_dto.py b/phrasetms_client/models/async_export_tmby_query_response_dto.py
index 37d26144..59d82842 100644
--- a/phrasetms_client/models/async_export_tmby_query_response_dto.py
+++ b/phrasetms_client/models/async_export_tmby_query_response_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_export_tmby_query_dto import AsyncExportTMByQueryDto
from phrasetms_client.models.async_request_dto import AsyncRequestDto
@@ -31,14 +31,10 @@ class AsyncExportTMByQueryResponseDto(BaseModel):
async_export: Optional[AsyncExportTMByQueryDto] = Field(None, alias="asyncExport")
__properties = ["asyncRequest", "asyncExport"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> AsyncExportTMByQueryResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> AsyncExportTMByQueryResponseDto:
return None
if not isinstance(obj, dict):
- return AsyncExportTMByQueryResponseDto.parse_obj(obj)
+ return AsyncExportTMByQueryResponseDto.model_validate(obj)
- _obj = AsyncExportTMByQueryResponseDto.parse_obj({
+ _obj = AsyncExportTMByQueryResponseDto.model_validate({
"async_request": AsyncRequestDto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None,
"async_export": AsyncExportTMByQueryDto.from_dict(obj.get("asyncExport")) if obj.get("asyncExport") is not None else None
})
diff --git a/phrasetms_client/models/async_file_op_response_dto.py b/phrasetms_client/models/async_file_op_response_dto.py
index ae98b8f3..63f9c9bf 100644
--- a/phrasetms_client/models/async_file_op_response_dto.py
+++ b/phrasetms_client/models/async_file_op_response_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.user_reference import UserReference
class AsyncFileOpResponseDto(BaseModel):
@@ -33,7 +33,8 @@ class AsyncFileOpResponseDto(BaseModel):
action: Optional[StrictStr] = None
__properties = ["id", "createdBy", "dateCreated", "fileName", "action"]
- @validator('action')
+ @field_validator('action')
+ @classmethod
def action_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -43,14 +44,10 @@ def action_validate_enum(cls, value):
raise ValueError("must be one of enum values ('GUI_UPLOAD', 'GUI_DOWNLOAD', 'GUI_REIMPORT', 'GUI_REIMPORT_TARGET', 'CJ_UPLOAD', 'CJ_DOWNLOAD', 'APC_UPLOAD', 'APC_DOWNLOAD', 'API_UPLOAD', 'API_DOWNLOAD', 'SUBMITTER_PORTAL_DOWNLOAD')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +60,7 @@ def from_json(cls, json_str: str) -> AsyncFileOpResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +76,9 @@ def from_dict(cls, obj: dict) -> AsyncFileOpResponseDto:
return None
if not isinstance(obj, dict):
- return AsyncFileOpResponseDto.parse_obj(obj)
+ return AsyncFileOpResponseDto.model_validate(obj)
- _obj = AsyncFileOpResponseDto.parse_obj({
+ _obj = AsyncFileOpResponseDto.model_validate({
"id": obj.get("id"),
"created_by": UserReference.from_dict(obj.get("createdBy")) if obj.get("createdBy") is not None else None,
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/async_request_dto.py b/phrasetms_client/models/async_request_dto.py
index e3fcb0bd..c6ab0d51 100644
--- a/phrasetms_client/models/async_request_dto.py
+++ b/phrasetms_client/models/async_request_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.async_response_dto import AsyncResponseDto
from phrasetms_client.models.project_reference import ProjectReference
from phrasetms_client.models.user_reference import UserReference
@@ -37,7 +37,8 @@ class AsyncRequestDto(BaseModel):
project: Optional[ProjectReference] = None
__properties = ["id", "createdBy", "dateCreated", "action", "asyncResponse", "parent", "project"]
- @validator('action')
+ @field_validator('action')
+ @classmethod
def action_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -47,14 +48,10 @@ def action_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PRE_ANALYSE', 'POST_ANALYSE', 'COMPARE_ANALYSE', 'PARENT_ANALYSE', 'PRE_TRANSLATE', 'ASYNC_TRANSLATE', 'IMPORT_JOB', 'IMPORT_FILE', 'ALIGN', 'EXPORT_TMX_BY_QUERY', 'EXPORT_TMX', 'IMPORT_TMX', 'INSERT_INTO_TM', 'DELETE_TM', 'CLEAR_TM', 'QA', 'QA_V3', 'UPDATE_CONTINUOUS_JOB', 'UPDATE_SOURCE', 'UPDATE_TARGET', 'EXTRACT_CLEANED_TMS', 'GLOSSARY_PUT', 'GLOSSARY_DELETE', 'CREATE_PROJECT', 'EXPORT_COMPLETE_FILE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +64,7 @@ def from_json(cls, json_str: str) -> AsyncRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -92,9 +89,9 @@ def from_dict(cls, obj: dict) -> AsyncRequestDto:
return None
if not isinstance(obj, dict):
- return AsyncRequestDto.parse_obj(obj)
+ return AsyncRequestDto.model_validate(obj)
- _obj = AsyncRequestDto.parse_obj({
+ _obj = AsyncRequestDto.model_validate({
"id": obj.get("id"),
"created_by": UserReference.from_dict(obj.get("createdBy")) if obj.get("createdBy") is not None else None,
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/async_request_reference.py b/phrasetms_client/models/async_request_reference.py
index 106ff00f..7541c4e7 100644
--- a/phrasetms_client/models/async_request_reference.py
+++ b/phrasetms_client/models/async_request_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class AsyncRequestReference(BaseModel):
"""
@@ -30,7 +30,8 @@ class AsyncRequestReference(BaseModel):
action: Optional[StrictStr] = None
__properties = ["id", "dateCreated", "action"]
- @validator('action')
+ @field_validator('action')
+ @classmethod
def action_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -40,14 +41,10 @@ def action_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PRE_ANALYSE', 'POST_ANALYSE', 'COMPARE_ANALYSE', 'PARENT_ANALYSE', 'PRE_TRANSLATE', 'ASYNC_TRANSLATE', 'IMPORT_JOB', 'IMPORT_FILE', 'ALIGN', 'EXPORT_TMX_BY_QUERY', 'EXPORT_TMX', 'IMPORT_TMX', 'INSERT_INTO_TM', 'DELETE_TM', 'CLEAR_TM', 'QA', 'QA_V3', 'UPDATE_CONTINUOUS_JOB', 'UPDATE_SOURCE', 'UPDATE_TARGET', 'EXTRACT_CLEANED_TMS', 'GLOSSARY_PUT', 'GLOSSARY_DELETE', 'CREATE_PROJECT', 'EXPORT_COMPLETE_FILE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +57,7 @@ def from_json(cls, json_str: str) -> AsyncRequestReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -73,9 +70,9 @@ def from_dict(cls, obj: dict) -> AsyncRequestReference:
return None
if not isinstance(obj, dict):
- return AsyncRequestReference.parse_obj(obj)
+ return AsyncRequestReference.model_validate(obj)
- _obj = AsyncRequestReference.parse_obj({
+ _obj = AsyncRequestReference.model_validate({
"id": obj.get("id"),
"date_created": obj.get("dateCreated"),
"action": obj.get("action")
diff --git a/phrasetms_client/models/async_request_status_dto.py b/phrasetms_client/models/async_request_status_dto.py
index bd75af5d..7e5c075a 100644
--- a/phrasetms_client/models/async_request_status_dto.py
+++ b/phrasetms_client/models/async_request_status_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.concurrent_requests_dto import ConcurrentRequestsDto
class AsyncRequestStatusDto(BaseModel):
@@ -29,14 +29,10 @@ class AsyncRequestStatusDto(BaseModel):
concurrent_requests: Optional[ConcurrentRequestsDto] = Field(None, alias="concurrentRequests")
__properties = ["concurrentRequests"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AsyncRequestStatusDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> AsyncRequestStatusDto:
return None
if not isinstance(obj, dict):
- return AsyncRequestStatusDto.parse_obj(obj)
+ return AsyncRequestStatusDto.model_validate(obj)
- _obj = AsyncRequestStatusDto.parse_obj({
+ _obj = AsyncRequestStatusDto.model_validate({
"concurrent_requests": ConcurrentRequestsDto.from_dict(obj.get("concurrentRequests")) if obj.get("concurrentRequests") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/async_request_v2_dto.py b/phrasetms_client/models/async_request_v2_dto.py
index dba391e9..f747ded1 100644
--- a/phrasetms_client/models/async_request_v2_dto.py
+++ b/phrasetms_client/models/async_request_v2_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.async_response_v2_dto import AsyncResponseV2Dto
from phrasetms_client.models.project_reference import ProjectReference
from phrasetms_client.models.user_reference import UserReference
@@ -37,7 +37,8 @@ class AsyncRequestV2Dto(BaseModel):
project: Optional[ProjectReference] = None
__properties = ["id", "createdBy", "dateCreated", "action", "asyncResponse", "parent", "project"]
- @validator('action')
+ @field_validator('action')
+ @classmethod
def action_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -47,14 +48,10 @@ def action_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PRE_ANALYSE', 'POST_ANALYSE', 'COMPARE_ANALYSE', 'PARENT_ANALYSE', 'PRE_TRANSLATE', 'ASYNC_TRANSLATE', 'IMPORT_JOB', 'IMPORT_FILE', 'ALIGN', 'EXPORT_TMX_BY_QUERY', 'EXPORT_TMX', 'IMPORT_TMX', 'INSERT_INTO_TM', 'DELETE_TM', 'CLEAR_TM', 'QA', 'QA_V3', 'UPDATE_CONTINUOUS_JOB', 'UPDATE_SOURCE', 'UPDATE_TARGET', 'EXTRACT_CLEANED_TMS', 'GLOSSARY_PUT', 'GLOSSARY_DELETE', 'CREATE_PROJECT', 'EXPORT_COMPLETE_FILE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +64,7 @@ def from_json(cls, json_str: str) -> AsyncRequestV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -92,9 +89,9 @@ def from_dict(cls, obj: dict) -> AsyncRequestV2Dto:
return None
if not isinstance(obj, dict):
- return AsyncRequestV2Dto.parse_obj(obj)
+ return AsyncRequestV2Dto.model_validate(obj)
- _obj = AsyncRequestV2Dto.parse_obj({
+ _obj = AsyncRequestV2Dto.model_validate({
"id": obj.get("id"),
"created_by": UserReference.from_dict(obj.get("createdBy")) if obj.get("createdBy") is not None else None,
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/async_request_wrapper_dto.py b/phrasetms_client/models/async_request_wrapper_dto.py
index e4fb1336..6f40d827 100644
--- a/phrasetms_client/models/async_request_wrapper_dto.py
+++ b/phrasetms_client/models/async_request_wrapper_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_request_dto import AsyncRequestDto
class AsyncRequestWrapperDto(BaseModel):
@@ -29,14 +29,10 @@ class AsyncRequestWrapperDto(BaseModel):
async_request: Optional[AsyncRequestDto] = Field(None, alias="asyncRequest")
__properties = ["asyncRequest"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AsyncRequestWrapperDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> AsyncRequestWrapperDto:
return None
if not isinstance(obj, dict):
- return AsyncRequestWrapperDto.parse_obj(obj)
+ return AsyncRequestWrapperDto.model_validate(obj)
- _obj = AsyncRequestWrapperDto.parse_obj({
+ _obj = AsyncRequestWrapperDto.model_validate({
"async_request": AsyncRequestDto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/async_request_wrapper_v2_dto.py b/phrasetms_client/models/async_request_wrapper_v2_dto.py
index 27ba4672..25c8ac00 100644
--- a/phrasetms_client/models/async_request_wrapper_v2_dto.py
+++ b/phrasetms_client/models/async_request_wrapper_v2_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_request_v2_dto import AsyncRequestV2Dto
class AsyncRequestWrapperV2Dto(BaseModel):
@@ -29,14 +29,10 @@ class AsyncRequestWrapperV2Dto(BaseModel):
async_request: Optional[AsyncRequestV2Dto] = Field(None, alias="asyncRequest")
__properties = ["asyncRequest"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> AsyncRequestWrapperV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> AsyncRequestWrapperV2Dto:
return None
if not isinstance(obj, dict):
- return AsyncRequestWrapperV2Dto.parse_obj(obj)
+ return AsyncRequestWrapperV2Dto.model_validate(obj)
- _obj = AsyncRequestWrapperV2Dto.parse_obj({
+ _obj = AsyncRequestWrapperV2Dto.model_validate({
"async_request": AsyncRequestV2Dto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/async_response_dto.py b/phrasetms_client/models/async_response_dto.py
index 5f38f572..7d4a56cf 100644
--- a/phrasetms_client/models/async_response_dto.py
+++ b/phrasetms_client/models/async_response_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.error_detail_dto import ErrorDetailDto
class AsyncResponseDto(BaseModel):
@@ -29,19 +29,15 @@ class AsyncResponseDto(BaseModel):
date_created: Optional[datetime] = Field(None, alias="dateCreated")
error_code: Optional[StrictStr] = Field(None, alias="errorCode")
error_desc: Optional[StrictStr] = Field(None, alias="errorDesc")
- error_details: Optional[conlist(ErrorDetailDto)] = Field(None, alias="errorDetails")
- warnings: Optional[conlist(ErrorDetailDto)] = None
+ error_details: Optional[List[ErrorDetailDto]] = Field(None, alias="errorDetails")
+ warnings: Optional[List[ErrorDetailDto]] = None
accepted_segments_count: Optional[StrictInt] = Field(None, alias="acceptedSegmentsCount")
__properties = ["dateCreated", "errorCode", "errorDesc", "errorDetails", "warnings", "acceptedSegmentsCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> AsyncResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +77,9 @@ def from_dict(cls, obj: dict) -> AsyncResponseDto:
return None
if not isinstance(obj, dict):
- return AsyncResponseDto.parse_obj(obj)
+ return AsyncResponseDto.model_validate(obj)
- _obj = AsyncResponseDto.parse_obj({
+ _obj = AsyncResponseDto.model_validate({
"date_created": obj.get("dateCreated"),
"error_code": obj.get("errorCode"),
"error_desc": obj.get("errorDesc"),
diff --git a/phrasetms_client/models/async_response_v2_dto.py b/phrasetms_client/models/async_response_v2_dto.py
index 9eee374b..35addd6f 100644
--- a/phrasetms_client/models/async_response_v2_dto.py
+++ b/phrasetms_client/models/async_response_v2_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.error_detail_dto_v2 import ErrorDetailDtoV2
class AsyncResponseV2Dto(BaseModel):
@@ -29,18 +29,14 @@ class AsyncResponseV2Dto(BaseModel):
date_created: Optional[datetime] = Field(None, alias="dateCreated")
error_code: Optional[StrictStr] = Field(None, alias="errorCode")
error_desc: Optional[StrictStr] = Field(None, alias="errorDesc")
- error_details: Optional[conlist(ErrorDetailDtoV2)] = Field(None, alias="errorDetails")
- warnings: Optional[conlist(ErrorDetailDtoV2)] = None
+ error_details: Optional[List[ErrorDetailDtoV2]] = Field(None, alias="errorDetails")
+ warnings: Optional[List[ErrorDetailDtoV2]] = None
__properties = ["dateCreated", "errorCode", "errorDesc", "errorDetails", "warnings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> AsyncResponseV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +76,9 @@ def from_dict(cls, obj: dict) -> AsyncResponseV2Dto:
return None
if not isinstance(obj, dict):
- return AsyncResponseV2Dto.parse_obj(obj)
+ return AsyncResponseV2Dto.model_validate(obj)
- _obj = AsyncResponseV2Dto.parse_obj({
+ _obj = AsyncResponseV2Dto.model_validate({
"date_created": obj.get("dateCreated"),
"error_code": obj.get("errorCode"),
"error_desc": obj.get("errorDesc"),
diff --git a/phrasetms_client/models/attribute.py b/phrasetms_client/models/attribute.py
index 509e7e41..707cda5d 100644
--- a/phrasetms_client/models/attribute.py
+++ b/phrasetms_client/models/attribute.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class Attribute(BaseModel):
"""
@@ -27,7 +27,7 @@ class Attribute(BaseModel):
"""
name: Optional[StrictStr] = None
type: Optional[StrictStr] = None
- sub_attributes: Optional[conlist(Attribute)] = Field(None, alias="subAttributes")
+ sub_attributes: Optional[List[Attribute]] = Field(None, alias="subAttributes")
multi_valued: Optional[StrictBool] = Field(None, alias="multiValued")
description: Optional[StrictStr] = None
required: Optional[StrictBool] = None
@@ -37,7 +37,8 @@ class Attribute(BaseModel):
uniqueness: Optional[StrictStr] = None
__properties = ["name", "type", "subAttributes", "multiValued", "description", "required", "caseExact", "mutability", "returned", "uniqueness"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -47,7 +48,8 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('STRING', 'BOOLEAN', 'DECIMAL', 'INTEGER', 'DATE_TIME', 'BINARY', 'REFERENCE', 'COMPLEX')")
return value
- @validator('mutability')
+ @field_validator('mutability')
+ @classmethod
def mutability_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -57,7 +59,8 @@ def mutability_validate_enum(cls, value):
raise ValueError("must be one of enum values ('READ_ONLY', 'READ_WRITE', 'IMMUTABLE', 'WRITE_ONLY')")
return value
- @validator('returned')
+ @field_validator('returned')
+ @classmethod
def returned_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -67,7 +70,8 @@ def returned_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ALWAYS', 'NEVER', 'DEFAULT', 'REQUEST')")
return value
- @validator('uniqueness')
+ @field_validator('uniqueness')
+ @classmethod
def uniqueness_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -77,14 +81,10 @@ def uniqueness_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NONE', 'SERVER', 'GLOBAL')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -97,7 +97,7 @@ def from_json(cls, json_str: str) -> Attribute:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -117,9 +117,9 @@ def from_dict(cls, obj: dict) -> Attribute:
return None
if not isinstance(obj, dict):
- return Attribute.parse_obj(obj)
+ return Attribute.model_validate(obj)
- _obj = Attribute.parse_obj({
+ _obj = Attribute.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"sub_attributes": [Attribute.from_dict(_item) for _item in obj.get("subAttributes")] if obj.get("subAttributes") is not None else None,
diff --git a/phrasetms_client/models/auth_schema.py b/phrasetms_client/models/auth_schema.py
index cbb7dad8..f5a13ea9 100644
--- a/phrasetms_client/models/auth_schema.py
+++ b/phrasetms_client/models/auth_schema.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class AuthSchema(BaseModel):
"""
@@ -32,14 +32,10 @@ class AuthSchema(BaseModel):
primary: Optional[StrictBool] = None
__properties = ["type", "name", "description", "specUrl", "primary"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> AuthSchema:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> AuthSchema:
return None
if not isinstance(obj, dict):
- return AuthSchema.parse_obj(obj)
+ return AuthSchema.model_validate(obj)
- _obj = AuthSchema.parse_obj({
+ _obj = AuthSchema.model_validate({
"type": obj.get("type"),
"name": obj.get("name"),
"description": obj.get("description"),
diff --git a/phrasetms_client/models/automated_project_settings_dto.py b/phrasetms_client/models/automated_project_settings_dto.py
index 6914f871..2b837beb 100644
--- a/phrasetms_client/models/automated_project_settings_dto.py
+++ b/phrasetms_client/models/automated_project_settings_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.name_dto import NameDto
class AutomatedProjectSettingsDto(BaseModel):
@@ -31,19 +31,15 @@ class AutomatedProjectSettingsDto(BaseModel):
organization: Optional[NameDto] = None
active: Optional[StrictBool] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr, unique_items=True)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
connector: Optional[NameDto] = None
remote_folder: Optional[StrictStr] = Field(None, alias="remoteFolder")
__properties = ["id", "name", "organization", "active", "sourceLang", "targetLangs", "connector", "remoteFolder"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> AutomatedProjectSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> AutomatedProjectSettingsDto:
return None
if not isinstance(obj, dict):
- return AutomatedProjectSettingsDto.parse_obj(obj)
+ return AutomatedProjectSettingsDto.model_validate(obj)
- _obj = AutomatedProjectSettingsDto.parse_obj({
+ _obj = AutomatedProjectSettingsDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"organization": NameDto.from_dict(obj.get("organization")) if obj.get("organization") is not None else None,
diff --git a/phrasetms_client/models/background_tasks_tb_dto.py b/phrasetms_client/models/background_tasks_tb_dto.py
index a7ed6f3c..50f621a2 100644
--- a/phrasetms_client/models/background_tasks_tb_dto.py
+++ b/phrasetms_client/models/background_tasks_tb_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.async_request_dto import AsyncRequestDto
from phrasetms_client.models.metadata_response import MetadataResponse
@@ -37,14 +37,10 @@ class BackgroundTasksTbDto(BaseModel):
last_task_error_html: Optional[StrictStr] = Field(None, alias="lastTaskErrorHtml")
__properties = ["status", "finishedDataText", "asyncRequest", "lastTaskString", "metadata", "lastTaskOk", "lastTaskError", "lastTaskErrorHtml"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> BackgroundTasksTbDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> BackgroundTasksTbDto:
return None
if not isinstance(obj, dict):
- return BackgroundTasksTbDto.parse_obj(obj)
+ return BackgroundTasksTbDto.model_validate(obj)
- _obj = BackgroundTasksTbDto.parse_obj({
+ _obj = BackgroundTasksTbDto.model_validate({
"status": obj.get("status"),
"finished_data_text": obj.get("finishedDataText"),
"async_request": AsyncRequestDto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None,
diff --git a/phrasetms_client/models/background_tasks_tm_dto.py b/phrasetms_client/models/background_tasks_tm_dto.py
index a4da5cb9..7eea37ba 100644
--- a/phrasetms_client/models/background_tasks_tm_dto.py
+++ b/phrasetms_client/models/background_tasks_tm_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.async_request_dto import AsyncRequestDto
from phrasetms_client.models.metadata_response import MetadataResponse
@@ -37,14 +37,10 @@ class BackgroundTasksTmDto(BaseModel):
last_task_error_html: Optional[StrictStr] = Field(None, alias="lastTaskErrorHtml")
__properties = ["status", "finishedDataText", "asyncRequest", "lastTaskString", "metadata", "lastTaskOk", "lastTaskError", "lastTaskErrorHtml"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> BackgroundTasksTmDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> BackgroundTasksTmDto:
return None
if not isinstance(obj, dict):
- return BackgroundTasksTmDto.parse_obj(obj)
+ return BackgroundTasksTmDto.model_validate(obj)
- _obj = BackgroundTasksTmDto.parse_obj({
+ _obj = BackgroundTasksTmDto.model_validate({
"status": obj.get("status"),
"finished_data_text": obj.get("finishedDataText"),
"async_request": AsyncRequestDto.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None,
diff --git a/phrasetms_client/models/bitbucket_server.py b/phrasetms_client/models/bitbucket_server.py
index 2b1b1366..f9377909 100644
--- a/phrasetms_client/models/bitbucket_server.py
+++ b/phrasetms_client/models/bitbucket_server.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class BitbucketServer(AbstractConnectorDto):
@@ -31,14 +31,10 @@ class BitbucketServer(AbstractConnectorDto):
token: StrictStr = Field(...)
__properties = ["name", "type", "host", "commitMessage", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> BitbucketServer:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> BitbucketServer:
return None
if not isinstance(obj, dict):
- return BitbucketServer.parse_obj(obj)
+ return BitbucketServer.model_validate(obj)
- _obj = BitbucketServer.parse_obj({
+ _obj = BitbucketServer.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/bitbucket_server_all_of.py b/phrasetms_client/models/bitbucket_server_all_of.py
index 9b1a9ce8..7ebdf989 100644
--- a/phrasetms_client/models/bitbucket_server_all_of.py
+++ b/phrasetms_client/models/bitbucket_server_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class BitbucketServerAllOf(BaseModel):
"""
@@ -30,14 +30,10 @@ class BitbucketServerAllOf(BaseModel):
token: StrictStr = Field(...)
__properties = ["host", "commitMessage", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> BitbucketServerAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> BitbucketServerAllOf:
return None
if not isinstance(obj, dict):
- return BitbucketServerAllOf.parse_obj(obj)
+ return BitbucketServerAllOf.model_validate(obj)
- _obj = BitbucketServerAllOf.parse_obj({
+ _obj = BitbucketServerAllOf.model_validate({
"host": obj.get("host"),
"commit_message": obj.get("commitMessage"),
"token": obj.get("token")
diff --git a/phrasetms_client/models/browse_request_dto.py b/phrasetms_client/models/browse_request_dto.py
index 851b681a..9f25971f 100644
--- a/phrasetms_client/models/browse_request_dto.py
+++ b/phrasetms_client/models/browse_request_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class BrowseRequestDto(BaseModel):
"""
@@ -29,17 +30,13 @@ class BrowseRequestDto(BaseModel):
query: Optional[StrictStr] = None
status: Optional[StrictStr] = None
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
- page_size: Optional[conint(strict=True, le=50, ge=1)] = Field(None, alias="pageSize")
+ page_size: Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = Field(None, alias="pageSize")
__properties = ["queryLang", "query", "status", "pageNumber", "pageSize"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +49,7 @@ def from_json(cls, json_str: str) -> BrowseRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +62,9 @@ def from_dict(cls, obj: dict) -> BrowseRequestDto:
return None
if not isinstance(obj, dict):
- return BrowseRequestDto.parse_obj(obj)
+ return BrowseRequestDto.model_validate(obj)
- _obj = BrowseRequestDto.parse_obj({
+ _obj = BrowseRequestDto.model_validate({
"query_lang": obj.get("queryLang"),
"query": obj.get("query"),
"status": obj.get("status"),
diff --git a/phrasetms_client/models/browse_response_list_dto.py b/phrasetms_client/models/browse_response_list_dto.py
index 651b5b31..5e4d506a 100644
--- a/phrasetms_client/models/browse_response_list_dto.py
+++ b/phrasetms_client/models/browse_response_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.concept_dto import ConceptDto
class BrowseResponseListDto(BaseModel):
"""
BrowseResponseListDto
"""
- search_results: Optional[conlist(ConceptDto)] = Field(None, alias="searchResults")
+ search_results: Optional[List[ConceptDto]] = Field(None, alias="searchResults")
__properties = ["searchResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> BrowseResponseListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> BrowseResponseListDto:
return None
if not isinstance(obj, dict):
- return BrowseResponseListDto.parse_obj(obj)
+ return BrowseResponseListDto.model_validate(obj)
- _obj = BrowseResponseListDto.parse_obj({
+ _obj = BrowseResponseListDto.model_validate({
"search_results": [ConceptDto.from_dict(_item) for _item in obj.get("searchResults")] if obj.get("searchResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/bulk_delete_analyse_dto.py b/phrasetms_client/models/bulk_delete_analyse_dto.py
index 8567a9cb..77e63cd6 100644
--- a/phrasetms_client/models/bulk_delete_analyse_dto.py
+++ b/phrasetms_client/models/bulk_delete_analyse_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.id_reference import IdReference
class BulkDeleteAnalyseDto(BaseModel):
"""
BulkDeleteAnalyseDto
"""
- analyses: conlist(IdReference, max_items=100, min_items=1) = Field(...)
+ analyses: List[IdReference] = Field(...)
purge: Optional[StrictBool] = Field(None, description="Default: false")
__properties = ["analyses", "purge"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> BulkDeleteAnalyseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> BulkDeleteAnalyseDto:
return None
if not isinstance(obj, dict):
- return BulkDeleteAnalyseDto.parse_obj(obj)
+ return BulkDeleteAnalyseDto.model_validate(obj)
- _obj = BulkDeleteAnalyseDto.parse_obj({
+ _obj = BulkDeleteAnalyseDto.model_validate({
"analyses": [IdReference.from_dict(_item) for _item in obj.get("analyses")] if obj.get("analyses") is not None else None,
"purge": obj.get("purge")
})
diff --git a/phrasetms_client/models/bulk_edit_analyse_v2_dto.py b/phrasetms_client/models/bulk_edit_analyse_v2_dto.py
index d411ec87..3bf2ac87 100644
--- a/phrasetms_client/models/bulk_edit_analyse_v2_dto.py
+++ b/phrasetms_client/models/bulk_edit_analyse_v2_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.uid_reference import UidReference
@@ -28,20 +29,16 @@ class BulkEditAnalyseV2Dto(BaseModel):
"""
BulkEditAnalyseV2Dto
"""
- analyses: conlist(IdReference, max_items=100, min_items=1) = Field(...)
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ analyses: List[IdReference] = Field(...)
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
provider: Optional[ProviderReference] = None
net_rate_scheme: Optional[UidReference] = Field(None, alias="netRateScheme")
__properties = ["analyses", "name", "provider", "netRateScheme"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +51,7 @@ def from_json(cls, json_str: str) -> BulkEditAnalyseV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +77,9 @@ def from_dict(cls, obj: dict) -> BulkEditAnalyseV2Dto:
return None
if not isinstance(obj, dict):
- return BulkEditAnalyseV2Dto.parse_obj(obj)
+ return BulkEditAnalyseV2Dto.model_validate(obj)
- _obj = BulkEditAnalyseV2Dto.parse_obj({
+ _obj = BulkEditAnalyseV2Dto.model_validate({
"analyses": [IdReference.from_dict(_item) for _item in obj.get("analyses")] if obj.get("analyses") is not None else None,
"name": obj.get("name"),
"provider": ProviderReference.from_dict(obj.get("provider")) if obj.get("provider") is not None else None,
diff --git a/phrasetms_client/models/business_unit_dto.py b/phrasetms_client/models/business_unit_dto.py
index 3750ade6..8e62e69f 100644
--- a/phrasetms_client/models/business_unit_dto.py
+++ b/phrasetms_client/models/business_unit_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class BusinessUnitDto(BaseModel):
@@ -32,14 +32,10 @@ class BusinessUnitDto(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> BusinessUnitDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> BusinessUnitDto:
return None
if not isinstance(obj, dict):
- return BusinessUnitDto.parse_obj(obj)
+ return BusinessUnitDto.model_validate(obj)
- _obj = BusinessUnitDto.parse_obj({
+ _obj = BusinessUnitDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/business_unit_edit_dto.py b/phrasetms_client/models/business_unit_edit_dto.py
index 377e61cc..ded538e4 100644
--- a/phrasetms_client/models/business_unit_edit_dto.py
+++ b/phrasetms_client/models/business_unit_edit_dto.py
@@ -13,29 +13,26 @@
from __future__ import annotations
+from typing_extensions import Annotated
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
class BusinessUnitEditDto(BaseModel):
"""
BusinessUnitEditDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
__properties = ["name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +45,7 @@ def from_json(cls, json_str: str) -> BusinessUnitEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +58,9 @@ def from_dict(cls, obj: dict) -> BusinessUnitEditDto:
return None
if not isinstance(obj, dict):
- return BusinessUnitEditDto.parse_obj(obj)
+ return BusinessUnitEditDto.model_validate(obj)
- _obj = BusinessUnitEditDto.parse_obj({
+ _obj = BusinessUnitEditDto.model_validate({
"name": obj.get("name")
})
return _obj
diff --git a/phrasetms_client/models/business_unit_reference.py b/phrasetms_client/models/business_unit_reference.py
index e9b84edb..017f04b1 100644
--- a/phrasetms_client/models/business_unit_reference.py
+++ b/phrasetms_client/models/business_unit_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class BusinessUnitReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class BusinessUnitReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["name", "id", "uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> BusinessUnitReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> BusinessUnitReference:
return None
if not isinstance(obj, dict):
- return BusinessUnitReference.parse_obj(obj)
+ return BusinessUnitReference.model_validate(obj)
- _obj = BusinessUnitReference.parse_obj({
+ _obj = BusinessUnitReference.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"uid": obj.get("uid")
diff --git a/phrasetms_client/models/buyer.py b/phrasetms_client/models/buyer.py
index d15f0232..106f84eb 100644
--- a/phrasetms_client/models/buyer.py
+++ b/phrasetms_client/models/buyer.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.abstract_project_dto import AbstractProjectDto
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
@@ -56,7 +56,7 @@ class Buyer(AbstractProjectDto):
quality_assurance_settings: Optional[Dict[str, Any]] = Field(
None, alias="qualityAssuranceSettings"
)
- workflow_steps: Optional[conlist(ProjectWorkflowStepDto)] = Field(
+ workflow_steps: Optional[List[ProjectWorkflowStepDto]] = Field(
None, alias="workflowSteps"
)
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
@@ -102,7 +102,8 @@ class Buyer(AbstractProjectDto):
"vendor",
]
- @validator("status")
+ @field_validator("status")
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -122,15 +123,10 @@ def status_validate_enum(cls, value):
)
return value
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -143,7 +139,7 @@ def from_json(cls, json_str: str) -> Buyer:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of domain
if self.domain:
_dict["domain"] = self.domain.to_dict()
@@ -204,9 +200,9 @@ def from_dict(cls, obj: dict) -> Buyer:
return None
if not isinstance(obj, dict):
- return Buyer.parse_obj(obj)
+ return Buyer.model_validate(obj)
- _obj = Buyer.parse_obj(
+ _obj = Buyer.model_validate(
{
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/buyer_all_of.py b/phrasetms_client/models/buyer_all_of.py
index 8da50e95..ec79b076 100644
--- a/phrasetms_client/models/buyer_all_of.py
+++ b/phrasetms_client/models/buyer_all_of.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.cost_center_reference import CostCenterReference
@@ -51,7 +51,7 @@ class BuyerAllOf(BaseModel):
quality_assurance_settings: Optional[Dict[str, Any]] = Field(
None, alias="qualityAssuranceSettings"
)
- workflow_steps: Optional[conlist(ProjectWorkflowStepDto)] = Field(
+ workflow_steps: Optional[List[ProjectWorkflowStepDto]] = Field(
None, alias="workflowSteps"
)
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
@@ -84,7 +84,8 @@ class BuyerAllOf(BaseModel):
"vendor",
]
- @validator("status")
+ @field_validator("status")
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -104,15 +105,10 @@ def status_validate_enum(cls, value):
)
return value
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -125,7 +121,7 @@ def from_json(cls, json_str: str) -> BuyerAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of progress
if self.progress:
_dict["progress"] = self.progress.to_dict()
@@ -163,9 +159,9 @@ def from_dict(cls, obj: dict) -> BuyerAllOf:
return None
if not isinstance(obj, dict):
- return BuyerAllOf.parse_obj(obj)
+ return BuyerAllOf.model_validate(obj)
- _obj = BuyerAllOf.parse_obj(
+ _obj = BuyerAllOf.model_validate(
{
"shared": obj.get("shared"),
"progress": ProgressDto.from_dict(obj.get("progress"))
diff --git a/phrasetms_client/models/buyer_reference.py b/phrasetms_client/models/buyer_reference.py
index f34e68d4..749b2479 100644
--- a/phrasetms_client/models/buyer_reference.py
+++ b/phrasetms_client/models/buyer_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class BuyerReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class BuyerReference(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "uid", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> BuyerReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> BuyerReference:
return None
if not isinstance(obj, dict):
- return BuyerReference.parse_obj(obj)
+ return BuyerReference.model_validate(obj)
- _obj = BuyerReference.parse_obj({
+ _obj = BuyerReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name")
diff --git a/phrasetms_client/models/check_response.py b/phrasetms_client/models/check_response.py
index 60d54b58..6c6bae6b 100644
--- a/phrasetms_client/models/check_response.py
+++ b/phrasetms_client/models/check_response.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.misspelled_word import MisspelledWord
class CheckResponse(BaseModel):
@@ -27,17 +27,13 @@ class CheckResponse(BaseModel):
CheckResponse
"""
text: Optional[StrictStr] = None
- misspelled_words: Optional[conlist(MisspelledWord)] = Field(None, alias="misspelledWords")
+ misspelled_words: Optional[List[MisspelledWord]] = Field(None, alias="misspelledWords")
__properties = ["text", "misspelledWords"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> CheckResponse:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> CheckResponse:
return None
if not isinstance(obj, dict):
- return CheckResponse.parse_obj(obj)
+ return CheckResponse.model_validate(obj)
- _obj = CheckResponse.parse_obj({
+ _obj = CheckResponse.model_validate({
"text": obj.get("text"),
"misspelled_words": [MisspelledWord.from_dict(_item) for _item in obj.get("misspelledWords")] if obj.get("misspelledWords") is not None else None
})
diff --git a/phrasetms_client/models/cleaned_trans_memories_dto.py b/phrasetms_client/models/cleaned_trans_memories_dto.py
index 34f48b15..99dee04c 100644
--- a/phrasetms_client/models/cleaned_trans_memories_dto.py
+++ b/phrasetms_client/models/cleaned_trans_memories_dto.py
@@ -18,20 +18,22 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictStr, confloat, conint, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class CleanedTransMemoriesDto(BaseModel):
"""
CleanedTransMemoriesDto
"""
- uids: conlist(StrictStr) = Field(...)
+ uids: List[StrictStr] = Field(...)
output_format: Optional[StrictStr] = Field(None, alias="outputFormat")
- preserve_ratio: Optional[Union[confloat(le=1, gt=0, strict=True), conint(le=1, gt=0, strict=True)]] = Field(None, alias="preserveRatio")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ preserve_ratio: Optional[Union[Annotated[float, Field(le=1, gt=0, strict=True)], Annotated[int, Field(le=1, gt=0, strict=True)]]] = Field(None, alias="preserveRatio")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
__properties = ["uids", "outputFormat", "preserveRatio", "targetLangs"]
- @validator('output_format')
+ @field_validator('output_format')
+ @classmethod
def output_format_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -41,14 +43,10 @@ def output_format_validate_enum(cls, value):
raise ValueError("must be one of enum values ('TXT', 'TSV')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +59,7 @@ def from_json(cls, json_str: str) -> CleanedTransMemoriesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +72,9 @@ def from_dict(cls, obj: dict) -> CleanedTransMemoriesDto:
return None
if not isinstance(obj, dict):
- return CleanedTransMemoriesDto.parse_obj(obj)
+ return CleanedTransMemoriesDto.model_validate(obj)
- _obj = CleanedTransMemoriesDto.parse_obj({
+ _obj = CleanedTransMemoriesDto.model_validate({
"uids": obj.get("uids"),
"output_format": obj.get("outputFormat"),
"preserve_ratio": obj.get("preserveRatio"),
diff --git a/phrasetms_client/models/client_dto.py b/phrasetms_client/models/client_dto.py
index 8095319e..bc9c9847 100644
--- a/phrasetms_client/models/client_dto.py
+++ b/phrasetms_client/models/client_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.net_rate_scheme_reference import NetRateSchemeReference
from phrasetms_client.models.price_list_reference import PriceListReference
from phrasetms_client.models.user_reference import UserReference
@@ -39,14 +39,10 @@ class ClientDto(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "externalId", "note", "displayNoteInProject", "priceList", "netRateScheme", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +55,7 @@ def from_json(cls, json_str: str) -> ClientDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +77,9 @@ def from_dict(cls, obj: dict) -> ClientDto:
return None
if not isinstance(obj, dict):
- return ClientDto.parse_obj(obj)
+ return ClientDto.model_validate(obj)
- _obj = ClientDto.parse_obj({
+ _obj = ClientDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/client_edit_dto.py b/phrasetms_client/models/client_edit_dto.py
index c4c942b5..62a1e47a 100644
--- a/phrasetms_client/models/client_edit_dto.py
+++ b/phrasetms_client/models/client_edit_dto.py
@@ -18,30 +18,27 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StringConstraints
from phrasetms_client.models.id_reference import IdReference
class ClientEditDto(BaseModel):
"""
ClientEditDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
- external_id: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="externalId")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ external_id: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="externalId")
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
display_note_in_project: Optional[StrictBool] = Field(None, alias="displayNoteInProject", description="Default: false")
price_list: Optional[IdReference] = Field(None, alias="priceList")
net_rate_scheme: Optional[IdReference] = Field(None, alias="netRateScheme")
__properties = ["name", "externalId", "note", "displayNoteInProject", "priceList", "netRateScheme"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +51,7 @@ def from_json(cls, json_str: str) -> ClientEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -73,9 +70,9 @@ def from_dict(cls, obj: dict) -> ClientEditDto:
return None
if not isinstance(obj, dict):
- return ClientEditDto.parse_obj(obj)
+ return ClientEditDto.model_validate(obj)
- _obj = ClientEditDto.parse_obj({
+ _obj = ClientEditDto.model_validate({
"name": obj.get("name"),
"external_id": obj.get("externalId"),
"note": obj.get("note"),
diff --git a/phrasetms_client/models/client_reference.py b/phrasetms_client/models/client_reference.py
index 589eb7e2..4bf85bf4 100644
--- a/phrasetms_client/models/client_reference.py
+++ b/phrasetms_client/models/client_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class ClientReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class ClientReference(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "uid", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ClientReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ClientReference:
return None
if not isinstance(obj, dict):
- return ClientReference.parse_obj(obj)
+ return ClientReference.model_validate(obj)
- _obj = ClientReference.parse_obj({
+ _obj = ClientReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name")
diff --git a/phrasetms_client/models/clone_project_dto.py b/phrasetms_client/models/clone_project_dto.py
index e99ec862..cd37904b 100644
--- a/phrasetms_client/models/clone_project_dto.py
+++ b/phrasetms_client/models/clone_project_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class CloneProjectDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class CloneProjectDto(BaseModel):
name: StrictStr = Field(...)
__properties = ["name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> CloneProjectDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> CloneProjectDto:
return None
if not isinstance(obj, dict):
- return CloneProjectDto.parse_obj(obj)
+ return CloneProjectDto.model_validate(obj)
- _obj = CloneProjectDto.parse_obj({
+ _obj = CloneProjectDto.model_validate({
"name": obj.get("name")
})
return _obj
diff --git a/phrasetms_client/models/comment_dto.py b/phrasetms_client/models/comment_dto.py
index 405f63e1..31fad5db 100644
--- a/phrasetms_client/models/comment_dto.py
+++ b/phrasetms_client/models/comment_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.mention_dto import MentionDto
from phrasetms_client.models.mentionable_user_dto import MentionableUserDto
@@ -32,17 +32,13 @@ class CommentDto(BaseModel):
created_by: Optional[MentionableUserDto] = Field(None, alias="createdBy")
date_created: Optional[datetime] = Field(None, alias="dateCreated")
date_modified: Optional[datetime] = Field(None, alias="dateModified")
- mentions: Optional[conlist(MentionDto)] = None
+ mentions: Optional[List[MentionDto]] = None
__properties = ["id", "text", "createdBy", "dateCreated", "dateModified", "mentions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> CommentDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +74,9 @@ def from_dict(cls, obj: dict) -> CommentDto:
return None
if not isinstance(obj, dict):
- return CommentDto.parse_obj(obj)
+ return CommentDto.model_validate(obj)
- _obj = CommentDto.parse_obj({
+ _obj = CommentDto.model_validate({
"id": obj.get("id"),
"text": obj.get("text"),
"created_by": MentionableUserDto.from_dict(obj.get("createdBy")) if obj.get("createdBy") is not None else None,
diff --git a/phrasetms_client/models/common_conversation_dto.py b/phrasetms_client/models/common_conversation_dto.py
index ea1f74b2..0943319e 100644
--- a/phrasetms_client/models/common_conversation_dto.py
+++ b/phrasetms_client/models/common_conversation_dto.py
@@ -20,7 +20,7 @@
from datetime import datetime
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.comment_dto import CommentDto
from phrasetms_client.models.mentionable_user_dto import MentionableUserDto
from phrasetms_client.models.status_dto import StatusDto
@@ -35,16 +35,12 @@ class CommonConversationDto(BaseModel):
date_modified: Optional[datetime] = Field(None, alias="dateModified")
date_edited: Optional[datetime] = Field(None, alias="dateEdited")
created_by: Optional[MentionableUserDto] = Field(None, alias="createdBy")
- comments: Optional[conlist(CommentDto)] = None
+ comments: Optional[List[CommentDto]] = None
status: Optional[StatusDto] = None
deleted: Optional[StrictBool] = None
__properties = ["id", "type", "dateCreated", "dateModified", "dateEdited", "createdBy", "comments", "status", "deleted"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'type'
@@ -65,7 +61,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -78,7 +74,7 @@ def from_json(cls, json_str: str) -> Union(LQA, SEGMENTTARGET): # noqa: F821
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/compared_segment_dto.py b/phrasetms_client/models/compared_segment_dto.py
index 6c566052..07df42c6 100644
--- a/phrasetms_client/models/compared_segment_dto.py
+++ b/phrasetms_client/models/compared_segment_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr, validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
class ComparedSegmentDto(BaseModel):
"""
@@ -29,7 +29,8 @@ class ComparedSegmentDto(BaseModel):
state: Optional[StrictStr] = None
__properties = ["uid", "state"]
- @validator('state')
+ @field_validator('state')
+ @classmethod
def state_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -39,14 +40,10 @@ def state_validate_enum(cls, value):
raise ValueError("must be one of enum values ('Miss', 'Diff')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> ComparedSegmentDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +69,9 @@ def from_dict(cls, obj: dict) -> ComparedSegmentDto:
return None
if not isinstance(obj, dict):
- return ComparedSegmentDto.parse_obj(obj)
+ return ComparedSegmentDto.model_validate(obj)
- _obj = ComparedSegmentDto.parse_obj({
+ _obj = ComparedSegmentDto.model_validate({
"uid": obj.get("uid"),
"state": obj.get("state")
})
diff --git a/phrasetms_client/models/compared_segments_dto.py b/phrasetms_client/models/compared_segments_dto.py
index 78087ec4..c9fe9ee9 100644
--- a/phrasetms_client/models/compared_segments_dto.py
+++ b/phrasetms_client/models/compared_segments_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.compared_segment_dto import ComparedSegmentDto
class ComparedSegmentsDto(BaseModel):
"""
ComparedSegmentsDto
"""
- segments: Optional[conlist(ComparedSegmentDto)] = None
+ segments: Optional[List[ComparedSegmentDto]] = None
__properties = ["segments"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ComparedSegmentsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ComparedSegmentsDto:
return None
if not isinstance(obj, dict):
- return ComparedSegmentsDto.parse_obj(obj)
+ return ComparedSegmentsDto.model_validate(obj)
- _obj = ComparedSegmentsDto.parse_obj({
+ _obj = ComparedSegmentsDto.model_validate({
"segments": [ComparedSegmentDto.from_dict(_item) for _item in obj.get("segments")] if obj.get("segments") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/concept_dto.py b/phrasetms_client/models/concept_dto.py
index c1a79a3a..2e619338 100644
--- a/phrasetms_client/models/concept_dto.py
+++ b/phrasetms_client/models/concept_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.term_dto import TermDto
class ConceptDto(BaseModel):
@@ -28,17 +28,13 @@ class ConceptDto(BaseModel):
"""
id: Optional[StrictStr] = None
writable: Optional[StrictBool] = None
- terms: Optional[conlist(conlist(TermDto))] = None
+ terms: Optional[List[List[TermDto]]] = None
__properties = ["id", "writable", "terms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> ConceptDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> ConceptDto:
return None
if not isinstance(obj, dict):
- return ConceptDto.parse_obj(obj)
+ return ConceptDto.model_validate(obj)
- _obj = ConceptDto.parse_obj({
+ _obj = ConceptDto.model_validate({
"id": obj.get("id"),
"writable": obj.get("writable"),
"terms": [List[TermDto].from_dict(_item) for _item in obj.get("terms")] if obj.get("terms") is not None else None
diff --git a/phrasetms_client/models/concept_dtov2.py b/phrasetms_client/models/concept_dtov2.py
index e5bab582..062475cc 100644
--- a/phrasetms_client/models/concept_dtov2.py
+++ b/phrasetms_client/models/concept_dtov2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ConceptDtov2(BaseModel):
"""
@@ -28,19 +28,15 @@ class ConceptDtov2(BaseModel):
id: Optional[StrictStr] = None
definition: Optional[StrictStr] = None
domain: Optional[StrictStr] = None
- sub_domains: Optional[conlist(StrictStr)] = Field(None, alias="subDomains")
+ sub_domains: Optional[List[StrictStr]] = Field(None, alias="subDomains")
url: Optional[StrictStr] = None
note: Optional[StrictStr] = None
__properties = ["id", "definition", "domain", "subDomains", "url", "note"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> ConceptDtov2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> ConceptDtov2:
return None
if not isinstance(obj, dict):
- return ConceptDtov2.parse_obj(obj)
+ return ConceptDtov2.model_validate(obj)
- _obj = ConceptDtov2.parse_obj({
+ _obj = ConceptDtov2.model_validate({
"id": obj.get("id"),
"definition": obj.get("definition"),
"domain": obj.get("domain"),
diff --git a/phrasetms_client/models/concept_edit_dto.py b/phrasetms_client/models/concept_edit_dto.py
index 25ef50ca..b6d3ddae 100644
--- a/phrasetms_client/models/concept_edit_dto.py
+++ b/phrasetms_client/models/concept_edit_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.uid_reference import UidReference
class ConceptEditDto(BaseModel):
@@ -27,20 +27,16 @@ class ConceptEditDto(BaseModel):
ConceptEditDto
"""
domain: Optional[UidReference] = None
- subdomains: Optional[conlist(UidReference)] = None
+ subdomains: Optional[List[UidReference]] = None
definition: Optional[StrictStr] = None
url: Optional[StrictStr] = None
concept_note: Optional[StrictStr] = Field(None, alias="conceptNote")
__properties = ["domain", "subdomains", "definition", "url", "conceptNote"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> ConceptEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> ConceptEditDto:
return None
if not isinstance(obj, dict):
- return ConceptEditDto.parse_obj(obj)
+ return ConceptEditDto.model_validate(obj)
- _obj = ConceptEditDto.parse_obj({
+ _obj = ConceptEditDto.model_validate({
"domain": UidReference.from_dict(obj.get("domain")) if obj.get("domain") is not None else None,
"subdomains": [UidReference.from_dict(_item) for _item in obj.get("subdomains")] if obj.get("subdomains") is not None else None,
"definition": obj.get("definition"),
diff --git a/phrasetms_client/models/concept_list_reference.py b/phrasetms_client/models/concept_list_reference.py
index 07b0ea0d..0af6edc5 100644
--- a/phrasetms_client/models/concept_list_reference.py
+++ b/phrasetms_client/models/concept_list_reference.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class ConceptListReference(BaseModel):
"""
ConceptListReference
"""
- concepts: conlist(IdReference, max_items=100, min_items=1) = Field(...)
+ concepts: List[IdReference] = Field(...)
__properties = ["concepts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ConceptListReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ConceptListReference:
return None
if not isinstance(obj, dict):
- return ConceptListReference.parse_obj(obj)
+ return ConceptListReference.model_validate(obj)
- _obj = ConceptListReference.parse_obj({
+ _obj = ConceptListReference.model_validate({
"concepts": [IdReference.from_dict(_item) for _item in obj.get("concepts")] if obj.get("concepts") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/concept_list_response_dto.py b/phrasetms_client/models/concept_list_response_dto.py
index 6aff2747..ce6f788e 100644
--- a/phrasetms_client/models/concept_list_response_dto.py
+++ b/phrasetms_client/models/concept_list_response_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.concept_with_metadata_dto import ConceptWithMetadataDto
class ConceptListResponseDto(BaseModel):
"""
ConceptListResponseDto
"""
- concepts: Optional[conlist(ConceptWithMetadataDto)] = None
+ concepts: Optional[List[ConceptWithMetadataDto]] = None
total_count: Optional[StrictInt] = Field(None, alias="totalCount")
__properties = ["concepts", "totalCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ConceptListResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> ConceptListResponseDto:
return None
if not isinstance(obj, dict):
- return ConceptListResponseDto.parse_obj(obj)
+ return ConceptListResponseDto.model_validate(obj)
- _obj = ConceptListResponseDto.parse_obj({
+ _obj = ConceptListResponseDto.model_validate({
"concepts": [ConceptWithMetadataDto.from_dict(_item) for _item in obj.get("concepts")] if obj.get("concepts") is not None else None,
"total_count": obj.get("totalCount")
})
diff --git a/phrasetms_client/models/concept_with_metadata_dto.py b/phrasetms_client/models/concept_with_metadata_dto.py
index deb2ae6e..27a35000 100644
--- a/phrasetms_client/models/concept_with_metadata_dto.py
+++ b/phrasetms_client/models/concept_with_metadata_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.domain_reference import DomainReference
from phrasetms_client.models.sub_domain_reference import SubDomainReference
@@ -29,20 +29,16 @@ class ConceptWithMetadataDto(BaseModel):
"""
id: Optional[StrictStr] = None
domain: Optional[DomainReference] = None
- subdomains: Optional[conlist(SubDomainReference)] = None
+ subdomains: Optional[List[SubDomainReference]] = None
url: Optional[StrictStr] = None
definition: Optional[StrictStr] = None
concept_note: Optional[StrictStr] = Field(None, alias="conceptNote")
__properties = ["id", "domain", "subdomains", "url", "definition", "conceptNote"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> ConceptWithMetadataDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +74,9 @@ def from_dict(cls, obj: dict) -> ConceptWithMetadataDto:
return None
if not isinstance(obj, dict):
- return ConceptWithMetadataDto.parse_obj(obj)
+ return ConceptWithMetadataDto.model_validate(obj)
- _obj = ConceptWithMetadataDto.parse_obj({
+ _obj = ConceptWithMetadataDto.model_validate({
"id": obj.get("id"),
"domain": DomainReference.from_dict(obj.get("domain")) if obj.get("domain") is not None else None,
"subdomains": [SubDomainReference.from_dict(_item) for _item in obj.get("subdomains")] if obj.get("subdomains") is not None else None,
diff --git a/phrasetms_client/models/concurrent_requests_dto.py b/phrasetms_client/models/concurrent_requests_dto.py
index dd829996..7dbae75a 100644
--- a/phrasetms_client/models/concurrent_requests_dto.py
+++ b/phrasetms_client/models/concurrent_requests_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class ConcurrentRequestsDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class ConcurrentRequestsDto(BaseModel):
count: Optional[StrictInt] = Field(None, description="Current count of running concurrent requests")
__properties = ["limit", "count"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ConcurrentRequestsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> ConcurrentRequestsDto:
return None
if not isinstance(obj, dict):
- return ConcurrentRequestsDto.parse_obj(obj)
+ return ConcurrentRequestsDto.model_validate(obj)
- _obj = ConcurrentRequestsDto.parse_obj({
+ _obj = ConcurrentRequestsDto.model_validate({
"limit": obj.get("limit"),
"count": obj.get("count")
})
diff --git a/phrasetms_client/models/connector_create_response_dto.py b/phrasetms_client/models/connector_create_response_dto.py
index a4a405e2..14ac9674 100644
--- a/phrasetms_client/models/connector_create_response_dto.py
+++ b/phrasetms_client/models/connector_create_response_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ConnectorCreateResponseDto(BaseModel):
"""
@@ -33,14 +33,10 @@ class ConnectorCreateResponseDto(BaseModel):
linked_account: Optional[StrictStr] = Field(None, alias="linkedAccount")
__properties = ["id", "name", "type", "created", "status", "linkedAccount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> ConnectorCreateResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> ConnectorCreateResponseDto:
return None
if not isinstance(obj, dict):
- return ConnectorCreateResponseDto.parse_obj(obj)
+ return ConnectorCreateResponseDto.model_validate(obj)
- _obj = ConnectorCreateResponseDto.parse_obj({
+ _obj = ConnectorCreateResponseDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/connector_dto.py b/phrasetms_client/models/connector_dto.py
index bc6eac46..6619404e 100644
--- a/phrasetms_client/models/connector_dto.py
+++ b/phrasetms_client/models/connector_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.automated_project_settings_dto import AutomatedProjectSettingsDto
from phrasetms_client.models.name_dto import NameDto
@@ -34,10 +34,11 @@ class ConnectorDto(BaseModel):
created_by: Optional[NameDto] = Field(None, alias="createdBy")
created_at: Optional[datetime] = Field(None, alias="createdAt")
local_token: Optional[StrictStr] = Field(None, alias="localToken")
- automated_project_settings: Optional[conlist(AutomatedProjectSettingsDto)] = Field(None, alias="automatedProjectSettings")
+ automated_project_settings: Optional[List[AutomatedProjectSettingsDto]] = Field(None, alias="automatedProjectSettings")
__properties = ["id", "name", "type", "organization", "createdBy", "createdAt", "localToken", "automatedProjectSettings"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -47,14 +48,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('DROPBOX', 'GOOGLE', 'FTP', 'WORDPRESS', 'GITHUB', 'SFTP', 'DRUPAL', 'BOX', 'GIT', 'ZENDESK', 'ONEDRIVE', 'GITLAB', 'MARKETO', 'HUBSPOT', 'HELPSCOUT', 'SALESFORCE', 'BITBUCKET', 'BITBUCKETSERVER', 'BRAZE', 'SHAREPOINT', 'AZURE', 'SITECORE', 'KENTICO', 'KENTICO_KONTENT', 'MAGENTO', 'CONTENTFULENTRYLEVEL', 'CONTENTFUL', 'CONTENTSTACK', 'JOOMLA', 'CONFLUENCE', 'TRIDION', 'TYPO3', 'AEM_PLUGIN', 'DRUPAL_PLUGIN', 'AMAZON_S3', 'PARDOT', 'PHRASE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +64,7 @@ def from_json(cls, json_str: str) -> ConnectorDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -93,9 +90,9 @@ def from_dict(cls, obj: dict) -> ConnectorDto:
return None
if not isinstance(obj, dict):
- return ConnectorDto.parse_obj(obj)
+ return ConnectorDto.model_validate(obj)
- _obj = ConnectorDto.parse_obj({
+ _obj = ConnectorDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/connector_error_detail_dto.py b/phrasetms_client/models/connector_error_detail_dto.py
index ca9eef7a..7d7fa186 100644
--- a/phrasetms_client/models/connector_error_detail_dto.py
+++ b/phrasetms_client/models/connector_error_detail_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class ConnectorErrorDetailDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class ConnectorErrorDetailDto(BaseModel):
skip_prefix: Optional[StrictBool] = Field(None, alias="skipPrefix")
__properties = ["code", "message", "messageCode", "args", "skipPrefix"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> ConnectorErrorDetailDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> ConnectorErrorDetailDto:
return None
if not isinstance(obj, dict):
- return ConnectorErrorDetailDto.parse_obj(obj)
+ return ConnectorErrorDetailDto.model_validate(obj)
- _obj = ConnectorErrorDetailDto.parse_obj({
+ _obj = ConnectorErrorDetailDto.model_validate({
"code": obj.get("code"),
"message": obj.get("message"),
"message_code": obj.get("messageCode"),
diff --git a/phrasetms_client/models/connector_errors_dto.py b/phrasetms_client/models/connector_errors_dto.py
index 6f750cb1..91925667 100644
--- a/phrasetms_client/models/connector_errors_dto.py
+++ b/phrasetms_client/models/connector_errors_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.connector_error_detail_dto import ConnectorErrorDetailDto
class ConnectorErrorsDto(BaseModel):
"""
ConnectorErrorsDto
"""
- errors: Optional[conlist(ConnectorErrorDetailDto)] = None
+ errors: Optional[List[ConnectorErrorDetailDto]] = None
__properties = ["errors"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ConnectorErrorsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ConnectorErrorsDto:
return None
if not isinstance(obj, dict):
- return ConnectorErrorsDto.parse_obj(obj)
+ return ConnectorErrorsDto.model_validate(obj)
- _obj = ConnectorErrorsDto.parse_obj({
+ _obj = ConnectorErrorsDto.model_validate({
"errors": [ConnectorErrorDetailDto.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/connector_list_dto.py b/phrasetms_client/models/connector_list_dto.py
index a416e97a..b868d38d 100644
--- a/phrasetms_client/models/connector_list_dto.py
+++ b/phrasetms_client/models/connector_list_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.connector_dto import ConnectorDto
class ConnectorListDto(BaseModel):
"""
ConnectorListDto
"""
- connectors: Optional[conlist(ConnectorDto)] = None
+ connectors: Optional[List[ConnectorDto]] = None
total_count: Optional[StrictInt] = Field(None, alias="totalCount")
__properties = ["connectors", "totalCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ConnectorListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> ConnectorListDto:
return None
if not isinstance(obj, dict):
- return ConnectorListDto.parse_obj(obj)
+ return ConnectorListDto.model_validate(obj)
- _obj = ConnectorListDto.parse_obj({
+ _obj = ConnectorListDto.model_validate({
"connectors": [ConnectorDto.from_dict(_item) for _item in obj.get("connectors")] if obj.get("connectors") is not None else None,
"total_count": obj.get("totalCount")
})
diff --git a/phrasetms_client/models/contentstack.py b/phrasetms_client/models/contentstack.py
index 6da36a4b..b1e8c402 100644
--- a/phrasetms_client/models/contentstack.py
+++ b/phrasetms_client/models/contentstack.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Contentstack(AbstractConnectorDto):
@@ -43,14 +43,10 @@ class Contentstack(AbstractConnectorDto):
stack_wf_export_translate: Optional[StrictStr] = Field(None, alias="stackWFExportTranslate")
__properties = ["name", "type", "authType", "region", "nonLocalizableBlocksUids", "targetLangsFieldId", "apiKey", "sourceLang", "translateUrls", "translateTags", "managementToken", "password", "userName", "stackWFObserved", "stackWFUponImport", "stackWFExportSource", "stackWFExportTranslate"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +59,7 @@ def from_json(cls, json_str: str) -> Contentstack:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> Contentstack:
return None
if not isinstance(obj, dict):
- return Contentstack.parse_obj(obj)
+ return Contentstack.model_validate(obj)
- _obj = Contentstack.parse_obj({
+ _obj = Contentstack.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"auth_type": obj.get("authType"),
diff --git a/phrasetms_client/models/contentstack_all_of.py b/phrasetms_client/models/contentstack_all_of.py
index 8da98c26..0b21bc6e 100644
--- a/phrasetms_client/models/contentstack_all_of.py
+++ b/phrasetms_client/models/contentstack_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class ContentstackAllOf(BaseModel):
"""
@@ -42,14 +42,10 @@ class ContentstackAllOf(BaseModel):
stack_wf_export_translate: Optional[StrictStr] = Field(None, alias="stackWFExportTranslate")
__properties = ["authType", "region", "nonLocalizableBlocksUids", "targetLangsFieldId", "apiKey", "sourceLang", "translateUrls", "translateTags", "managementToken", "password", "userName", "stackWFObserved", "stackWFUponImport", "stackWFExportSource", "stackWFExportTranslate"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> ContentstackAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> ContentstackAllOf:
return None
if not isinstance(obj, dict):
- return ContentstackAllOf.parse_obj(obj)
+ return ContentstackAllOf.model_validate(obj)
- _obj = ContentstackAllOf.parse_obj({
+ _obj = ContentstackAllOf.model_validate({
"auth_type": obj.get("authType"),
"region": obj.get("region"),
"non_localizable_blocks_uids": obj.get("nonLocalizableBlocksUids"),
diff --git a/phrasetms_client/models/continuous_job_info_dto.py b/phrasetms_client/models/continuous_job_info_dto.py
index 3b0f7263..fa3daa82 100644
--- a/phrasetms_client/models/continuous_job_info_dto.py
+++ b/phrasetms_client/models/continuous_job_info_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
class ContinuousJobInfoDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class ContinuousJobInfoDto(BaseModel):
date_updated: Optional[datetime] = Field(None, alias="dateUpdated")
__properties = ["dateUpdated"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> ContinuousJobInfoDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> ContinuousJobInfoDto:
return None
if not isinstance(obj, dict):
- return ContinuousJobInfoDto.parse_obj(obj)
+ return ContinuousJobInfoDto.model_validate(obj)
- _obj = ContinuousJobInfoDto.parse_obj({
+ _obj = ContinuousJobInfoDto.model_validate({
"date_updated": obj.get("dateUpdated")
})
return _obj
diff --git a/phrasetms_client/models/conversation_list_dto.py b/phrasetms_client/models/conversation_list_dto.py
index 6d99e7fb..30526c05 100644
--- a/phrasetms_client/models/conversation_list_dto.py
+++ b/phrasetms_client/models/conversation_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.common_conversation_dto import CommonConversationDto
class ConversationListDto(BaseModel):
"""
ConversationListDto
"""
- conversations: Optional[conlist(CommonConversationDto)] = None
+ conversations: Optional[List[CommonConversationDto]] = None
__properties = ["conversations"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ConversationListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ConversationListDto:
return None
if not isinstance(obj, dict):
- return ConversationListDto.parse_obj(obj)
+ return ConversationListDto.model_validate(obj)
- _obj = ConversationListDto.parse_obj({
+ _obj = ConversationListDto.model_validate({
"conversations": [CommonConversationDto.from_dict(_item) for _item in obj.get("conversations")] if obj.get("conversations") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/cost_center_dto.py b/phrasetms_client/models/cost_center_dto.py
index b04cf3fa..7a383f55 100644
--- a/phrasetms_client/models/cost_center_dto.py
+++ b/phrasetms_client/models/cost_center_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class CostCenterDto(BaseModel):
@@ -32,14 +32,10 @@ class CostCenterDto(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> CostCenterDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> CostCenterDto:
return None
if not isinstance(obj, dict):
- return CostCenterDto.parse_obj(obj)
+ return CostCenterDto.model_validate(obj)
- _obj = CostCenterDto.parse_obj({
+ _obj = CostCenterDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/cost_center_edit_dto.py b/phrasetms_client/models/cost_center_edit_dto.py
index ab84fd2d..b13e9536 100644
--- a/phrasetms_client/models/cost_center_edit_dto.py
+++ b/phrasetms_client/models/cost_center_edit_dto.py
@@ -18,24 +18,21 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, constr
+from pydantic import BaseModel, ConfigDict, StringConstraints
class CostCenterEditDto(BaseModel):
"""
CostCenterEditDto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
__properties = ["name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +45,7 @@ def from_json(cls, json_str: str) -> CostCenterEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +58,9 @@ def from_dict(cls, obj: dict) -> CostCenterEditDto:
return None
if not isinstance(obj, dict):
- return CostCenterEditDto.parse_obj(obj)
+ return CostCenterEditDto.model_validate(obj)
- _obj = CostCenterEditDto.parse_obj({
+ _obj = CostCenterEditDto.model_validate({
"name": obj.get("name")
})
return _obj
diff --git a/phrasetms_client/models/cost_center_reference.py b/phrasetms_client/models/cost_center_reference.py
index 515f9627..fb6d1ec9 100644
--- a/phrasetms_client/models/cost_center_reference.py
+++ b/phrasetms_client/models/cost_center_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class CostCenterReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class CostCenterReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["name", "id", "uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> CostCenterReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> CostCenterReference:
return None
if not isinstance(obj, dict):
- return CostCenterReference.parse_obj(obj)
+ return CostCenterReference.model_validate(obj)
- _obj = CostCenterReference.parse_obj({
+ _obj = CostCenterReference.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"uid": obj.get("uid")
diff --git a/phrasetms_client/models/counts_dto.py b/phrasetms_client/models/counts_dto.py
index a828b2a3..b5503836 100644
--- a/phrasetms_client/models/counts_dto.py
+++ b/phrasetms_client/models/counts_dto.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt
class CountsDto(BaseModel):
"""
@@ -33,14 +33,10 @@ class CountsDto(BaseModel):
editing_time: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="editingTime")
__properties = ["segments", "words", "characters", "normalizedPages", "percent", "editingTime"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> CountsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> CountsDto:
return None
if not isinstance(obj, dict):
- return CountsDto.parse_obj(obj)
+ return CountsDto.model_validate(obj)
- _obj = CountsDto.parse_obj({
+ _obj = CountsDto.model_validate({
"segments": obj.get("segments"),
"words": obj.get("words"),
"characters": obj.get("characters"),
diff --git a/phrasetms_client/models/create_analyse_async_v2_dto.py b/phrasetms_client/models/create_analyse_async_v2_dto.py
index 1ff6c6a6..625bf2f5 100644
--- a/phrasetms_client/models/create_analyse_async_v2_dto.py
+++ b/phrasetms_client/models/create_analyse_async_v2_dto.py
@@ -18,8 +18,17 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.uid_reference import UidReference
@@ -28,7 +37,7 @@ class CreateAnalyseAsyncV2Dto(BaseModel):
"""
CreateAnalyseAsyncV2Dto
"""
- jobs: conlist(UidReference, max_items=50000, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
type: Optional[StrictStr] = Field(None, description="default: PreAnalyse")
include_fuzzy_repetitions: Optional[StrictBool] = Field(None, alias="includeFuzzyRepetitions", description="Default: true")
separate_fuzzy_repetitions: Optional[StrictBool] = Field(None, alias="separateFuzzyRepetitions", description="Default: false")
@@ -42,15 +51,16 @@ class CreateAnalyseAsyncV2Dto(BaseModel):
trans_memory_post_editing: Optional[StrictBool] = Field(None, alias="transMemoryPostEditing", description="Default: false. Works only for type=PostAnalyse.")
non_translatable_post_editing: Optional[StrictBool] = Field(None, alias="nonTranslatablePostEditing", description="Default: false. Works only for type=PostAnalyse.")
machine_translate_post_editing: Optional[StrictBool] = Field(None, alias="machineTranslatePostEditing", description="Default: false. Works only for type=PostAnalyse.")
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
net_rate_scheme: Optional[IdReference] = Field(None, alias="netRateScheme")
- compare_workflow_level: Optional[conint(strict=True, le=15, ge=1)] = Field(None, alias="compareWorkflowLevel", description="Required for type=Compare")
+ compare_workflow_level: Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = Field(None, alias="compareWorkflowLevel", description="Required for type=Compare")
use_project_analysis_settings: Optional[StrictBool] = Field(None, alias="useProjectAnalysisSettings", description="Default: false. Use default project settings. Will be overwritten with setting sent in the API call.")
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
provider: Optional[ProviderReference] = None
__properties = ["jobs", "type", "includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "countSourceUnits", "includeTransMemory", "includeNonTranslatables", "includeMachineTranslationMatches", "transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing", "name", "netRateScheme", "compareWorkflowLevel", "useProjectAnalysisSettings", "callbackUrl", "provider"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -60,14 +70,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'Compare')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -80,7 +86,7 @@ def from_json(cls, json_str: str) -> CreateAnalyseAsyncV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -106,9 +112,9 @@ def from_dict(cls, obj: dict) -> CreateAnalyseAsyncV2Dto:
return None
if not isinstance(obj, dict):
- return CreateAnalyseAsyncV2Dto.parse_obj(obj)
+ return CreateAnalyseAsyncV2Dto.model_validate(obj)
- _obj = CreateAnalyseAsyncV2Dto.parse_obj({
+ _obj = CreateAnalyseAsyncV2Dto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"type": obj.get("type"),
"include_fuzzy_repetitions": obj.get("includeFuzzyRepetitions"),
diff --git a/phrasetms_client/models/create_analyse_list_async_dto.py b/phrasetms_client/models/create_analyse_list_async_dto.py
index ef3866a1..613c0c46 100644
--- a/phrasetms_client/models/create_analyse_list_async_dto.py
+++ b/phrasetms_client/models/create_analyse_list_async_dto.py
@@ -18,8 +18,17 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.uid_reference import UidReference
@@ -27,7 +36,7 @@ class CreateAnalyseListAsyncDto(BaseModel):
"""
CreateAnalyseListAsyncDto
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
type: Optional[StrictStr] = Field(None, description="default: PreAnalyse")
include_fuzzy_repetitions: Optional[StrictBool] = Field(None, alias="includeFuzzyRepetitions", description="Default: true")
separate_fuzzy_repetitions: Optional[StrictBool] = Field(None, alias="separateFuzzyRepetitions", description="Default: false")
@@ -41,14 +50,15 @@ class CreateAnalyseListAsyncDto(BaseModel):
trans_memory_post_editing: Optional[StrictBool] = Field(None, alias="transMemoryPostEditing", description="Default: false. Works only for type=PostAnalyse.")
non_translatable_post_editing: Optional[StrictBool] = Field(None, alias="nonTranslatablePostEditing", description="Default: false. Works only for type=PostAnalyse.")
machine_translate_post_editing: Optional[StrictBool] = Field(None, alias="machineTranslatePostEditing", description="Default: false. Works only for type=PostAnalyse.")
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
net_rate_scheme: Optional[IdReference] = Field(None, alias="netRateScheme")
- compare_workflow_level: Optional[conint(strict=True, le=15, ge=1)] = Field(None, alias="compareWorkflowLevel", description="Required for type=Compare")
+ compare_workflow_level: Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = Field(None, alias="compareWorkflowLevel", description="Required for type=Compare")
use_project_analysis_settings: Optional[StrictBool] = Field(None, alias="useProjectAnalysisSettings", description="Default: false. Use default project settings. Will be overwritten with setting sent in the API call.")
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
__properties = ["jobs", "type", "includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "countSourceUnits", "includeTransMemory", "includeNonTranslatables", "includeMachineTranslationMatches", "transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing", "name", "netRateScheme", "compareWorkflowLevel", "useProjectAnalysisSettings", "callbackUrl"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -58,14 +68,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'Compare')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -78,7 +84,7 @@ def from_json(cls, json_str: str) -> CreateAnalyseListAsyncDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -101,9 +107,9 @@ def from_dict(cls, obj: dict) -> CreateAnalyseListAsyncDto:
return None
if not isinstance(obj, dict):
- return CreateAnalyseListAsyncDto.parse_obj(obj)
+ return CreateAnalyseListAsyncDto.model_validate(obj)
- _obj = CreateAnalyseListAsyncDto.parse_obj({
+ _obj = CreateAnalyseListAsyncDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"type": obj.get("type"),
"include_fuzzy_repetitions": obj.get("includeFuzzyRepetitions"),
diff --git a/phrasetms_client/models/create_custom_field_dto.py b/phrasetms_client/models/create_custom_field_dto.py
index 00ed1e1a..323dbe7b 100644
--- a/phrasetms_client/models/create_custom_field_dto.py
+++ b/phrasetms_client/models/create_custom_field_dto.py
@@ -18,22 +18,32 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
class CreateCustomFieldDto(BaseModel):
"""
CreateCustomFieldDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
- allowed_entities: conlist(StrictStr) = Field(..., alias="allowedEntities")
- options: Optional[conlist(StrictStr)] = None
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ allowed_entities: List[StrictStr] = Field(..., alias="allowedEntities")
+ options: Optional[List[StrictStr]] = None
type: Optional[StrictStr] = None
required: Optional[StrictBool] = None
- description: Optional[constr(strict=True, max_length=500, min_length=0)] = None
+ description: Optional[Annotated[str, StringConstraints(strict=True, max_length=500, min_length=0)]] = None
__properties = ["name", "allowedEntities", "options", "type", "required", "description"]
- @validator('allowed_entities')
+ @field_validator('allowed_entities')
+ @classmethod
def allowed_entities_validate_enum(cls, value):
"""Validates the enum"""
for i in value:
@@ -41,7 +51,8 @@ def allowed_entities_validate_enum(cls, value):
raise ValueError("each list item must be one of ('PROJECT')")
return value
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -51,14 +62,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('MULTI_SELECT', 'SINGLE_SELECT', 'STRING', 'NUMBER', 'URL', 'DATE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -71,7 +78,7 @@ def from_json(cls, json_str: str) -> CreateCustomFieldDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -84,9 +91,9 @@ def from_dict(cls, obj: dict) -> CreateCustomFieldDto:
return None
if not isinstance(obj, dict):
- return CreateCustomFieldDto.parse_obj(obj)
+ return CreateCustomFieldDto.model_validate(obj)
- _obj = CreateCustomFieldDto.parse_obj({
+ _obj = CreateCustomFieldDto.model_validate({
"name": obj.get("name"),
"allowed_entities": obj.get("allowedEntities"),
"options": obj.get("options"),
diff --git a/phrasetms_client/models/create_custom_field_instance_dto.py b/phrasetms_client/models/create_custom_field_instance_dto.py
index d86a1971..7f04fe34 100644
--- a/phrasetms_client/models/create_custom_field_instance_dto.py
+++ b/phrasetms_client/models/create_custom_field_instance_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.uid_reference import UidReference
class CreateCustomFieldInstanceDto(BaseModel):
@@ -27,18 +28,14 @@ class CreateCustomFieldInstanceDto(BaseModel):
CreateCustomFieldInstanceDto
"""
custom_field: Optional[UidReference] = Field(None, alias="customField")
- selected_options: Optional[conlist(UidReference)] = Field(None, alias="selectedOptions")
- value: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ selected_options: Optional[List[UidReference]] = Field(None, alias="selectedOptions")
+ value: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
__properties = ["customField", "selectedOptions", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +48,7 @@ def from_json(cls, json_str: str) -> CreateCustomFieldInstanceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +71,9 @@ def from_dict(cls, obj: dict) -> CreateCustomFieldInstanceDto:
return None
if not isinstance(obj, dict):
- return CreateCustomFieldInstanceDto.parse_obj(obj)
+ return CreateCustomFieldInstanceDto.model_validate(obj)
- _obj = CreateCustomFieldInstanceDto.parse_obj({
+ _obj = CreateCustomFieldInstanceDto.model_validate({
"custom_field": UidReference.from_dict(obj.get("customField")) if obj.get("customField") is not None else None,
"selected_options": [UidReference.from_dict(_item) for _item in obj.get("selectedOptions")] if obj.get("selectedOptions") is not None else None,
"value": obj.get("value")
diff --git a/phrasetms_client/models/create_custom_field_instances_dto.py b/phrasetms_client/models/create_custom_field_instances_dto.py
index 0c071763..42e18088 100644
--- a/phrasetms_client/models/create_custom_field_instances_dto.py
+++ b/phrasetms_client/models/create_custom_field_instances_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.create_custom_field_instance_dto import CreateCustomFieldInstanceDto
class CreateCustomFieldInstancesDto(BaseModel):
"""
CreateCustomFieldInstancesDto
"""
- custom_field_instances: Optional[conlist(CreateCustomFieldInstanceDto)] = Field(None, alias="customFieldInstances")
+ custom_field_instances: Optional[List[CreateCustomFieldInstanceDto]] = Field(None, alias="customFieldInstances")
__properties = ["customFieldInstances"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> CreateCustomFieldInstancesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> CreateCustomFieldInstancesDto:
return None
if not isinstance(obj, dict):
- return CreateCustomFieldInstancesDto.parse_obj(obj)
+ return CreateCustomFieldInstancesDto.model_validate(obj)
- _obj = CreateCustomFieldInstancesDto.parse_obj({
+ _obj = CreateCustomFieldInstancesDto.model_validate({
"custom_field_instances": [CreateCustomFieldInstanceDto.from_dict(_item) for _item in obj.get("customFieldInstances")] if obj.get("customFieldInstances") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/create_custom_file_type_dto.py b/phrasetms_client/models/create_custom_file_type_dto.py
index 41c6c56a..18c6dc93 100644
--- a/phrasetms_client/models/create_custom_file_type_dto.py
+++ b/phrasetms_client/models/create_custom_file_type_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.file_import_settings_create_dto import FileImportSettingsCreateDto
class CreateCustomFileTypeDto(BaseModel):
@@ -32,21 +32,18 @@ class CreateCustomFileTypeDto(BaseModel):
file_import_settings: Optional[FileImportSettingsCreateDto] = Field(None, alias="fileImportSettings")
__properties = ["name", "filenamePattern", "type", "fileImportSettings"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('html', 'json', 'xml', 'multiling_xml', 'txt'):
raise ValueError("must be one of enum values ('html', 'json', 'xml', 'multiling_xml', 'txt')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> CreateCustomFileTypeDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +72,9 @@ def from_dict(cls, obj: dict) -> CreateCustomFileTypeDto:
return None
if not isinstance(obj, dict):
- return CreateCustomFileTypeDto.parse_obj(obj)
+ return CreateCustomFileTypeDto.model_validate(obj)
- _obj = CreateCustomFileTypeDto.parse_obj({
+ _obj = CreateCustomFileTypeDto.model_validate({
"name": obj.get("name"),
"filename_pattern": obj.get("filenamePattern"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/create_lqa_conversation_dto.py b/phrasetms_client/models/create_lqa_conversation_dto.py
index 7e3cd1a2..b56c16ed 100644
--- a/phrasetms_client/models/create_lqa_conversation_dto.py
+++ b/phrasetms_client/models/create_lqa_conversation_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.lqa_references import LQAReferences
class CreateLqaConversationDto(BaseModel):
@@ -30,14 +30,10 @@ class CreateLqaConversationDto(BaseModel):
references: LQAReferences = Field(...)
__properties = ["lqaDescription", "references"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> CreateLqaConversationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> CreateLqaConversationDto:
return None
if not isinstance(obj, dict):
- return CreateLqaConversationDto.parse_obj(obj)
+ return CreateLqaConversationDto.model_validate(obj)
- _obj = CreateLqaConversationDto.parse_obj({
+ _obj = CreateLqaConversationDto.model_validate({
"lqa_description": obj.get("lqaDescription"),
"references": LQAReferences.from_dict(obj.get("references")) if obj.get("references") is not None else None
})
diff --git a/phrasetms_client/models/create_lqa_profile_dto.py b/phrasetms_client/models/create_lqa_profile_dto.py
index e3dfc80b..f22a7c6a 100644
--- a/phrasetms_client/models/create_lqa_profile_dto.py
+++ b/phrasetms_client/models/create_lqa_profile_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.error_categories_dto import ErrorCategoriesDto
from phrasetms_client.models.pass_fail_threshold_dto import PassFailThresholdDto
from phrasetms_client.models.penalty_points_dto import PenaltyPointsDto
@@ -28,20 +29,16 @@ class CreateLqaProfileDto(BaseModel):
"""
CreateLqaProfileDto
"""
- name: constr(strict=True, max_length=255, min_length=1) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=1)] = Field(...)
error_categories: ErrorCategoriesDto = Field(..., alias="errorCategories")
penalty_points: Optional[PenaltyPointsDto] = Field(None, alias="penaltyPoints")
pass_fail_threshold: Optional[PassFailThresholdDto] = Field(None, alias="passFailThreshold")
__properties = ["name", "errorCategories", "penaltyPoints", "passFailThreshold"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +51,7 @@ def from_json(cls, json_str: str) -> CreateLqaProfileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +73,9 @@ def from_dict(cls, obj: dict) -> CreateLqaProfileDto:
return None
if not isinstance(obj, dict):
- return CreateLqaProfileDto.parse_obj(obj)
+ return CreateLqaProfileDto.model_validate(obj)
- _obj = CreateLqaProfileDto.parse_obj({
+ _obj = CreateLqaProfileDto.model_validate({
"name": obj.get("name"),
"error_categories": ErrorCategoriesDto.from_dict(obj.get("errorCategories")) if obj.get("errorCategories") is not None else None,
"penalty_points": PenaltyPointsDto.from_dict(obj.get("penaltyPoints")) if obj.get("penaltyPoints") is not None else None,
diff --git a/phrasetms_client/models/create_plain_conversation_dto.py b/phrasetms_client/models/create_plain_conversation_dto.py
index 32b7a5e5..d465abfb 100644
--- a/phrasetms_client/models/create_plain_conversation_dto.py
+++ b/phrasetms_client/models/create_plain_conversation_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.add_comment_dto import AddCommentDto
from phrasetms_client.models.plain_references import PlainReferences
@@ -31,14 +31,10 @@ class CreatePlainConversationDto(BaseModel):
references: PlainReferences = Field(...)
__properties = ["comment", "references"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> CreatePlainConversationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> CreatePlainConversationDto:
return None
if not isinstance(obj, dict):
- return CreatePlainConversationDto.parse_obj(obj)
+ return CreatePlainConversationDto.model_validate(obj)
- _obj = CreatePlainConversationDto.parse_obj({
+ _obj = CreatePlainConversationDto.model_validate({
"comment": AddCommentDto.from_dict(obj.get("comment")) if obj.get("comment") is not None else None,
"references": PlainReferences.from_dict(obj.get("references")) if obj.get("references") is not None else None
})
diff --git a/phrasetms_client/models/create_project_from_template_async_v2_dto.py b/phrasetms_client/models/create_project_from_template_async_v2_dto.py
index fc2da983..122b112e 100644
--- a/phrasetms_client/models/create_project_from_template_async_v2_dto.py
+++ b/phrasetms_client/models/create_project_from_template_async_v2_dto.py
@@ -18,18 +18,19 @@
import json
from datetime import datetime
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
class CreateProjectFromTemplateAsyncV2Dto(BaseModel):
"""
CreateProjectFromTemplateAsyncV2Dto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
- workflow_steps: Optional[conlist(IdReference)] = Field(None, alias="workflowSteps")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
+ workflow_steps: Optional[List[IdReference]] = Field(None, alias="workflowSteps")
date_due: Optional[datetime] = Field(None, alias="dateDue")
note: Optional[StrictStr] = None
client: Optional[IdReference] = None
@@ -40,14 +41,10 @@ class CreateProjectFromTemplateAsyncV2Dto(BaseModel):
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
__properties = ["name", "sourceLang", "targetLangs", "workflowSteps", "dateDue", "note", "client", "businessUnit", "domain", "subDomain", "costCenter", "callbackUrl"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +57,7 @@ def from_json(cls, json_str: str) -> CreateProjectFromTemplateAsyncV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -95,9 +92,9 @@ def from_dict(cls, obj: dict) -> CreateProjectFromTemplateAsyncV2Dto:
return None
if not isinstance(obj, dict):
- return CreateProjectFromTemplateAsyncV2Dto.parse_obj(obj)
+ return CreateProjectFromTemplateAsyncV2Dto.model_validate(obj)
- _obj = CreateProjectFromTemplateAsyncV2Dto.parse_obj({
+ _obj = CreateProjectFromTemplateAsyncV2Dto.model_validate({
"name": obj.get("name"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs"),
diff --git a/phrasetms_client/models/create_project_from_template_v2_dto.py b/phrasetms_client/models/create_project_from_template_v2_dto.py
index db58ddf4..4bf42614 100644
--- a/phrasetms_client/models/create_project_from_template_v2_dto.py
+++ b/phrasetms_client/models/create_project_from_template_v2_dto.py
@@ -18,18 +18,19 @@
import json
from datetime import datetime
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
class CreateProjectFromTemplateV2Dto(BaseModel):
"""
CreateProjectFromTemplateV2Dto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
- workflow_steps: Optional[conlist(IdReference)] = Field(None, alias="workflowSteps")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
+ workflow_steps: Optional[List[IdReference]] = Field(None, alias="workflowSteps")
date_due: Optional[datetime] = Field(None, alias="dateDue")
note: Optional[StrictStr] = None
client: Optional[IdReference] = None
@@ -39,14 +40,10 @@ class CreateProjectFromTemplateV2Dto(BaseModel):
cost_center: Optional[IdReference] = Field(None, alias="costCenter")
__properties = ["name", "sourceLang", "targetLangs", "workflowSteps", "dateDue", "note", "client", "businessUnit", "domain", "subDomain", "costCenter"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> CreateProjectFromTemplateV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -94,9 +91,9 @@ def from_dict(cls, obj: dict) -> CreateProjectFromTemplateV2Dto:
return None
if not isinstance(obj, dict):
- return CreateProjectFromTemplateV2Dto.parse_obj(obj)
+ return CreateProjectFromTemplateV2Dto.model_validate(obj)
- _obj = CreateProjectFromTemplateV2Dto.parse_obj({
+ _obj = CreateProjectFromTemplateV2Dto.model_validate({
"name": obj.get("name"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs"),
diff --git a/phrasetms_client/models/create_project_v3_dto.py b/phrasetms_client/models/create_project_v3_dto.py
index aca146be..1fbc3753 100644
--- a/phrasetms_client/models/create_project_v3_dto.py
+++ b/phrasetms_client/models/create_project_v3_dto.py
@@ -18,8 +18,9 @@
import json
from datetime import datetime
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, StringConstraints
from phrasetms_client.models.custom_field_instance_api_dto import CustomFieldInstanceApiDto
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.lqa_profiles_for_ws_v2_dto import LqaProfilesForWsV2Dto
@@ -28,31 +29,27 @@ class CreateProjectV3Dto(BaseModel):
"""
CreateProjectV3Dto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
source_lang: StrictStr = Field(..., alias="sourceLang")
- target_langs: conlist(StrictStr) = Field(..., alias="targetLangs")
+ target_langs: List[StrictStr] = Field(..., alias="targetLangs")
client: Optional[IdReference] = None
business_unit: Optional[IdReference] = Field(None, alias="businessUnit")
domain: Optional[IdReference] = None
sub_domain: Optional[IdReference] = Field(None, alias="subDomain")
cost_center: Optional[IdReference] = Field(None, alias="costCenter")
- purchase_order: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="purchaseOrder")
- workflow_steps: Optional[conlist(IdReference)] = Field(None, alias="workflowSteps")
+ purchase_order: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="purchaseOrder")
+ workflow_steps: Optional[List[IdReference]] = Field(None, alias="workflowSteps")
date_due: Optional[datetime] = Field(None, alias="dateDue")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
- lqa_profiles: Optional[conlist(LqaProfilesForWsV2Dto)] = Field(None, alias="lqaProfiles", description="Lqa profiles that will be added to workflow steps")
- custom_fields: Optional[conlist(CustomFieldInstanceApiDto)] = Field(None, alias="customFields", description="Custom fields for project")
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
+ lqa_profiles: Optional[List[LqaProfilesForWsV2Dto]] = Field(None, alias="lqaProfiles", description="Lqa profiles that will be added to workflow steps")
+ custom_fields: Optional[List[CustomFieldInstanceApiDto]] = Field(None, alias="customFields", description="Custom fields for project")
file_handover: Optional[StrictBool] = Field(None, alias="fileHandover", description="Default: false")
__properties = ["name", "sourceLang", "targetLangs", "client", "businessUnit", "domain", "subDomain", "costCenter", "purchaseOrder", "workflowSteps", "dateDue", "note", "lqaProfiles", "customFields", "fileHandover"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +62,7 @@ def from_json(cls, json_str: str) -> CreateProjectV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -114,9 +111,9 @@ def from_dict(cls, obj: dict) -> CreateProjectV3Dto:
return None
if not isinstance(obj, dict):
- return CreateProjectV3Dto.parse_obj(obj)
+ return CreateProjectV3Dto.model_validate(obj)
- _obj = CreateProjectV3Dto.parse_obj({
+ _obj = CreateProjectV3Dto.model_validate({
"name": obj.get("name"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs"),
diff --git a/phrasetms_client/models/create_reference_file_note_dto.py b/phrasetms_client/models/create_reference_file_note_dto.py
index ba1168e1..e6287809 100644
--- a/phrasetms_client/models/create_reference_file_note_dto.py
+++ b/phrasetms_client/models/create_reference_file_note_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class CreateReferenceFileNoteDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class CreateReferenceFileNoteDto(BaseModel):
note: StrictStr = Field(...)
__properties = ["note"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> CreateReferenceFileNoteDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> CreateReferenceFileNoteDto:
return None
if not isinstance(obj, dict):
- return CreateReferenceFileNoteDto.parse_obj(obj)
+ return CreateReferenceFileNoteDto.model_validate(obj)
- _obj = CreateReferenceFileNoteDto.parse_obj({
+ _obj = CreateReferenceFileNoteDto.model_validate({
"note": obj.get("note")
})
return _obj
diff --git a/phrasetms_client/models/create_terms_dto.py b/phrasetms_client/models/create_terms_dto.py
index 3cfaf595..e007b1fa 100644
--- a/phrasetms_client/models/create_terms_dto.py
+++ b/phrasetms_client/models/create_terms_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.term_create_by_job_dto import TermCreateByJobDto
class CreateTermsDto(BaseModel):
@@ -30,14 +30,10 @@ class CreateTermsDto(BaseModel):
target_term: TermCreateByJobDto = Field(..., alias="targetTerm")
__properties = ["sourceTerm", "targetTerm"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> CreateTermsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> CreateTermsDto:
return None
if not isinstance(obj, dict):
- return CreateTermsDto.parse_obj(obj)
+ return CreateTermsDto.model_validate(obj)
- _obj = CreateTermsDto.parse_obj({
+ _obj = CreateTermsDto.model_validate({
"source_term": TermCreateByJobDto.from_dict(obj.get("sourceTerm")) if obj.get("sourceTerm") is not None else None,
"target_term": TermCreateByJobDto.from_dict(obj.get("targetTerm")) if obj.get("targetTerm") is not None else None
})
diff --git a/phrasetms_client/models/create_vendor_dto.py b/phrasetms_client/models/create_vendor_dto.py
index 347c72bb..786fdb01 100644
--- a/phrasetms_client/models/create_vendor_dto.py
+++ b/phrasetms_client/models/create_vendor_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.uid_reference import UidReference
class CreateVendorDto(BaseModel):
@@ -29,22 +29,18 @@ class CreateVendorDto(BaseModel):
vendor_token: StrictStr = Field(..., alias="vendorToken")
net_rate_scheme: Optional[UidReference] = Field(None, alias="netRateScheme")
price_list: Optional[UidReference] = Field(None, alias="priceList")
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- clients: Optional[conlist(UidReference)] = None
- domains: Optional[conlist(UidReference)] = None
- sub_domains: Optional[conlist(UidReference)] = Field(None, alias="subDomains")
- workflow_steps: Optional[conlist(UidReference)] = Field(None, alias="workflowSteps")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ clients: Optional[List[UidReference]] = None
+ domains: Optional[List[UidReference]] = None
+ sub_domains: Optional[List[UidReference]] = Field(None, alias="subDomains")
+ workflow_steps: Optional[List[UidReference]] = Field(None, alias="workflowSteps")
__properties = ["vendorToken", "netRateScheme", "priceList", "sourceLocales", "targetLocales", "clients", "domains", "subDomains", "workflowSteps"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> CreateVendorDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -104,9 +100,9 @@ def from_dict(cls, obj: dict) -> CreateVendorDto:
return None
if not isinstance(obj, dict):
- return CreateVendorDto.parse_obj(obj)
+ return CreateVendorDto.model_validate(obj)
- _obj = CreateVendorDto.parse_obj({
+ _obj = CreateVendorDto.model_validate({
"vendor_token": obj.get("vendorToken"),
"net_rate_scheme": UidReference.from_dict(obj.get("netRateScheme")) if obj.get("netRateScheme") is not None else None,
"price_list": UidReference.from_dict(obj.get("priceList")) if obj.get("priceList") is not None else None,
diff --git a/phrasetms_client/models/create_web_editor_link_dto_v2.py b/phrasetms_client/models/create_web_editor_link_dto_v2.py
index ce31c155..6a240db6 100644
--- a/phrasetms_client/models/create_web_editor_link_dto_v2.py
+++ b/phrasetms_client/models/create_web_editor_link_dto_v2.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class CreateWebEditorLinkDtoV2(BaseModel):
"""
CreateWebEditorLinkDtoV2
"""
- jobs: conlist(UidReference, max_items=2147483647, min_items=1) = Field(..., description="Maximum supported number of jobs is 260")
+ jobs: List[UidReference] = Field(..., description="Maximum supported number of jobs is 260")
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> CreateWebEditorLinkDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> CreateWebEditorLinkDtoV2:
return None
if not isinstance(obj, dict):
- return CreateWebEditorLinkDtoV2.parse_obj(obj)
+ return CreateWebEditorLinkDtoV2.model_validate(obj)
- _obj = CreateWebEditorLinkDtoV2.parse_obj({
+ _obj = CreateWebEditorLinkDtoV2.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/create_web_hook_dto.py b/phrasetms_client/models/create_web_hook_dto.py
index 912f6471..52087351 100644
--- a/phrasetms_client/models/create_web_hook_dto.py
+++ b/phrasetms_client/models/create_web_hook_dto.py
@@ -18,22 +18,32 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
class CreateWebHookDto(BaseModel):
"""
CreateWebHookDto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
url: StrictStr = Field(...)
- events: conlist(StrictStr) = Field(...)
- secret_token: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="secretToken")
+ events: List[StrictStr] = Field(...)
+ secret_token: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="secretToken")
hidden: Optional[StrictBool] = Field(None, description="Default: false")
status: Optional[StrictStr] = Field(None, description="Default: ENABLED")
__properties = ["name", "url", "events", "secretToken", "hidden", "status"]
- @validator('events')
+ @field_validator('events')
+ @classmethod
def events_validate_enum(cls, value):
"""Validates the enum"""
for i in value:
@@ -41,7 +51,8 @@ def events_validate_enum(cls, value):
raise ValueError("each list item must be one of ('JOB_STATUS_CHANGED', 'JOB_CREATED', 'JOB_DELETED', 'JOB_ASSIGNED', 'JOB_DUE_DATE_CHANGED', 'JOB_UPDATED', 'JOB_TARGET_UPDATED', 'JOB_EXPORTED', 'JOB_UNEXPORTED', 'PROJECT_CREATED', 'PROJECT_DELETED', 'PROJECT_STATUS_CHANGED', 'PROJECT_DUE_DATE_CHANGED', 'SHARED_PROJECT_ASSIGNED', 'PROJECT_METADATA_UPDATED', 'PRE_TRANSLATION_FINISHED', 'ANALYSIS_CREATED', 'CONTINUOUS_JOB_UPDATED', 'PROJECT_TEMPLATE_CREATED', 'PROJECT_TEMPLATE_UPDATED', 'PROJECT_TEMPLATE_DELETED')")
return value
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -51,14 +62,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ENABLED', 'DISABLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -71,7 +78,7 @@ def from_json(cls, json_str: str) -> CreateWebHookDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -84,9 +91,9 @@ def from_dict(cls, obj: dict) -> CreateWebHookDto:
return None
if not isinstance(obj, dict):
- return CreateWebHookDto.parse_obj(obj)
+ return CreateWebHookDto.model_validate(obj)
- _obj = CreateWebHookDto.parse_obj({
+ _obj = CreateWebHookDto.model_validate({
"name": obj.get("name"),
"url": obj.get("url"),
"events": obj.get("events"),
diff --git a/phrasetms_client/models/create_workflow_step_dto.py b/phrasetms_client/models/create_workflow_step_dto.py
index 93a2ff8f..5fbccf91 100644
--- a/phrasetms_client/models/create_workflow_step_dto.py
+++ b/phrasetms_client/models/create_workflow_step_dto.py
@@ -18,27 +18,24 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StringConstraints
class CreateWorkflowStepDto(BaseModel):
"""
CreateWorkflowStepDto
"""
- name: constr(strict=True, max_length=255, min_length=1) = Field(..., description="Name of the lqa workflow step")
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=1)] = Field(..., description="Name of the lqa workflow step")
order: Optional[StrictInt] = Field(None, description="Order value")
lqa_enabled: Optional[StrictBool] = Field(None, alias="lqaEnabled", description="Default: false")
- abbr: constr(strict=True, max_length=3, min_length=1) = Field(..., description="Abbreviation")
+ abbr: Annotated[str, StringConstraints(strict=True, max_length=3, min_length=1)] = Field(..., description="Abbreviation")
__properties = ["name", "order", "lqaEnabled", "abbr"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +48,7 @@ def from_json(cls, json_str: str) -> CreateWorkflowStepDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +61,9 @@ def from_dict(cls, obj: dict) -> CreateWorkflowStepDto:
return None
if not isinstance(obj, dict):
- return CreateWorkflowStepDto.parse_obj(obj)
+ return CreateWorkflowStepDto.model_validate(obj)
- _obj = CreateWorkflowStepDto.parse_obj({
+ _obj = CreateWorkflowStepDto.model_validate({
"name": obj.get("name"),
"order": obj.get("order"),
"lqa_enabled": obj.get("lqaEnabled"),
diff --git a/phrasetms_client/models/csv_settings_dto.py b/phrasetms_client/models/csv_settings_dto.py
index f8442a83..b6dd41b7 100644
--- a/phrasetms_client/models/csv_settings_dto.py
+++ b/phrasetms_client/models/csv_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class CsvSettingsDto(BaseModel):
"""
@@ -36,7 +36,8 @@ class CsvSettingsDto(BaseModel):
import_rows: Optional[StrictStr] = Field(None, alias="importRows")
__properties = ["delimiter", "delimiterType", "htmlSubFilter", "tagRegexp", "importColumns", "contextNoteColumns", "contextKeyColumn", "maxLenColumn", "importRows"]
- @validator('delimiter_type')
+ @field_validator('delimiter_type')
+ @classmethod
def delimiter_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -46,14 +47,10 @@ def delimiter_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('TAB', 'COMMA', 'SEMICOLON', 'OTHER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -66,7 +63,7 @@ def from_json(cls, json_str: str) -> CsvSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +76,9 @@ def from_dict(cls, obj: dict) -> CsvSettingsDto:
return None
if not isinstance(obj, dict):
- return CsvSettingsDto.parse_obj(obj)
+ return CsvSettingsDto.model_validate(obj)
- _obj = CsvSettingsDto.parse_obj({
+ _obj = CsvSettingsDto.model_validate({
"delimiter": obj.get("delimiter"),
"delimiter_type": obj.get("delimiterType"),
"html_sub_filter": obj.get("htmlSubFilter"),
diff --git a/phrasetms_client/models/custom_field_dto.py b/phrasetms_client/models/custom_field_dto.py
index 0a18a6aa..6a573742 100644
--- a/phrasetms_client/models/custom_field_dto.py
+++ b/phrasetms_client/models/custom_field_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.custom_field_options_truncated_dto import CustomFieldOptionsTruncatedDto
from phrasetms_client.models.user_reference import UserReference
@@ -30,7 +30,7 @@ class CustomFieldDto(BaseModel):
uid: Optional[StrictStr] = None
name: Optional[StrictStr] = None
type: Optional[StrictStr] = None
- allowed_entities: Optional[conlist(StrictStr)] = Field(None, alias="allowedEntities")
+ allowed_entities: Optional[List[StrictStr]] = Field(None, alias="allowedEntities")
options: Optional[CustomFieldOptionsTruncatedDto] = None
created_at: Optional[datetime] = Field(None, alias="createdAt")
created_by: Optional[UserReference] = Field(None, alias="createdBy")
@@ -41,7 +41,8 @@ class CustomFieldDto(BaseModel):
description: Optional[StrictStr] = None
__properties = ["uid", "name", "type", "allowedEntities", "options", "createdAt", "createdBy", "lastModified", "lastModifiedBy", "requiredFrom", "required", "description"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -51,7 +52,8 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('MULTI_SELECT', 'SINGLE_SELECT', 'STRING', 'NUMBER', 'URL', 'DATE')")
return value
- @validator('allowed_entities')
+ @field_validator('allowed_entities')
+ @classmethod
def allowed_entities_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -62,14 +64,10 @@ def allowed_entities_validate_enum(cls, value):
raise ValueError("each list item must be one of ('PROJECT')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -82,7 +80,7 @@ def from_json(cls, json_str: str) -> CustomFieldDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -104,9 +102,9 @@ def from_dict(cls, obj: dict) -> CustomFieldDto:
return None
if not isinstance(obj, dict):
- return CustomFieldDto.parse_obj(obj)
+ return CustomFieldDto.model_validate(obj)
- _obj = CustomFieldDto.parse_obj({
+ _obj = CustomFieldDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/custom_field_instance_api_dto.py b/phrasetms_client/models/custom_field_instance_api_dto.py
index e782b2c3..b6ca21e1 100644
--- a/phrasetms_client/models/custom_field_instance_api_dto.py
+++ b/phrasetms_client/models/custom_field_instance_api_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.uid_reference import UidReference
class CustomFieldInstanceApiDto(BaseModel):
@@ -27,18 +28,14 @@ class CustomFieldInstanceApiDto(BaseModel):
CustomFieldInstanceApiDto
"""
custom_field: Optional[UidReference] = Field(None, alias="customField")
- selected_options: Optional[conlist(UidReference)] = Field(None, alias="selectedOptions")
- value: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ selected_options: Optional[List[UidReference]] = Field(None, alias="selectedOptions")
+ value: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
__properties = ["customField", "selectedOptions", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +48,7 @@ def from_json(cls, json_str: str) -> CustomFieldInstanceApiDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +71,9 @@ def from_dict(cls, obj: dict) -> CustomFieldInstanceApiDto:
return None
if not isinstance(obj, dict):
- return CustomFieldInstanceApiDto.parse_obj(obj)
+ return CustomFieldInstanceApiDto.model_validate(obj)
- _obj = CustomFieldInstanceApiDto.parse_obj({
+ _obj = CustomFieldInstanceApiDto.model_validate({
"custom_field": UidReference.from_dict(obj.get("customField")) if obj.get("customField") is not None else None,
"selected_options": [UidReference.from_dict(_item) for _item in obj.get("selectedOptions")] if obj.get("selectedOptions") is not None else None,
"value": obj.get("value")
diff --git a/phrasetms_client/models/custom_field_instance_dto.py b/phrasetms_client/models/custom_field_instance_dto.py
index 385f2a13..5c4e6fcb 100644
--- a/phrasetms_client/models/custom_field_instance_dto.py
+++ b/phrasetms_client/models/custom_field_instance_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.custom_field_dto import CustomFieldDto
from phrasetms_client.models.custom_field_option_dto import CustomFieldOptionDto
from phrasetms_client.models.uid_reference import UidReference
@@ -30,7 +30,7 @@ class CustomFieldInstanceDto(BaseModel):
"""
uid: Optional[StrictStr] = None
custom_field: Optional[CustomFieldDto] = Field(None, alias="customField")
- selected_options: Optional[conlist(CustomFieldOptionDto)] = Field(None, alias="selectedOptions")
+ selected_options: Optional[List[CustomFieldOptionDto]] = Field(None, alias="selectedOptions")
value: Optional[StrictStr] = None
created_at: Optional[datetime] = Field(None, alias="createdAt")
created_by: Optional[UidReference] = Field(None, alias="createdBy")
@@ -38,14 +38,10 @@ class CustomFieldInstanceDto(BaseModel):
updated_by: Optional[UidReference] = Field(None, alias="updatedBy")
__properties = ["uid", "customField", "selectedOptions", "value", "createdAt", "createdBy", "updatedAt", "updatedBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +54,7 @@ def from_json(cls, json_str: str) -> CustomFieldInstanceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +83,9 @@ def from_dict(cls, obj: dict) -> CustomFieldInstanceDto:
return None
if not isinstance(obj, dict):
- return CustomFieldInstanceDto.parse_obj(obj)
+ return CustomFieldInstanceDto.model_validate(obj)
- _obj = CustomFieldInstanceDto.parse_obj({
+ _obj = CustomFieldInstanceDto.model_validate({
"uid": obj.get("uid"),
"custom_field": CustomFieldDto.from_dict(obj.get("customField")) if obj.get("customField") is not None else None,
"selected_options": [CustomFieldOptionDto.from_dict(_item) for _item in obj.get("selectedOptions")] if obj.get("selectedOptions") is not None else None,
diff --git a/phrasetms_client/models/custom_field_instances_dto.py b/phrasetms_client/models/custom_field_instances_dto.py
index 6b2a32ec..3f57b61e 100644
--- a/phrasetms_client/models/custom_field_instances_dto.py
+++ b/phrasetms_client/models/custom_field_instances_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.custom_field_instance_dto import CustomFieldInstanceDto
class CustomFieldInstancesDto(BaseModel):
"""
CustomFieldInstancesDto
"""
- custom_field_instances: Optional[conlist(CustomFieldInstanceDto)] = Field(None, alias="customFieldInstances")
+ custom_field_instances: Optional[List[CustomFieldInstanceDto]] = Field(None, alias="customFieldInstances")
__properties = ["customFieldInstances"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> CustomFieldInstancesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> CustomFieldInstancesDto:
return None
if not isinstance(obj, dict):
- return CustomFieldInstancesDto.parse_obj(obj)
+ return CustomFieldInstancesDto.model_validate(obj)
- _obj = CustomFieldInstancesDto.parse_obj({
+ _obj = CustomFieldInstancesDto.model_validate({
"custom_field_instances": [CustomFieldInstanceDto.from_dict(_item) for _item in obj.get("customFieldInstances")] if obj.get("customFieldInstances") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/custom_field_option_dto.py b/phrasetms_client/models/custom_field_option_dto.py
index 0782fbea..fd4c136c 100644
--- a/phrasetms_client/models/custom_field_option_dto.py
+++ b/phrasetms_client/models/custom_field_option_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class CustomFieldOptionDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class CustomFieldOptionDto(BaseModel):
value: Optional[StrictStr] = None
__properties = ["uid", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> CustomFieldOptionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> CustomFieldOptionDto:
return None
if not isinstance(obj, dict):
- return CustomFieldOptionDto.parse_obj(obj)
+ return CustomFieldOptionDto.model_validate(obj)
- _obj = CustomFieldOptionDto.parse_obj({
+ _obj = CustomFieldOptionDto.model_validate({
"uid": obj.get("uid"),
"value": obj.get("value")
})
diff --git a/phrasetms_client/models/custom_field_options_truncated_dto.py b/phrasetms_client/models/custom_field_options_truncated_dto.py
index 197ad55d..1bcf5ba7 100644
--- a/phrasetms_client/models/custom_field_options_truncated_dto.py
+++ b/phrasetms_client/models/custom_field_options_truncated_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.custom_field_option_dto import CustomFieldOptionDto
class CustomFieldOptionsTruncatedDto(BaseModel):
"""
CustomFieldOptionsTruncatedDto
"""
- truncated_options: Optional[conlist(CustomFieldOptionDto)] = Field(None, alias="truncatedOptions", description="Truncated list of options with size 5. To get all options use endpoint for getting options of the specific field")
+ truncated_options: Optional[List[CustomFieldOptionDto]] = Field(None, alias="truncatedOptions", description="Truncated list of options with size 5. To get all options use endpoint for getting options of the specific field")
remaining_count: Optional[StrictInt] = Field(None, alias="remainingCount")
__properties = ["truncatedOptions", "remainingCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> CustomFieldOptionsTruncatedDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> CustomFieldOptionsTruncatedDto:
return None
if not isinstance(obj, dict):
- return CustomFieldOptionsTruncatedDto.parse_obj(obj)
+ return CustomFieldOptionsTruncatedDto.model_validate(obj)
- _obj = CustomFieldOptionsTruncatedDto.parse_obj({
+ _obj = CustomFieldOptionsTruncatedDto.model_validate({
"truncated_options": [CustomFieldOptionDto.from_dict(_item) for _item in obj.get("truncatedOptions")] if obj.get("truncatedOptions") is not None else None,
"remaining_count": obj.get("remainingCount")
})
diff --git a/phrasetms_client/models/custom_file_type_dto.py b/phrasetms_client/models/custom_file_type_dto.py
index 0eea26e6..c38d8d07 100644
--- a/phrasetms_client/models/custom_file_type_dto.py
+++ b/phrasetms_client/models/custom_file_type_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.file_import_settings_dto import FileImportSettingsDto
from phrasetms_client.models.user_reference import UserReference
@@ -36,14 +36,10 @@ class CustomFileTypeDto(BaseModel):
file_import_settings: Optional[FileImportSettingsDto] = Field(None, alias="fileImportSettings")
__properties = ["uid", "name", "filenamePattern", "type", "createdBy", "dateCreated", "fileImportSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> CustomFileTypeDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> CustomFileTypeDto:
return None
if not isinstance(obj, dict):
- return CustomFileTypeDto.parse_obj(obj)
+ return CustomFileTypeDto.model_validate(obj)
- _obj = CustomFileTypeDto.parse_obj({
+ _obj = CustomFileTypeDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"filename_pattern": obj.get("filenamePattern"),
diff --git a/phrasetms_client/models/custom_qa_warning_dto.py b/phrasetms_client/models/custom_qa_warning_dto.py
index db545f8c..da84e5c1 100644
--- a/phrasetms_client/models/custom_qa_warning_dto.py
+++ b/phrasetms_client/models/custom_qa_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -33,14 +33,10 @@ class CustomQAWarningDto(SegmentWarning):
tgt_position: Optional[Position] = Field(None, alias="tgtPosition")
__properties = ["id", "ignored", "type", "repetitionGroupId", "message", "subType", "srcPosition", "tgtPosition"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> CustomQAWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> CustomQAWarningDto:
return None
if not isinstance(obj, dict):
- return CustomQAWarningDto.parse_obj(obj)
+ return CustomQAWarningDto.model_validate(obj)
- _obj = CustomQAWarningDto.parse_obj({
+ _obj = CustomQAWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/custom_qa_warning_dto_all_of.py b/phrasetms_client/models/custom_qa_warning_dto_all_of.py
index 193a8ec5..83183e56 100644
--- a/phrasetms_client/models/custom_qa_warning_dto_all_of.py
+++ b/phrasetms_client/models/custom_qa_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
class CustomQAWarningDtoAllOf(BaseModel):
@@ -32,14 +32,10 @@ class CustomQAWarningDtoAllOf(BaseModel):
tgt_position: Optional[Position] = Field(None, alias="tgtPosition")
__properties = ["message", "subType", "srcPosition", "tgtPosition"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> CustomQAWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> CustomQAWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return CustomQAWarningDtoAllOf.parse_obj(obj)
+ return CustomQAWarningDtoAllOf.model_validate(obj)
- _obj = CustomQAWarningDtoAllOf.parse_obj({
+ _obj = CustomQAWarningDtoAllOf.model_validate({
"message": obj.get("message"),
"sub_type": obj.get("subType"),
"src_position": Position.from_dict(obj.get("srcPosition")) if obj.get("srcPosition") is not None else None,
diff --git a/phrasetms_client/models/data_dto.py b/phrasetms_client/models/data_dto.py
index caab3d12..79675ece 100644
--- a/phrasetms_client/models/data_dto.py
+++ b/phrasetms_client/models/data_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.counts_dto import CountsDto
from phrasetms_client.models.match_counts101_dto import MatchCounts101Dto
from phrasetms_client.models.match_counts_dto import MatchCountsDto
@@ -39,14 +39,10 @@ class DataDto(BaseModel):
internal_fuzzy_matches: Optional[MatchCountsDto] = Field(None, alias="internalFuzzyMatches")
__properties = ["available", "estimate", "all", "repetitions", "transMemoryMatches", "machineTranslationMatches", "nonTranslatablesMatches", "internalFuzzyMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +55,7 @@ def from_json(cls, json_str: str) -> DataDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -90,9 +86,9 @@ def from_dict(cls, obj: dict) -> DataDto:
return None
if not isinstance(obj, dict):
- return DataDto.parse_obj(obj)
+ return DataDto.model_validate(obj)
- _obj = DataDto.parse_obj({
+ _obj = DataDto.model_validate({
"available": obj.get("available"),
"estimate": obj.get("estimate"),
"all": CountsDto.from_dict(obj.get("all")) if obj.get("all") is not None else None,
diff --git a/phrasetms_client/models/data_dto_v1.py b/phrasetms_client/models/data_dto_v1.py
index cdbddb7a..d02883af 100644
--- a/phrasetms_client/models/data_dto_v1.py
+++ b/phrasetms_client/models/data_dto_v1.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.counts_dto import CountsDto
from phrasetms_client.models.match_counts101_dto import MatchCounts101Dto
from phrasetms_client.models.match_counts_dto import MatchCountsDto
@@ -38,14 +38,10 @@ class DataDtoV1(BaseModel):
internal_fuzzy_matches: Optional[MatchCountsDto] = Field(None, alias="internalFuzzyMatches")
__properties = ["available", "all", "repetitions", "transMemoryMatches", "machineTranslationMatches", "nonTranslatablesMatches", "internalFuzzyMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +54,7 @@ def from_json(cls, json_str: str) -> DataDtoV1:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> DataDtoV1:
return None
if not isinstance(obj, dict):
- return DataDtoV1.parse_obj(obj)
+ return DataDtoV1.model_validate(obj)
- _obj = DataDtoV1.parse_obj({
+ _obj = DataDtoV1.model_validate({
"available": obj.get("available"),
"all": CountsDto.from_dict(obj.get("all")) if obj.get("all") is not None else None,
"repetitions": CountsDto.from_dict(obj.get("repetitions")) if obj.get("repetitions") is not None else None,
diff --git a/phrasetms_client/models/delete_custom_file_type_dto.py b/phrasetms_client/models/delete_custom_file_type_dto.py
index fba54582..a239aae5 100644
--- a/phrasetms_client/models/delete_custom_file_type_dto.py
+++ b/phrasetms_client/models/delete_custom_file_type_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class DeleteCustomFileTypeDto(BaseModel):
"""
DeleteCustomFileTypeDto
"""
- custom_file_types: conlist(UidReference) = Field(..., alias="customFileTypes")
+ custom_file_types: List[UidReference] = Field(..., alias="customFileTypes")
__properties = ["customFileTypes"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> DeleteCustomFileTypeDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> DeleteCustomFileTypeDto:
return None
if not isinstance(obj, dict):
- return DeleteCustomFileTypeDto.parse_obj(obj)
+ return DeleteCustomFileTypeDto.model_validate(obj)
- _obj = DeleteCustomFileTypeDto.parse_obj({
+ _obj = DeleteCustomFileTypeDto.model_validate({
"custom_file_types": [UidReference.from_dict(_item) for _item in obj.get("customFileTypes")] if obj.get("customFileTypes") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/design_weights_dto.py b/phrasetms_client/models/design_weights_dto.py
index 706556fe..86fd1323 100644
--- a/phrasetms_client/models/design_weights_dto.py
+++ b/phrasetms_client/models/design_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class DesignWeightsDto(BaseModel):
@@ -34,14 +34,10 @@ class DesignWeightsDto(BaseModel):
truncation: Optional[ToggleableWeightDto] = None
__properties = ["design", "length", "localFormatting", "markup", "missingText", "truncation"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> DesignWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -85,9 +81,9 @@ def from_dict(cls, obj: dict) -> DesignWeightsDto:
return None
if not isinstance(obj, dict):
- return DesignWeightsDto.parse_obj(obj)
+ return DesignWeightsDto.model_validate(obj)
- _obj = DesignWeightsDto.parse_obj({
+ _obj = DesignWeightsDto.model_validate({
"design": ToggleableWeightDto.from_dict(obj.get("design")) if obj.get("design") is not None else None,
"length": ToggleableWeightDto.from_dict(obj.get("length")) if obj.get("length") is not None else None,
"local_formatting": ToggleableWeightDto.from_dict(obj.get("localFormatting")) if obj.get("localFormatting") is not None else None,
diff --git a/phrasetms_client/models/dictionary_item_dto.py b/phrasetms_client/models/dictionary_item_dto.py
index 2c158c4d..021e5769 100644
--- a/phrasetms_client/models/dictionary_item_dto.py
+++ b/phrasetms_client/models/dictionary_item_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class DictionaryItemDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class DictionaryItemDto(BaseModel):
word: StrictStr = Field(...)
__properties = ["lang", "word"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> DictionaryItemDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> DictionaryItemDto:
return None
if not isinstance(obj, dict):
- return DictionaryItemDto.parse_obj(obj)
+ return DictionaryItemDto.model_validate(obj)
- _obj = DictionaryItemDto.parse_obj({
+ _obj = DictionaryItemDto.model_validate({
"lang": obj.get("lang"),
"word": obj.get("word")
})
diff --git a/phrasetms_client/models/discount_scheme_create_dto.py b/phrasetms_client/models/discount_scheme_create_dto.py
index 849266fc..be42d5c8 100644
--- a/phrasetms_client/models/discount_scheme_create_dto.py
+++ b/phrasetms_client/models/discount_scheme_create_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.discount_settings_dto import DiscountSettingsDto
from phrasetms_client.models.net_rate_scheme_workflow_step_create import NetRateSchemeWorkflowStepCreate
@@ -27,19 +28,15 @@ class DiscountSchemeCreateDto(BaseModel):
"""
DiscountSchemeCreateDto
"""
- name: constr(strict=True, max_length=255, min_length=1) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=1)] = Field(...)
rates: Optional[DiscountSettingsDto] = None
- workflow_step_net_schemes: Optional[conlist(NetRateSchemeWorkflowStepCreate)] = Field(None, alias="workflowStepNetSchemes")
+ workflow_step_net_schemes: Optional[List[NetRateSchemeWorkflowStepCreate]] = Field(None, alias="workflowStepNetSchemes")
__properties = ["name", "rates", "workflowStepNetSchemes"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +49,7 @@ def from_json(cls, json_str: str) -> DiscountSchemeCreateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +72,9 @@ def from_dict(cls, obj: dict) -> DiscountSchemeCreateDto:
return None
if not isinstance(obj, dict):
- return DiscountSchemeCreateDto.parse_obj(obj)
+ return DiscountSchemeCreateDto.model_validate(obj)
- _obj = DiscountSchemeCreateDto.parse_obj({
+ _obj = DiscountSchemeCreateDto.model_validate({
"name": obj.get("name"),
"rates": DiscountSettingsDto.from_dict(obj.get("rates")) if obj.get("rates") is not None else None,
"workflow_step_net_schemes": [NetRateSchemeWorkflowStepCreate.from_dict(_item) for _item in obj.get("workflowStepNetSchemes")] if obj.get("workflowStepNetSchemes") is not None else None
diff --git a/phrasetms_client/models/discount_scheme_reference.py b/phrasetms_client/models/discount_scheme_reference.py
index 45372a14..4a1373d6 100644
--- a/phrasetms_client/models/discount_scheme_reference.py
+++ b/phrasetms_client/models/discount_scheme_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class DiscountSchemeReference(BaseModel):
@@ -33,14 +33,10 @@ class DiscountSchemeReference(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "dateCreated", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> DiscountSchemeReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> DiscountSchemeReference:
return None
if not isinstance(obj, dict):
- return DiscountSchemeReference.parse_obj(obj)
+ return DiscountSchemeReference.model_validate(obj)
- _obj = DiscountSchemeReference.parse_obj({
+ _obj = DiscountSchemeReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/discount_settings_dto.py b/phrasetms_client/models/discount_settings_dto.py
index 91820666..061e6416 100644
--- a/phrasetms_client/models/discount_settings_dto.py
+++ b/phrasetms_client/models/discount_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, StrictFloat, StrictInt
+from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
class DiscountSettingsDto(BaseModel):
"""
@@ -53,14 +53,10 @@ class DiscountSettingsDto(BaseModel):
if0: Optional[Union[StrictFloat, StrictInt]] = None
__properties = ["repetition", "tm101", "tm100", "tm95", "tm85", "tm75", "tm50", "tm0", "mt100", "mt95", "mt85", "mt75", "mt50", "mt0", "nt100", "nt99", "nt85", "nt75", "nt50", "nt0", "if100", "if95", "if85", "if75", "if50", "if0"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -73,7 +69,7 @@ def from_json(cls, json_str: str) -> DiscountSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -86,9 +82,9 @@ def from_dict(cls, obj: dict) -> DiscountSettingsDto:
return None
if not isinstance(obj, dict):
- return DiscountSettingsDto.parse_obj(obj)
+ return DiscountSettingsDto.model_validate(obj)
- _obj = DiscountSettingsDto.parse_obj({
+ _obj = DiscountSettingsDto.model_validate({
"repetition": obj.get("repetition"),
"tm101": obj.get("tm101"),
"tm100": obj.get("tm100"),
diff --git a/phrasetms_client/models/dita_settings_dto.py b/phrasetms_client/models/dita_settings_dto.py
index 140d78c4..b6d6b404 100644
--- a/phrasetms_client/models/dita_settings_dto.py
+++ b/phrasetms_client/models/dita_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class DitaSettingsDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class DitaSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["includeTags", "excludeTags", "inlineTags", "inlineTagsNonTranslatable", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> DitaSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> DitaSettingsDto:
return None
if not isinstance(obj, dict):
- return DitaSettingsDto.parse_obj(obj)
+ return DitaSettingsDto.model_validate(obj)
- _obj = DitaSettingsDto.parse_obj({
+ _obj = DitaSettingsDto.model_validate({
"include_tags": obj.get("includeTags"),
"exclude_tags": obj.get("excludeTags"),
"inline_tags": obj.get("inlineTags"),
diff --git a/phrasetms_client/models/doc_book_settings_dto.py b/phrasetms_client/models/doc_book_settings_dto.py
index d245a6b6..7c6473b6 100644
--- a/phrasetms_client/models/doc_book_settings_dto.py
+++ b/phrasetms_client/models/doc_book_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class DocBookSettingsDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class DocBookSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["includeTags", "excludeTags", "inlineTags", "inlineTagsNonTranslatable", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> DocBookSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> DocBookSettingsDto:
return None
if not isinstance(obj, dict):
- return DocBookSettingsDto.parse_obj(obj)
+ return DocBookSettingsDto.model_validate(obj)
- _obj = DocBookSettingsDto.parse_obj({
+ _obj = DocBookSettingsDto.model_validate({
"include_tags": obj.get("includeTags"),
"exclude_tags": obj.get("excludeTags"),
"inline_tags": obj.get("inlineTags"),
diff --git a/phrasetms_client/models/doc_settings_dto.py b/phrasetms_client/models/doc_settings_dto.py
index bbd55a81..ffbea478 100644
--- a/phrasetms_client/models/doc_settings_dto.py
+++ b/phrasetms_client/models/doc_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class DocSettingsDto(BaseModel):
"""
@@ -37,14 +37,10 @@ class DocSettingsDto(BaseModel):
header_footer: Optional[StrictBool] = Field(None, alias="headerFooter", description="Default: true")
__properties = ["comments", "index", "other", "tagRegexp", "hyperlinkTarget", "joinSimilarRuns", "targetFont", "properties", "hidden", "headerFooter"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> DocSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> DocSettingsDto:
return None
if not isinstance(obj, dict):
- return DocSettingsDto.parse_obj(obj)
+ return DocSettingsDto.model_validate(obj)
- _obj = DocSettingsDto.parse_obj({
+ _obj = DocSettingsDto.model_validate({
"comments": obj.get("comments"),
"index": obj.get("index"),
"other": obj.get("other"),
diff --git a/phrasetms_client/models/domain_dto.py b/phrasetms_client/models/domain_dto.py
index b2f8d2b3..988c1d21 100644
--- a/phrasetms_client/models/domain_dto.py
+++ b/phrasetms_client/models/domain_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class DomainDto(BaseModel):
@@ -32,14 +32,10 @@ class DomainDto(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> DomainDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> DomainDto:
return None
if not isinstance(obj, dict):
- return DomainDto.parse_obj(obj)
+ return DomainDto.model_validate(obj)
- _obj = DomainDto.parse_obj({
+ _obj = DomainDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/domain_edit_dto.py b/phrasetms_client/models/domain_edit_dto.py
index fa28170d..a1f2f8b8 100644
--- a/phrasetms_client/models/domain_edit_dto.py
+++ b/phrasetms_client/models/domain_edit_dto.py
@@ -18,24 +18,21 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, constr
+from pydantic import BaseModel, ConfigDict, StringConstraints
class DomainEditDto(BaseModel):
"""
DomainEditDto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
__properties = ["name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +45,7 @@ def from_json(cls, json_str: str) -> DomainEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +58,9 @@ def from_dict(cls, obj: dict) -> DomainEditDto:
return None
if not isinstance(obj, dict):
- return DomainEditDto.parse_obj(obj)
+ return DomainEditDto.model_validate(obj)
- _obj = DomainEditDto.parse_obj({
+ _obj = DomainEditDto.model_validate({
"name": obj.get("name")
})
return _obj
diff --git a/phrasetms_client/models/domain_reference.py b/phrasetms_client/models/domain_reference.py
index d911353d..a7c9a38d 100644
--- a/phrasetms_client/models/domain_reference.py
+++ b/phrasetms_client/models/domain_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class DomainReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class DomainReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["name", "id", "uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> DomainReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> DomainReference:
return None
if not isinstance(obj, dict):
- return DomainReference.parse_obj(obj)
+ return DomainReference.model_validate(obj)
- _obj = DomainReference.parse_obj({
+ _obj = DomainReference.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"uid": obj.get("uid")
diff --git a/phrasetms_client/models/edit_analyse_settings_dto.py b/phrasetms_client/models/edit_analyse_settings_dto.py
index bfbfec4f..aa44af1e 100644
--- a/phrasetms_client/models/edit_analyse_settings_dto.py
+++ b/phrasetms_client/models/edit_analyse_settings_dto.py
@@ -18,8 +18,17 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
class EditAnalyseSettingsDto(BaseModel):
"""
@@ -38,13 +47,14 @@ class EditAnalyseSettingsDto(BaseModel):
machine_translate_post_editing: Optional[StrictBool] = Field(None, alias="machineTranslatePostEditing", description="Default: false")
count_source_units: Optional[StrictBool] = Field(None, alias="countSourceUnits", description="Default: false")
include_trans_memory: Optional[StrictBool] = Field(None, alias="includeTransMemory", description="Default: false")
- naming_pattern: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="namingPattern")
+ naming_pattern: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="namingPattern")
analyze_by_language: Optional[StrictBool] = Field(None, alias="analyzeByLanguage", description="Mutually exclusive with analyzeByProvider. Default: false")
analyze_by_provider: Optional[StrictBool] = Field(None, alias="analyzeByProvider", description="Mutually exclusive with analyzeByLanguage. Default: true")
allow_automatic_post_analysis: Optional[StrictBool] = Field(None, alias="allowAutomaticPostAnalysis", description="Default: false")
__properties = ["type", "includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeNonTranslatables", "includeMachineTranslationMatches", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing", "countSourceUnits", "includeTransMemory", "namingPattern", "analyzeByLanguage", "analyzeByProvider", "allowAutomaticPostAnalysis"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -54,14 +64,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PreAnalyse', 'PostAnalyse', 'PreAnalyseTarget', 'Compare')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -74,7 +80,7 @@ def from_json(cls, json_str: str) -> EditAnalyseSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +93,9 @@ def from_dict(cls, obj: dict) -> EditAnalyseSettingsDto:
return None
if not isinstance(obj, dict):
- return EditAnalyseSettingsDto.parse_obj(obj)
+ return EditAnalyseSettingsDto.model_validate(obj)
- _obj = EditAnalyseSettingsDto.parse_obj({
+ _obj = EditAnalyseSettingsDto.model_validate({
"type": obj.get("type"),
"include_fuzzy_repetitions": obj.get("includeFuzzyRepetitions"),
"separate_fuzzy_repetitions": obj.get("separateFuzzyRepetitions"),
diff --git a/phrasetms_client/models/edit_analyse_v2_dto.py b/phrasetms_client/models/edit_analyse_v2_dto.py
index 575b9904..bc78c254 100644
--- a/phrasetms_client/models/edit_analyse_v2_dto.py
+++ b/phrasetms_client/models/edit_analyse_v2_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.uid_reference import UidReference
@@ -27,19 +28,15 @@ class EditAnalyseV2Dto(BaseModel):
"""
EditAnalyseV2Dto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
provider: Optional[ProviderReference] = None
net_rate_scheme: Optional[UidReference] = Field(None, alias="netRateScheme")
__properties = ["name", "provider", "netRateScheme"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +49,7 @@ def from_json(cls, json_str: str) -> EditAnalyseV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +68,9 @@ def from_dict(cls, obj: dict) -> EditAnalyseV2Dto:
return None
if not isinstance(obj, dict):
- return EditAnalyseV2Dto.parse_obj(obj)
+ return EditAnalyseV2Dto.model_validate(obj)
- _obj = EditAnalyseV2Dto.parse_obj({
+ _obj = EditAnalyseV2Dto.model_validate({
"name": obj.get("name"),
"provider": ProviderReference.from_dict(obj.get("provider")) if obj.get("provider") is not None else None,
"net_rate_scheme": UidReference.from_dict(obj.get("netRateScheme")) if obj.get("netRateScheme") is not None else None
diff --git a/phrasetms_client/models/edit_lqa_conversation_dto.py b/phrasetms_client/models/edit_lqa_conversation_dto.py
index 9611b655..48d2a0aa 100644
--- a/phrasetms_client/models/edit_lqa_conversation_dto.py
+++ b/phrasetms_client/models/edit_lqa_conversation_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.lqa_reference import LQAReference
from phrasetms_client.models.reference_correlation import ReferenceCorrelation
@@ -28,12 +28,13 @@ class EditLqaConversationDto(BaseModel):
EditLqaConversationDto
"""
lqa_description: Optional[StrictStr] = Field(None, alias="lqaDescription")
- lqa: conlist(LQAReference) = Field(...)
+ lqa: List[LQAReference] = Field(...)
status: Optional[StrictStr] = None
correlation: Optional[ReferenceCorrelation] = None
__properties = ["lqaDescription", "lqa", "status", "correlation"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -43,14 +44,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('resolved', 'unresolved')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +60,7 @@ def from_json(cls, json_str: str) -> EditLqaConversationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -86,9 +83,9 @@ def from_dict(cls, obj: dict) -> EditLqaConversationDto:
return None
if not isinstance(obj, dict):
- return EditLqaConversationDto.parse_obj(obj)
+ return EditLqaConversationDto.model_validate(obj)
- _obj = EditLqaConversationDto.parse_obj({
+ _obj = EditLqaConversationDto.model_validate({
"lqa_description": obj.get("lqaDescription"),
"lqa": [LQAReference.from_dict(_item) for _item in obj.get("lqa")] if obj.get("lqa") is not None else None,
"status": obj.get("status"),
diff --git a/phrasetms_client/models/edit_plain_conversation_dto.py b/phrasetms_client/models/edit_plain_conversation_dto.py
index 4b6d58c5..43f8cb5f 100644
--- a/phrasetms_client/models/edit_plain_conversation_dto.py
+++ b/phrasetms_client/models/edit_plain_conversation_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr, validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.reference_correlation import ReferenceCorrelation
class EditPlainConversationDto(BaseModel):
@@ -30,7 +30,8 @@ class EditPlainConversationDto(BaseModel):
correlation: Optional[ReferenceCorrelation] = None
__properties = ["status", "correlation"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -40,14 +41,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('resolved', 'unresolved')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +57,7 @@ def from_json(cls, json_str: str) -> EditPlainConversationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +73,9 @@ def from_dict(cls, obj: dict) -> EditPlainConversationDto:
return None
if not isinstance(obj, dict):
- return EditPlainConversationDto.parse_obj(obj)
+ return EditPlainConversationDto.model_validate(obj)
- _obj = EditPlainConversationDto.parse_obj({
+ _obj = EditPlainConversationDto.model_validate({
"status": obj.get("status"),
"correlation": ReferenceCorrelation.from_dict(obj.get("correlation")) if obj.get("correlation") is not None else None
})
diff --git a/phrasetms_client/models/edit_project_mt_sett_per_lang_dto.py b/phrasetms_client/models/edit_project_mt_sett_per_lang_dto.py
index 307c4e25..ac0718a0 100644
--- a/phrasetms_client/models/edit_project_mt_sett_per_lang_dto.py
+++ b/phrasetms_client/models/edit_project_mt_sett_per_lang_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.id_reference import IdReference
class EditProjectMTSettPerLangDto(BaseModel):
@@ -30,14 +30,10 @@ class EditProjectMTSettPerLangDto(BaseModel):
machine_translate_settings: Optional[IdReference] = Field(None, alias="machineTranslateSettings")
__properties = ["targetLang", "machineTranslateSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> EditProjectMTSettPerLangDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> EditProjectMTSettPerLangDto:
return None
if not isinstance(obj, dict):
- return EditProjectMTSettPerLangDto.parse_obj(obj)
+ return EditProjectMTSettPerLangDto.model_validate(obj)
- _obj = EditProjectMTSettPerLangDto.parse_obj({
+ _obj = EditProjectMTSettPerLangDto.model_validate({
"target_lang": obj.get("targetLang"),
"machine_translate_settings": IdReference.from_dict(obj.get("machineTranslateSettings")) if obj.get("machineTranslateSettings") is not None else None
})
diff --git a/phrasetms_client/models/edit_project_mt_sett_per_lang_list_dto.py b/phrasetms_client/models/edit_project_mt_sett_per_lang_list_dto.py
index 1d7c1ccd..736a736c 100644
--- a/phrasetms_client/models/edit_project_mt_sett_per_lang_list_dto.py
+++ b/phrasetms_client/models/edit_project_mt_sett_per_lang_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.edit_project_mt_sett_per_lang_dto import EditProjectMTSettPerLangDto
class EditProjectMTSettPerLangListDto(BaseModel):
"""
EditProjectMTSettPerLangListDto
"""
- mt_settings_per_lang_list: Optional[conlist(EditProjectMTSettPerLangDto)] = Field(None, alias="mtSettingsPerLangList")
+ mt_settings_per_lang_list: Optional[List[EditProjectMTSettPerLangDto]] = Field(None, alias="mtSettingsPerLangList")
__properties = ["mtSettingsPerLangList"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> EditProjectMTSettPerLangListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> EditProjectMTSettPerLangListDto:
return None
if not isinstance(obj, dict):
- return EditProjectMTSettPerLangListDto.parse_obj(obj)
+ return EditProjectMTSettPerLangListDto.model_validate(obj)
- _obj = EditProjectMTSettPerLangListDto.parse_obj({
+ _obj = EditProjectMTSettPerLangListDto.model_validate({
"mt_settings_per_lang_list": [EditProjectMTSettPerLangDto.from_dict(_item) for _item in obj.get("mtSettingsPerLangList")] if obj.get("mtSettingsPerLangList") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/edit_project_mt_settings_dto.py b/phrasetms_client/models/edit_project_mt_settings_dto.py
index e8d2baf5..8dd7d87b 100644
--- a/phrasetms_client/models/edit_project_mt_settings_dto.py
+++ b/phrasetms_client/models/edit_project_mt_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class EditProjectMTSettingsDto(BaseModel):
@@ -29,14 +29,10 @@ class EditProjectMTSettingsDto(BaseModel):
machine_translate_settings: Optional[IdReference] = Field(None, alias="machineTranslateSettings")
__properties = ["machineTranslateSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> EditProjectMTSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> EditProjectMTSettingsDto:
return None
if not isinstance(obj, dict):
- return EditProjectMTSettingsDto.parse_obj(obj)
+ return EditProjectMTSettingsDto.model_validate(obj)
- _obj = EditProjectMTSettingsDto.parse_obj({
+ _obj = EditProjectMTSettingsDto.model_validate({
"machine_translate_settings": IdReference.from_dict(obj.get("machineTranslateSettings")) if obj.get("machineTranslateSettings") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/edit_project_security_settings_dto_v2.py b/phrasetms_client/models/edit_project_security_settings_dto_v2.py
index b63354b0..e513cdf2 100644
--- a/phrasetms_client/models/edit_project_security_settings_dto_v2.py
+++ b/phrasetms_client/models/edit_project_security_settings_dto_v2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.vendor_security_settings_dto import VendorSecuritySettingsDto
class EditProjectSecuritySettingsDtoV2(BaseModel):
@@ -44,17 +44,13 @@ class EditProjectSecuritySettingsDtoV2(BaseModel):
trigger_webhooks: Optional[StrictBool] = Field(None, alias="triggerWebhooks", description="Default: `true`")
notify_job_owner_status_changed: Optional[StrictBool] = Field(None, alias="notifyJobOwnerStatusChanged", description="Default: `false`")
vendors: Optional[VendorSecuritySettingsDto] = None
- allowed_domains: Optional[conlist(StrictStr)] = Field(None, alias="allowedDomains")
+ allowed_domains: Optional[List[StrictStr]] = Field(None, alias="allowedDomains")
__properties = ["downloadEnabled", "webEditorEnabledForLinguists", "showUserDataToLinguists", "emailNotifications", "strictWorkflowFinish", "useVendors", "linguistsMayEditLockedSegments", "usersMaySetAutoPropagation", "allowLoadingExternalContentInEditors", "allowLoadingIframes", "linguistsMayEditSource", "linguistsMayEditTagContent", "linguistsMayDownloadLqaReport", "usernamesDisplayedInLqaReport", "userMaySetInstantQA", "triggerWebhooks", "notifyJobOwnerStatusChanged", "vendors", "allowedDomains"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +63,7 @@ def from_json(cls, json_str: str) -> EditProjectSecuritySettingsDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -83,9 +79,9 @@ def from_dict(cls, obj: dict) -> EditProjectSecuritySettingsDtoV2:
return None
if not isinstance(obj, dict):
- return EditProjectSecuritySettingsDtoV2.parse_obj(obj)
+ return EditProjectSecuritySettingsDtoV2.model_validate(obj)
- _obj = EditProjectSecuritySettingsDtoV2.parse_obj({
+ _obj = EditProjectSecuritySettingsDtoV2.model_validate({
"download_enabled": obj.get("downloadEnabled"),
"web_editor_enabled_for_linguists": obj.get("webEditorEnabledForLinguists"),
"show_user_data_to_linguists": obj.get("showUserDataToLinguists"),
diff --git a/phrasetms_client/models/edit_project_v2_dto.py b/phrasetms_client/models/edit_project_v2_dto.py
index 9d74d210..4897ce7c 100644
--- a/phrasetms_client/models/edit_project_v2_dto.py
+++ b/phrasetms_client/models/edit_project_v2_dto.py
@@ -18,8 +18,17 @@
import json
from datetime import datetime
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
from phrasetms_client.models.custom_field_instance_api_dto import CustomFieldInstanceApiDto
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.lqa_profiles_for_ws_v2_dto import LqaProfilesForWsV2Dto
@@ -28,23 +37,24 @@ class EditProjectV2Dto(BaseModel):
"""
EditProjectV2Dto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
status: Optional[StrictStr] = None
client: Optional[IdReference] = None
business_unit: Optional[IdReference] = Field(None, alias="businessUnit")
domain: Optional[IdReference] = None
sub_domain: Optional[IdReference] = Field(None, alias="subDomain")
owner: Optional[IdReference] = None
- purchase_order: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="purchaseOrder")
+ purchase_order: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="purchaseOrder")
date_due: Optional[datetime] = Field(None, alias="dateDue")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
file_handover: Optional[StrictBool] = Field(None, alias="fileHandover", description="Default: false")
- lqa_profiles: Optional[conlist(LqaProfilesForWsV2Dto)] = Field(None, alias="lqaProfiles", description="Lqa profiles that will be added to workflow steps")
+ lqa_profiles: Optional[List[LqaProfilesForWsV2Dto]] = Field(None, alias="lqaProfiles", description="Lqa profiles that will be added to workflow steps")
archived: Optional[StrictBool] = Field(None, description="Default: false")
- custom_fields: Optional[conlist(CustomFieldInstanceApiDto)] = Field(None, alias="customFields", description="Custom fields for project")
+ custom_fields: Optional[List[CustomFieldInstanceApiDto]] = Field(None, alias="customFields", description="Custom fields for project")
__properties = ["name", "status", "client", "businessUnit", "domain", "subDomain", "owner", "purchaseOrder", "dateDue", "note", "fileHandover", "lqaProfiles", "archived", "customFields"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -54,14 +64,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ASSIGNED', 'COMPLETED', 'ACCEPTED_BY_VENDOR', 'DECLINED_BY_VENDOR', 'COMPLETED_BY_VENDOR', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -74,7 +80,7 @@ def from_json(cls, json_str: str) -> EditProjectV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -116,9 +122,9 @@ def from_dict(cls, obj: dict) -> EditProjectV2Dto:
return None
if not isinstance(obj, dict):
- return EditProjectV2Dto.parse_obj(obj)
+ return EditProjectV2Dto.model_validate(obj)
- _obj = EditProjectV2Dto.parse_obj({
+ _obj = EditProjectV2Dto.model_validate({
"name": obj.get("name"),
"status": obj.get("status"),
"client": IdReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
diff --git a/phrasetms_client/models/edit_qa_settings_dto_v2.py b/phrasetms_client/models/edit_qa_settings_dto_v2.py
index 7150a0c1..f076e4ba 100644
--- a/phrasetms_client/models/edit_qa_settings_dto_v2.py
+++ b/phrasetms_client/models/edit_qa_settings_dto_v2.py
@@ -19,23 +19,19 @@
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
class EditQASettingsDtoV2(BaseModel):
"""
EditQASettingsDtoV2
"""
- checks: Optional[conlist(Dict[str, Dict[str, Any]])] = Field(None, description="checks")
+ checks: Optional[List[Dict[str, Dict[str, Any]]]] = Field(None, description="checks")
__properties = ["checks"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> EditQASettingsDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> EditQASettingsDtoV2:
return None
if not isinstance(obj, dict):
- return EditQASettingsDtoV2.parse_obj(obj)
+ return EditQASettingsDtoV2.model_validate(obj)
- _obj = EditQASettingsDtoV2.parse_obj({
+ _obj = EditQASettingsDtoV2.model_validate({
"checks": obj.get("checks")
})
return _obj
diff --git a/phrasetms_client/models/edit_segmentation_rule_dto.py b/phrasetms_client/models/edit_segmentation_rule_dto.py
index 0c0c4538..9d5c7bd2 100644
--- a/phrasetms_client/models/edit_segmentation_rule_dto.py
+++ b/phrasetms_client/models/edit_segmentation_rule_dto.py
@@ -18,25 +18,22 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StringConstraints
class EditSegmentationRuleDto(BaseModel):
"""
segmentation rule object for editing
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
primary: Optional[StrictBool] = Field(None, description="Default: false")
__properties = ["name", "primary"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +46,7 @@ def from_json(cls, json_str: str) -> EditSegmentationRuleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +59,9 @@ def from_dict(cls, obj: dict) -> EditSegmentationRuleDto:
return None
if not isinstance(obj, dict):
- return EditSegmentationRuleDto.parse_obj(obj)
+ return EditSegmentationRuleDto.model_validate(obj)
- _obj = EditSegmentationRuleDto.parse_obj({
+ _obj = EditSegmentationRuleDto.model_validate({
"name": obj.get("name"),
"primary": obj.get("primary")
})
diff --git a/phrasetms_client/models/edit_workflow_step_dto.py b/phrasetms_client/models/edit_workflow_step_dto.py
index ec3d6188..232bae17 100644
--- a/phrasetms_client/models/edit_workflow_step_dto.py
+++ b/phrasetms_client/models/edit_workflow_step_dto.py
@@ -18,27 +18,24 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StringConstraints
class EditWorkflowStepDto(BaseModel):
"""
EditWorkflowStepDto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=1)] = Field(None, description="Name of the lqa workflow step")
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=1)]] = Field(None, description="Name of the lqa workflow step")
order: Optional[StrictInt] = Field(None, description="Order value")
lqa_enabled: Optional[StrictBool] = Field(None, alias="lqaEnabled", description="Default: false")
- abbr: Optional[constr(strict=True, max_length=3, min_length=1)] = Field(None, description="Abbreviation")
+ abbr: Optional[Annotated[str, StringConstraints(strict=True, max_length=3, min_length=1)]] = Field(None, description="Abbreviation")
__properties = ["name", "order", "lqaEnabled", "abbr"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +48,7 @@ def from_json(cls, json_str: str) -> EditWorkflowStepDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +61,9 @@ def from_dict(cls, obj: dict) -> EditWorkflowStepDto:
return None
if not isinstance(obj, dict):
- return EditWorkflowStepDto.parse_obj(obj)
+ return EditWorkflowStepDto.model_validate(obj)
- _obj = EditWorkflowStepDto.parse_obj({
+ _obj = EditWorkflowStepDto.model_validate({
"name": obj.get("name"),
"order": obj.get("order"),
"lqa_enabled": obj.get("lqaEnabled"),
diff --git a/phrasetms_client/models/edition_dto.py b/phrasetms_client/models/edition_dto.py
index a102e73a..af306aa7 100644
--- a/phrasetms_client/models/edition_dto.py
+++ b/phrasetms_client/models/edition_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class EditionDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class EditionDto(BaseModel):
title: Optional[StrictStr] = None
__properties = ["id", "name", "title"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> EditionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> EditionDto:
return None
if not isinstance(obj, dict):
- return EditionDto.parse_obj(obj)
+ return EditionDto.model_validate(obj)
- _obj = EditionDto.parse_obj({
+ _obj = EditionDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title")
diff --git a/phrasetms_client/models/email.py b/phrasetms_client/models/email.py
index b940518e..4b3d185b 100644
--- a/phrasetms_client/models/email.py
+++ b/phrasetms_client/models/email.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class Email(BaseModel):
"""
@@ -30,14 +30,10 @@ class Email(BaseModel):
primary: Optional[StrictBool] = Field(None, description="Default: false")
__properties = ["value", "type", "primary"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> Email:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> Email:
return None
if not isinstance(obj, dict):
- return Email.parse_obj(obj)
+ return Email.model_validate(obj)
- _obj = Email.parse_obj({
+ _obj = Email.model_validate({
"value": obj.get("value"),
"type": obj.get("type"),
"primary": obj.get("primary")
diff --git a/phrasetms_client/models/email_quotes_request_dto.py b/phrasetms_client/models/email_quotes_request_dto.py
index f66fc08f..11c9e87b 100644
--- a/phrasetms_client/models/email_quotes_request_dto.py
+++ b/phrasetms_client/models/email_quotes_request_dto.py
@@ -19,28 +19,24 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.uid_reference import UidReference
class EmailQuotesRequestDto(BaseModel):
"""
EmailQuotesRequestDto
"""
- quotes: conlist(UidReference) = Field(...)
+ quotes: List[UidReference] = Field(...)
subject: StrictStr = Field(...)
body: StrictStr = Field(...)
cc: Optional[StrictStr] = None
bcc: Optional[StrictStr] = None
__properties = ["quotes", "subject", "body", "cc", "bcc"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> EmailQuotesRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -73,9 +69,9 @@ def from_dict(cls, obj: dict) -> EmailQuotesRequestDto:
return None
if not isinstance(obj, dict):
- return EmailQuotesRequestDto.parse_obj(obj)
+ return EmailQuotesRequestDto.model_validate(obj)
- _obj = EmailQuotesRequestDto.parse_obj({
+ _obj = EmailQuotesRequestDto.model_validate({
"quotes": [UidReference.from_dict(_item) for _item in obj.get("quotes")] if obj.get("quotes") is not None else None,
"subject": obj.get("subject"),
"body": obj.get("body"),
diff --git a/phrasetms_client/models/email_quotes_response_dto.py b/phrasetms_client/models/email_quotes_response_dto.py
index 8da4e234..14ec63b5 100644
--- a/phrasetms_client/models/email_quotes_response_dto.py
+++ b/phrasetms_client/models/email_quotes_response_dto.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
class EmailQuotesResponseDto(BaseModel):
"""
EmailQuotesResponseDto
"""
- recipients: Optional[conlist(StrictStr)] = None
+ recipients: Optional[List[StrictStr]] = None
__properties = ["recipients"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> EmailQuotesResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> EmailQuotesResponseDto:
return None
if not isinstance(obj, dict):
- return EmailQuotesResponseDto.parse_obj(obj)
+ return EmailQuotesResponseDto.model_validate(obj)
- _obj = EmailQuotesResponseDto.parse_obj({
+ _obj = EmailQuotesResponseDto.model_validate({
"recipients": obj.get("recipients")
})
return _obj
diff --git a/phrasetms_client/models/empty_pair_tags_warning_dto.py b/phrasetms_client/models/empty_pair_tags_warning_dto.py
index 01f45b63..ae24ef81 100644
--- a/phrasetms_client/models/empty_pair_tags_warning_dto.py
+++ b/phrasetms_client/models/empty_pair_tags_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class EmptyPairTagsWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class EmptyPairTagsWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> EmptyPairTagsWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> EmptyPairTagsWarningDto:
return None
if not isinstance(obj, dict):
- return EmptyPairTagsWarningDto.parse_obj(obj)
+ return EmptyPairTagsWarningDto.model_validate(obj)
- _obj = EmptyPairTagsWarningDto.parse_obj({
+ _obj = EmptyPairTagsWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/empty_tag_content_warning_dto.py b/phrasetms_client/models/empty_tag_content_warning_dto.py
index 476db69f..cddb1752 100644
--- a/phrasetms_client/models/empty_tag_content_warning_dto.py
+++ b/phrasetms_client/models/empty_tag_content_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class EmptyTagContentWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class EmptyTagContentWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> EmptyTagContentWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> EmptyTagContentWarningDto:
return None
if not isinstance(obj, dict):
- return EmptyTagContentWarningDto.parse_obj(obj)
+ return EmptyTagContentWarningDto.model_validate(obj)
- _obj = EmptyTagContentWarningDto.parse_obj({
+ _obj = EmptyTagContentWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/empty_translation_warning_dto.py b/phrasetms_client/models/empty_translation_warning_dto.py
index 2f32f4fa..eb207868 100644
--- a/phrasetms_client/models/empty_translation_warning_dto.py
+++ b/phrasetms_client/models/empty_translation_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class EmptyTranslationWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class EmptyTranslationWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> EmptyTranslationWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> EmptyTranslationWarningDto:
return None
if not isinstance(obj, dict):
- return EmptyTranslationWarningDto.parse_obj(obj)
+ return EmptyTranslationWarningDto.model_validate(obj)
- _obj = EmptyTranslationWarningDto.parse_obj({
+ _obj = EmptyTranslationWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/enabled_check_context_dto_v2.py b/phrasetms_client/models/enabled_check_context_dto_v2.py
index c849a199..443ad365 100644
--- a/phrasetms_client/models/enabled_check_context_dto_v2.py
+++ b/phrasetms_client/models/enabled_check_context_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class EnabledCheckContextDtoV2(BaseModel):
"""
@@ -30,14 +30,10 @@ class EnabledCheckContextDtoV2(BaseModel):
provider: Optional[StrictStr] = None
__properties = ["moraviaProfileId", "customQaDisplayName", "provider"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> EnabledCheckContextDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> EnabledCheckContextDtoV2:
return None
if not isinstance(obj, dict):
- return EnabledCheckContextDtoV2.parse_obj(obj)
+ return EnabledCheckContextDtoV2.model_validate(obj)
- _obj = EnabledCheckContextDtoV2.parse_obj({
+ _obj = EnabledCheckContextDtoV2.model_validate({
"moravia_profile_id": obj.get("moraviaProfileId"),
"custom_qa_display_name": obj.get("customQaDisplayName"),
"provider": obj.get("provider")
diff --git a/phrasetms_client/models/enabled_check_dto_v2.py b/phrasetms_client/models/enabled_check_dto_v2.py
index dd29dff9..3abb20a3 100644
--- a/phrasetms_client/models/enabled_check_dto_v2.py
+++ b/phrasetms_client/models/enabled_check_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.enabled_check_context_dto_v2 import EnabledCheckContextDtoV2
class EnabledCheckDtoV2(BaseModel):
@@ -30,14 +30,10 @@ class EnabledCheckDtoV2(BaseModel):
context: Optional[EnabledCheckContextDtoV2] = None
__properties = ["checkerType", "context"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> EnabledCheckDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> EnabledCheckDtoV2:
return None
if not isinstance(obj, dict):
- return EnabledCheckDtoV2.parse_obj(obj)
+ return EnabledCheckDtoV2.model_validate(obj)
- _obj = EnabledCheckDtoV2.parse_obj({
+ _obj = EnabledCheckDtoV2.model_validate({
"checker_type": obj.get("checkerType"),
"context": EnabledCheckContextDtoV2.from_dict(obj.get("context")) if obj.get("context") is not None else None
})
diff --git a/phrasetms_client/models/enabled_quality_checks_dto.py b/phrasetms_client/models/enabled_quality_checks_dto.py
index e627624a..8521c095 100644
--- a/phrasetms_client/models/enabled_quality_checks_dto.py
+++ b/phrasetms_client/models/enabled_quality_checks_dto.py
@@ -19,16 +19,17 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class EnabledQualityChecksDto(BaseModel):
"""
EnabledQualityChecksDto
"""
- enabled_checks: Optional[conlist(StrictStr)] = Field(None, alias="enabledChecks")
+ enabled_checks: Optional[List[StrictStr]] = Field(None, alias="enabledChecks")
__properties = ["enabledChecks"]
- @validator('enabled_checks')
+ @field_validator('enabled_checks')
+ @classmethod
def enabled_checks_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -39,14 +40,10 @@ def enabled_checks_validate_enum(cls, value):
raise ValueError("each list item must be one of ('EmptyTranslation', 'TrailingPunctuation', 'Formatting', 'JoinTags', 'MissingNumbersV3', 'MultipleSpacesV3', 'NonConformingTerm', 'NotConfirmed', 'TranslationLength', 'AbsoluteLength', 'RelativeLength', 'UnresolvedComment', 'EmptyPairTags', 'InconsistentTranslationTargetSource', 'InconsistentTranslationSourceTarget', 'ForbiddenString', 'SpellCheck', 'RepeatedWord', 'InconsistentTagContent', 'EmptyTagContent', 'Malformed', 'ForbiddenTerm', 'NewerAtLowerLevel', 'LeadingAndTrailingSpaces', 'LeadingSpaces', 'TrailingSpaces', 'TargetSourceIdentical', 'SourceOrTargetRegexp', 'UnmodifiedFuzzyTranslation', 'UnmodifiedFuzzyTranslationTM', 'UnmodifiedFuzzyTranslationMTNT', 'Moravia', 'ExtraNumbersV3', 'UnresolvedConversation', 'NestedTags', 'FuzzyInconsistencyTargetSource', 'FuzzyInconsistencySourceTarget', 'CustomQA')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> EnabledQualityChecksDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +69,9 @@ def from_dict(cls, obj: dict) -> EnabledQualityChecksDto:
return None
if not isinstance(obj, dict):
- return EnabledQualityChecksDto.parse_obj(obj)
+ return EnabledQualityChecksDto.model_validate(obj)
- _obj = EnabledQualityChecksDto.parse_obj({
+ _obj = EnabledQualityChecksDto.model_validate({
"enabled_checks": obj.get("enabledChecks")
})
return _obj
diff --git a/phrasetms_client/models/error_categories_dto.py b/phrasetms_client/models/error_categories_dto.py
index 9158fac8..6e973930 100644
--- a/phrasetms_client/models/error_categories_dto.py
+++ b/phrasetms_client/models/error_categories_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.accuracy_weights_dto import AccuracyWeightsDto
from phrasetms_client.models.design_weights_dto import DesignWeightsDto
from phrasetms_client.models.fluency_weights_dto import FluencyWeightsDto
@@ -43,14 +43,10 @@ class ErrorCategoriesDto(BaseModel):
other: Optional[OtherWeightsDto] = None
__properties = ["accuracy", "fluency", "terminology", "style", "localeConvention", "verity", "design", "other"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +59,7 @@ def from_json(cls, json_str: str) -> ErrorCategoriesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -100,9 +96,9 @@ def from_dict(cls, obj: dict) -> ErrorCategoriesDto:
return None
if not isinstance(obj, dict):
- return ErrorCategoriesDto.parse_obj(obj)
+ return ErrorCategoriesDto.model_validate(obj)
- _obj = ErrorCategoriesDto.parse_obj({
+ _obj = ErrorCategoriesDto.model_validate({
"accuracy": AccuracyWeightsDto.from_dict(obj.get("accuracy")) if obj.get("accuracy") is not None else None,
"fluency": FluencyWeightsDto.from_dict(obj.get("fluency")) if obj.get("fluency") is not None else None,
"terminology": TerminologyWeightsDto.from_dict(obj.get("terminology")) if obj.get("terminology") is not None else None,
diff --git a/phrasetms_client/models/error_detail_dto.py b/phrasetms_client/models/error_detail_dto.py
index 2b858fa3..9ca08a66 100644
--- a/phrasetms_client/models/error_detail_dto.py
+++ b/phrasetms_client/models/error_detail_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ErrorDetailDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class ErrorDetailDto(BaseModel):
message: Optional[StrictStr] = Field(None, description="Optional human-readable message.")
__properties = ["code", "args", "message"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ErrorDetailDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ErrorDetailDto:
return None
if not isinstance(obj, dict):
- return ErrorDetailDto.parse_obj(obj)
+ return ErrorDetailDto.model_validate(obj)
- _obj = ErrorDetailDto.parse_obj({
+ _obj = ErrorDetailDto.model_validate({
"code": obj.get("code"),
"args": obj.get("args"),
"message": obj.get("message")
diff --git a/phrasetms_client/models/error_detail_dto_v2.py b/phrasetms_client/models/error_detail_dto_v2.py
index cd591147..17462eed 100644
--- a/phrasetms_client/models/error_detail_dto_v2.py
+++ b/phrasetms_client/models/error_detail_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ErrorDetailDtoV2(BaseModel):
"""
@@ -30,14 +30,10 @@ class ErrorDetailDtoV2(BaseModel):
message: Optional[StrictStr] = Field(None, description="Optional human-readable message.")
__properties = ["code", "args", "message"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ErrorDetailDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ErrorDetailDtoV2:
return None
if not isinstance(obj, dict):
- return ErrorDetailDtoV2.parse_obj(obj)
+ return ErrorDetailDtoV2.model_validate(obj)
- _obj = ErrorDetailDtoV2.parse_obj({
+ _obj = ErrorDetailDtoV2.model_validate({
"code": obj.get("code"),
"args": obj.get("args"),
"message": obj.get("message")
diff --git a/phrasetms_client/models/error_detail_dto_v3.py b/phrasetms_client/models/error_detail_dto_v3.py
index 1c71506c..4dbd071b 100644
--- a/phrasetms_client/models/error_detail_dto_v3.py
+++ b/phrasetms_client/models/error_detail_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ErrorDetailDtoV3(BaseModel):
"""
@@ -30,14 +30,10 @@ class ErrorDetailDtoV3(BaseModel):
message: Optional[StrictStr] = Field(None, description="Optional human-readable message.")
__properties = ["code", "args", "message"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ErrorDetailDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ErrorDetailDtoV3:
return None
if not isinstance(obj, dict):
- return ErrorDetailDtoV3.parse_obj(obj)
+ return ErrorDetailDtoV3.model_validate(obj)
- _obj = ErrorDetailDtoV3.parse_obj({
+ _obj = ErrorDetailDtoV3.model_validate({
"code": obj.get("code"),
"args": obj.get("args"),
"message": obj.get("message")
diff --git a/phrasetms_client/models/error_dto.py b/phrasetms_client/models/error_dto.py
index 89ea0591..15fc7145 100644
--- a/phrasetms_client/models/error_dto.py
+++ b/phrasetms_client/models/error_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class ErrorDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class ErrorDto(BaseModel):
message: Optional[StrictStr] = None
__properties = ["code", "message"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ErrorDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> ErrorDto:
return None
if not isinstance(obj, dict):
- return ErrorDto.parse_obj(obj)
+ return ErrorDto.model_validate(obj)
- _obj = ErrorDto.parse_obj({
+ _obj = ErrorDto.model_validate({
"code": obj.get("code"),
"message": obj.get("message")
})
diff --git a/phrasetms_client/models/export_by_query_dto.py b/phrasetms_client/models/export_by_query_dto.py
index 352aa4c9..4fd60395 100644
--- a/phrasetms_client/models/export_by_query_dto.py
+++ b/phrasetms_client/models/export_by_query_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.uid_reference import UidReference
@@ -27,9 +27,9 @@ class ExportByQueryDto(BaseModel):
"""
ExportByQueryDto
"""
- export_target_langs: conlist(StrictStr) = Field(..., alias="exportTargetLangs")
- queries: conlist(StrictStr) = Field(...)
- query_langs: conlist(StrictStr) = Field(..., alias="queryLangs")
+ export_target_langs: List[StrictStr] = Field(..., alias="exportTargetLangs")
+ queries: List[StrictStr] = Field(...)
+ query_langs: List[StrictStr] = Field(..., alias="queryLangs")
created_at_min: Optional[datetime] = Field(None, alias="createdAtMin")
created_at_max: Optional[datetime] = Field(None, alias="createdAtMax")
modified_at_min: Optional[datetime] = Field(None, alias="modifiedAtMin")
@@ -41,14 +41,10 @@ class ExportByQueryDto(BaseModel):
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
__properties = ["exportTargetLangs", "queries", "queryLangs", "createdAtMin", "createdAtMax", "modifiedAtMin", "modifiedAtMax", "createdBy", "modifiedBy", "filename", "project", "callbackUrl"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +57,7 @@ def from_json(cls, json_str: str) -> ExportByQueryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -83,9 +79,9 @@ def from_dict(cls, obj: dict) -> ExportByQueryDto:
return None
if not isinstance(obj, dict):
- return ExportByQueryDto.parse_obj(obj)
+ return ExportByQueryDto.model_validate(obj)
- _obj = ExportByQueryDto.parse_obj({
+ _obj = ExportByQueryDto.model_validate({
"export_target_langs": obj.get("exportTargetLangs"),
"queries": obj.get("queries"),
"query_langs": obj.get("queryLangs"),
diff --git a/phrasetms_client/models/export_tm_dto.py b/phrasetms_client/models/export_tm_dto.py
index 94d9eaaa..9ec8e7ad 100644
--- a/phrasetms_client/models/export_tm_dto.py
+++ b/phrasetms_client/models/export_tm_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ExportTMDto(BaseModel):
"""
ExportTMDto
"""
- export_target_langs: Optional[conlist(StrictStr)] = Field(None, alias="exportTargetLangs")
+ export_target_langs: Optional[List[StrictStr]] = Field(None, alias="exportTargetLangs")
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
__properties = ["exportTargetLangs", "callbackUrl"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ExportTMDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> ExportTMDto:
return None
if not isinstance(obj, dict):
- return ExportTMDto.parse_obj(obj)
+ return ExportTMDto.model_validate(obj)
- _obj = ExportTMDto.parse_obj({
+ _obj = ExportTMDto.model_validate({
"export_target_langs": obj.get("exportTargetLangs"),
"callback_url": obj.get("callbackUrl")
})
diff --git a/phrasetms_client/models/extra_numbers_v3_warning_dto.py b/phrasetms_client/models/extra_numbers_v3_warning_dto.py
index bdadb549..50077ab2 100644
--- a/phrasetms_client/models/extra_numbers_v3_warning_dto.py
+++ b/phrasetms_client/models/extra_numbers_v3_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -28,17 +28,13 @@ class ExtraNumbersV3WarningDto(SegmentWarning):
ExtraNumbersV3WarningDto
"""
number: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "number", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> ExtraNumbersV3WarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> ExtraNumbersV3WarningDto:
return None
if not isinstance(obj, dict):
- return ExtraNumbersV3WarningDto.parse_obj(obj)
+ return ExtraNumbersV3WarningDto.model_validate(obj)
- _obj = ExtraNumbersV3WarningDto.parse_obj({
+ _obj = ExtraNumbersV3WarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/extra_numbers_v3_warning_dto_all_of.py b/phrasetms_client/models/extra_numbers_v3_warning_dto_all_of.py
index 3b9be004..d255accc 100644
--- a/phrasetms_client/models/extra_numbers_v3_warning_dto_all_of.py
+++ b/phrasetms_client/models/extra_numbers_v3_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
class ExtraNumbersV3WarningDtoAllOf(BaseModel):
@@ -27,17 +27,13 @@ class ExtraNumbersV3WarningDtoAllOf(BaseModel):
ExtraNumbersV3WarningDtoAllOf
"""
number: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["number", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ExtraNumbersV3WarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> ExtraNumbersV3WarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return ExtraNumbersV3WarningDtoAllOf.parse_obj(obj)
+ return ExtraNumbersV3WarningDtoAllOf.model_validate(obj)
- _obj = ExtraNumbersV3WarningDtoAllOf.parse_obj({
+ _obj = ExtraNumbersV3WarningDtoAllOf.model_validate({
"number": obj.get("number"),
"positions": [Position.from_dict(_item) for _item in obj.get("positions")] if obj.get("positions") is not None else None
})
diff --git a/phrasetms_client/models/extra_numbers_warning_dto.py b/phrasetms_client/models/extra_numbers_warning_dto.py
index 6393d67e..353c7363 100644
--- a/phrasetms_client/models/extra_numbers_warning_dto.py
+++ b/phrasetms_client/models/extra_numbers_warning_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class ExtraNumbersWarningDto(SegmentWarning):
"""
ExtraNumbersWarningDto
"""
- extra_numbers: Optional[conlist(StrictStr)] = Field(None, alias="extraNumbers")
+ extra_numbers: Optional[List[StrictStr]] = Field(None, alias="extraNumbers")
__properties = ["id", "ignored", "type", "repetitionGroupId", "extraNumbers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ExtraNumbersWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> ExtraNumbersWarningDto:
return None
if not isinstance(obj, dict):
- return ExtraNumbersWarningDto.parse_obj(obj)
+ return ExtraNumbersWarningDto.model_validate(obj)
- _obj = ExtraNumbersWarningDto.parse_obj({
+ _obj = ExtraNumbersWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/extra_numbers_warning_dto_all_of.py b/phrasetms_client/models/extra_numbers_warning_dto_all_of.py
index 8cfea83a..15a68bfc 100644
--- a/phrasetms_client/models/extra_numbers_warning_dto_all_of.py
+++ b/phrasetms_client/models/extra_numbers_warning_dto_all_of.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ExtraNumbersWarningDtoAllOf(BaseModel):
"""
ExtraNumbersWarningDtoAllOf
"""
- extra_numbers: Optional[conlist(StrictStr)] = Field(None, alias="extraNumbers")
+ extra_numbers: Optional[List[StrictStr]] = Field(None, alias="extraNumbers")
__properties = ["extraNumbers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> ExtraNumbersWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> ExtraNumbersWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return ExtraNumbersWarningDtoAllOf.parse_obj(obj)
+ return ExtraNumbersWarningDtoAllOf.model_validate(obj)
- _obj = ExtraNumbersWarningDtoAllOf.parse_obj({
+ _obj = ExtraNumbersWarningDtoAllOf.model_validate({
"extra_numbers": obj.get("extraNumbers")
})
return _obj
diff --git a/phrasetms_client/models/features_dto.py b/phrasetms_client/models/features_dto.py
index fa2a29da..277214fe 100644
--- a/phrasetms_client/models/features_dto.py
+++ b/phrasetms_client/models/features_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class FeaturesDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class FeaturesDto(BaseModel):
mt_for_tm_above100_enabled: Optional[StrictBool] = Field(None, alias="mtForTMAbove100Enabled")
__properties = ["icuEnabled", "rejectJobs", "qaHighlightsEnabled", "lqaBulkCommentsCreation", "mtForTMAbove100Enabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> FeaturesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> FeaturesDto:
return None
if not isinstance(obj, dict):
- return FeaturesDto.parse_obj(obj)
+ return FeaturesDto.model_validate(obj)
- _obj = FeaturesDto.parse_obj({
+ _obj = FeaturesDto.model_validate({
"icu_enabled": obj.get("icuEnabled"),
"reject_jobs": obj.get("rejectJobs"),
"qa_highlights_enabled": obj.get("qaHighlightsEnabled"),
diff --git a/phrasetms_client/models/file_dto.py b/phrasetms_client/models/file_dto.py
index 09fd753a..9fccc29e 100644
--- a/phrasetms_client/models/file_dto.py
+++ b/phrasetms_client/models/file_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.error_dto import ErrorDto
class FileDto(BaseModel):
@@ -38,14 +38,10 @@ class FileDto(BaseModel):
error: Optional[ErrorDto] = None
__properties = ["id", "name", "encodedName", "contentType", "note", "size", "directory", "lastModified", "selected", "error"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +54,7 @@ def from_json(cls, json_str: str) -> FileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> FileDto:
return None
if not isinstance(obj, dict):
- return FileDto.parse_obj(obj)
+ return FileDto.model_validate(obj)
- _obj = FileDto.parse_obj({
+ _obj = FileDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"encoded_name": obj.get("encodedName"),
diff --git a/phrasetms_client/models/file_handover_dto.py b/phrasetms_client/models/file_handover_dto.py
index 0a0785dc..354ad5ba 100644
--- a/phrasetms_client/models/file_handover_dto.py
+++ b/phrasetms_client/models/file_handover_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class FileHandoverDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class FileHandoverDto(BaseModel):
filename: Optional[StrictStr] = Field(None, description="Filename of the uploaded file")
__properties = ["fileId", "filename"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> FileHandoverDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> FileHandoverDto:
return None
if not isinstance(obj, dict):
- return FileHandoverDto.parse_obj(obj)
+ return FileHandoverDto.model_validate(obj)
- _obj = FileHandoverDto.parse_obj({
+ _obj = FileHandoverDto.model_validate({
"file_id": obj.get("fileId"),
"filename": obj.get("filename")
})
diff --git a/phrasetms_client/models/file_import_settings_create_dto.py b/phrasetms_client/models/file_import_settings_create_dto.py
index fbb96eec..0c0729b4 100644
--- a/phrasetms_client/models/file_import_settings_create_dto.py
+++ b/phrasetms_client/models/file_import_settings_create_dto.py
@@ -19,7 +19,16 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictFloat,
+ StrictInt,
+ StrictStr,
+ field_validator,
+)
from phrasetms_client.models.android_settings_dto import AndroidSettingsDto
from phrasetms_client.models.asciidoc_settings_dto import AsciidocSettingsDto
from phrasetms_client.models.csv_settings_dto import CsvSettingsDto
@@ -102,7 +111,8 @@ class FileImportSettingsCreateDto(BaseModel):
asciidoc: Optional[AsciidocSettingsDto] = None
__properties = ["inputCharset", "outputCharset", "zipCharset", "fileFormat", "autodetectMultilingualFiles", "targetLength", "targetLengthMax", "targetLengthPercent", "targetLengthPercentValue", "segmentationRuleId", "targetSegmentationRuleId", "android", "csv", "dita", "docBook", "doc", "html", "idml", "json", "mac", "md", "mif", "multilingualXls", "multilingualCsv", "multilingualXml", "pdf", "php", "po", "ppt", "properties", "psd", "quarkTag", "resx", "sdlXlf", "tmMatch", "ttx", "txt", "xlf2", "xlf", "xls", "xml", "yaml", "asciidoc"]
- @validator('file_format')
+ @field_validator('file_format')
+ @classmethod
def file_format_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -112,14 +122,10 @@ def file_format_validate_enum(cls, value):
raise ValueError("must be one of enum values ('doc', 'ppt', 'xls', 'xlf', 'xlf2', 'sdlxlif', 'ttx', 'html', 'xml', 'mif', 'tmx', 'idml', 'dita', 'json', 'po', 'ts', 'icml', 'yaml', 'properties', 'csv', 'android_string', 'desktop_entry', 'mac_strings', 'pdf', 'windows_rc', 'xml_properties', 'joomla_ini', 'magento_csv', 'dtd', 'mozilla_properties', 'plist', 'plain_text', 'srt', 'sub', 'sbv', 'wiki', 'resx', 'resjson', 'chrome_json', 'epub', 'svg', 'docbook', 'wpxliff', 'multiling_xml', 'multiling_xls', 'mqxliff', 'php', 'psd', 'tag', 'md', 'vtt')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -132,7 +138,7 @@ def from_json(cls, json_str: str) -> FileImportSettingsCreateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -241,9 +247,9 @@ def from_dict(cls, obj: dict) -> FileImportSettingsCreateDto:
return None
if not isinstance(obj, dict):
- return FileImportSettingsCreateDto.parse_obj(obj)
+ return FileImportSettingsCreateDto.model_validate(obj)
- _obj = FileImportSettingsCreateDto.parse_obj({
+ _obj = FileImportSettingsCreateDto.model_validate({
"input_charset": obj.get("inputCharset"),
"output_charset": obj.get("outputCharset"),
"zip_charset": obj.get("zipCharset"),
diff --git a/phrasetms_client/models/file_import_settings_dto.py b/phrasetms_client/models/file_import_settings_dto.py
index c55b1b4d..1223ea34 100644
--- a/phrasetms_client/models/file_import_settings_dto.py
+++ b/phrasetms_client/models/file_import_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.android_settings_dto import AndroidSettingsDto
from phrasetms_client.models.asciidoc_settings_dto import AsciidocSettingsDto
from phrasetms_client.models.csv_settings_dto import CsvSettingsDto
@@ -103,14 +103,10 @@ class FileImportSettingsDto(BaseModel):
target_seg_rule: Optional[SegRuleReference] = Field(None, alias="targetSegRule")
__properties = ["inputCharset", "outputCharset", "zipCharset", "fileFormat", "autodetectMultilingualFiles", "targetLength", "targetLengthMax", "targetLengthPercent", "targetLengthPercentValue", "android", "idml", "xls", "multilingualXml", "php", "resx", "json", "html", "multilingualXls", "multilingualCsv", "csv", "txt", "xlf2", "quarkTag", "pdf", "tmMatch", "xml", "mif", "properties", "doc", "xlf", "sdlXlf", "ttx", "ppt", "yaml", "dita", "docBook", "po", "mac", "md", "psd", "asciidoc", "segRule", "targetSegRule"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -123,7 +119,7 @@ def from_json(cls, json_str: str) -> FileImportSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -238,9 +234,9 @@ def from_dict(cls, obj: dict) -> FileImportSettingsDto:
return None
if not isinstance(obj, dict):
- return FileImportSettingsDto.parse_obj(obj)
+ return FileImportSettingsDto.model_validate(obj)
- _obj = FileImportSettingsDto.parse_obj({
+ _obj = FileImportSettingsDto.model_validate({
"input_charset": obj.get("inputCharset"),
"output_charset": obj.get("outputCharset"),
"zip_charset": obj.get("zipCharset"),
diff --git a/phrasetms_client/models/file_list_dto.py b/phrasetms_client/models/file_list_dto.py
index 0056e627..4b31e129 100644
--- a/phrasetms_client/models/file_list_dto.py
+++ b/phrasetms_client/models/file_list_dto.py
@@ -19,28 +19,24 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.file_dto import FileDto
class FileListDto(BaseModel):
"""
FileListDto
"""
- files: Optional[conlist(FileDto)] = None
+ files: Optional[List[FileDto]] = None
current_folder: Optional[StrictStr] = Field(None, alias="currentFolder")
encoded_current_folder: Optional[StrictStr] = Field(None, alias="encodedCurrentFolder")
root_folder: Optional[StrictBool] = Field(None, alias="rootFolder")
- last_changed_files: Optional[conlist(FileDto)] = Field(None, alias="lastChangedFiles")
+ last_changed_files: Optional[List[FileDto]] = Field(None, alias="lastChangedFiles")
__properties = ["files", "currentFolder", "encodedCurrentFolder", "rootFolder", "lastChangedFiles"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> FileListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +76,9 @@ def from_dict(cls, obj: dict) -> FileListDto:
return None
if not isinstance(obj, dict):
- return FileListDto.parse_obj(obj)
+ return FileListDto.model_validate(obj)
- _obj = FileListDto.parse_obj({
+ _obj = FileListDto.model_validate({
"files": [FileDto.from_dict(_item) for _item in obj.get("files")] if obj.get("files") is not None else None,
"current_folder": obj.get("currentFolder"),
"encoded_current_folder": obj.get("encodedCurrentFolder"),
diff --git a/phrasetms_client/models/file_naming_settings_dto.py b/phrasetms_client/models/file_naming_settings_dto.py
index 8bced88a..d93ec314 100644
--- a/phrasetms_client/models/file_naming_settings_dto.py
+++ b/phrasetms_client/models/file_naming_settings_dto.py
@@ -18,26 +18,23 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StringConstraints
class FileNamingSettingsDto(BaseModel):
"""
FileNamingSettingsDto
"""
rename_completed: Optional[StrictBool] = Field(None, alias="renameCompleted")
- completed_file_pattern: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="completedFilePattern")
- target_folder_path: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="targetFolderPath")
+ completed_file_pattern: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="completedFilePattern")
+ target_folder_path: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="targetFolderPath")
__properties = ["renameCompleted", "completedFilePattern", "targetFolderPath"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +47,7 @@ def from_json(cls, json_str: str) -> FileNamingSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +60,9 @@ def from_dict(cls, obj: dict) -> FileNamingSettingsDto:
return None
if not isinstance(obj, dict):
- return FileNamingSettingsDto.parse_obj(obj)
+ return FileNamingSettingsDto.model_validate(obj)
- _obj = FileNamingSettingsDto.parse_obj({
+ _obj = FileNamingSettingsDto.model_validate({
"rename_completed": obj.get("renameCompleted"),
"completed_file_pattern": obj.get("completedFilePattern"),
"target_folder_path": obj.get("targetFolderPath")
diff --git a/phrasetms_client/models/financial_settings_dto.py b/phrasetms_client/models/financial_settings_dto.py
index b0e68341..6587092e 100644
--- a/phrasetms_client/models/financial_settings_dto.py
+++ b/phrasetms_client/models/financial_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.net_rate_scheme_reference import NetRateSchemeReference
from phrasetms_client.models.price_list_reference import PriceListReference
@@ -31,14 +31,10 @@ class FinancialSettingsDto(BaseModel):
price_list: Optional[PriceListReference] = Field(None, alias="priceList")
__properties = ["netRateScheme", "priceList"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> FinancialSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> FinancialSettingsDto:
return None
if not isinstance(obj, dict):
- return FinancialSettingsDto.parse_obj(obj)
+ return FinancialSettingsDto.model_validate(obj)
- _obj = FinancialSettingsDto.parse_obj({
+ _obj = FinancialSettingsDto.model_validate({
"net_rate_scheme": NetRateSchemeReference.from_dict(obj.get("netRateScheme")) if obj.get("netRateScheme") is not None else None,
"price_list": PriceListReference.from_dict(obj.get("priceList")) if obj.get("priceList") is not None else None
})
diff --git a/phrasetms_client/models/find_conversations_dto.py b/phrasetms_client/models/find_conversations_dto.py
index 645758ce..c3ba18ea 100644
--- a/phrasetms_client/models/find_conversations_dto.py
+++ b/phrasetms_client/models/find_conversations_dto.py
@@ -19,26 +19,22 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.uid_reference import UidReference
class FindConversationsDto(BaseModel):
"""
FindConversationsDto
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
since: Optional[StrictStr] = None
include_deleted: Optional[StrictBool] = Field(None, alias="includeDeleted", description="Default: false")
__properties = ["jobs", "since", "includeDeleted"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> FindConversationsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> FindConversationsDto:
return None
if not isinstance(obj, dict):
- return FindConversationsDto.parse_obj(obj)
+ return FindConversationsDto.model_validate(obj)
- _obj = FindConversationsDto.parse_obj({
+ _obj = FindConversationsDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"since": obj.get("since"),
"include_deleted": obj.get("includeDeleted")
diff --git a/phrasetms_client/models/fluency_weights_dto.py b/phrasetms_client/models/fluency_weights_dto.py
index 8618fb5e..36c53a51 100644
--- a/phrasetms_client/models/fluency_weights_dto.py
+++ b/phrasetms_client/models/fluency_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class FluencyWeightsDto(BaseModel):
@@ -36,14 +36,10 @@ class FluencyWeightsDto(BaseModel):
character_encoding: Optional[ToggleableWeightDto] = Field(None, alias="characterEncoding")
__properties = ["fluency", "punctuation", "spelling", "grammar", "grammaticalRegister", "inconsistency", "crossReference", "characterEncoding"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> FluencyWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -93,9 +89,9 @@ def from_dict(cls, obj: dict) -> FluencyWeightsDto:
return None
if not isinstance(obj, dict):
- return FluencyWeightsDto.parse_obj(obj)
+ return FluencyWeightsDto.model_validate(obj)
- _obj = FluencyWeightsDto.parse_obj({
+ _obj = FluencyWeightsDto.model_validate({
"fluency": ToggleableWeightDto.from_dict(obj.get("fluency")) if obj.get("fluency") is not None else None,
"punctuation": ToggleableWeightDto.from_dict(obj.get("punctuation")) if obj.get("punctuation") is not None else None,
"spelling": ToggleableWeightDto.from_dict(obj.get("spelling")) if obj.get("spelling") is not None else None,
diff --git a/phrasetms_client/models/forbidden_string_warning_dto.py b/phrasetms_client/models/forbidden_string_warning_dto.py
index 03527e8d..1487fb11 100644
--- a/phrasetms_client/models/forbidden_string_warning_dto.py
+++ b/phrasetms_client/models/forbidden_string_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -28,17 +28,13 @@ class ForbiddenStringWarningDto(SegmentWarning):
ForbiddenStringWarningDto
"""
forbidden_string: Optional[StrictStr] = Field(None, alias="forbiddenString")
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "forbiddenString", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> ForbiddenStringWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> ForbiddenStringWarningDto:
return None
if not isinstance(obj, dict):
- return ForbiddenStringWarningDto.parse_obj(obj)
+ return ForbiddenStringWarningDto.model_validate(obj)
- _obj = ForbiddenStringWarningDto.parse_obj({
+ _obj = ForbiddenStringWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/forbidden_string_warning_dto_all_of.py b/phrasetms_client/models/forbidden_string_warning_dto_all_of.py
index e464086b..b8b737ff 100644
--- a/phrasetms_client/models/forbidden_string_warning_dto_all_of.py
+++ b/phrasetms_client/models/forbidden_string_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
class ForbiddenStringWarningDtoAllOf(BaseModel):
@@ -27,17 +27,13 @@ class ForbiddenStringWarningDtoAllOf(BaseModel):
ForbiddenStringWarningDtoAllOf
"""
forbidden_string: Optional[StrictStr] = Field(None, alias="forbiddenString")
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["forbiddenString", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ForbiddenStringWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> ForbiddenStringWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return ForbiddenStringWarningDtoAllOf.parse_obj(obj)
+ return ForbiddenStringWarningDtoAllOf.model_validate(obj)
- _obj = ForbiddenStringWarningDtoAllOf.parse_obj({
+ _obj = ForbiddenStringWarningDtoAllOf.model_validate({
"forbidden_string": obj.get("forbiddenString"),
"positions": [Position.from_dict(_item) for _item in obj.get("positions")] if obj.get("positions") is not None else None
})
diff --git a/phrasetms_client/models/forbidden_term_warning_dto.py b/phrasetms_client/models/forbidden_term_warning_dto.py
index 5c8f26be..2688f127 100644
--- a/phrasetms_client/models/forbidden_term_warning_dto.py
+++ b/phrasetms_client/models/forbidden_term_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
from phrasetms_client.models.term import Term
@@ -29,18 +29,14 @@ class ForbiddenTermWarningDto(SegmentWarning):
ForbiddenTermWarningDto
"""
term: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
- source_terms: Optional[conlist(Term)] = Field(None, alias="sourceTerms")
+ positions: Optional[List[Position]] = None
+ source_terms: Optional[List[Term]] = Field(None, alias="sourceTerms")
__properties = ["id", "ignored", "type", "repetitionGroupId", "term", "positions", "sourceTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> ForbiddenTermWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +76,9 @@ def from_dict(cls, obj: dict) -> ForbiddenTermWarningDto:
return None
if not isinstance(obj, dict):
- return ForbiddenTermWarningDto.parse_obj(obj)
+ return ForbiddenTermWarningDto.model_validate(obj)
- _obj = ForbiddenTermWarningDto.parse_obj({
+ _obj = ForbiddenTermWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/forbidden_term_warning_dto_all_of.py b/phrasetms_client/models/forbidden_term_warning_dto_all_of.py
index 186f9e79..652976e2 100644
--- a/phrasetms_client/models/forbidden_term_warning_dto_all_of.py
+++ b/phrasetms_client/models/forbidden_term_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.term import Term
@@ -28,18 +28,14 @@ class ForbiddenTermWarningDtoAllOf(BaseModel):
ForbiddenTermWarningDtoAllOf
"""
term: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
- source_terms: Optional[conlist(Term)] = Field(None, alias="sourceTerms")
+ positions: Optional[List[Position]] = None
+ source_terms: Optional[List[Term]] = Field(None, alias="sourceTerms")
__properties = ["term", "positions", "sourceTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> ForbiddenTermWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> ForbiddenTermWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return ForbiddenTermWarningDtoAllOf.parse_obj(obj)
+ return ForbiddenTermWarningDtoAllOf.model_validate(obj)
- _obj = ForbiddenTermWarningDtoAllOf.parse_obj({
+ _obj = ForbiddenTermWarningDtoAllOf.model_validate({
"term": obj.get("term"),
"positions": [Position.from_dict(_item) for _item in obj.get("positions")] if obj.get("positions") is not None else None,
"source_terms": [Term.from_dict(_item) for _item in obj.get("sourceTerms")] if obj.get("sourceTerms") is not None else None
diff --git a/phrasetms_client/models/formatting_warning_dto.py b/phrasetms_client/models/formatting_warning_dto.py
index d8521130..26ae17c6 100644
--- a/phrasetms_client/models/formatting_warning_dto.py
+++ b/phrasetms_client/models/formatting_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class FormattingWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class FormattingWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> FormattingWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> FormattingWarningDto:
return None
if not isinstance(obj, dict):
- return FormattingWarningDto.parse_obj(obj)
+ return FormattingWarningDto.model_validate(obj)
- _obj = FormattingWarningDto.parse_obj({
+ _obj = FormattingWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/ftp.py b/phrasetms_client/models/ftp.py
index c7b9126e..c6249a84 100644
--- a/phrasetms_client/models/ftp.py
+++ b/phrasetms_client/models/ftp.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Ftp(AbstractConnectorDto):
@@ -33,14 +33,10 @@ class Ftp(AbstractConnectorDto):
encryption: Optional[StrictStr] = Field(None, description="Default TLS_IF_AVAILABLE")
__properties = ["name", "type", "userName", "password", "host", "port", "encryption"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> Ftp:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> Ftp:
return None
if not isinstance(obj, dict):
- return Ftp.parse_obj(obj)
+ return Ftp.model_validate(obj)
- _obj = Ftp.parse_obj({
+ _obj = Ftp.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/ftp_all_of.py b/phrasetms_client/models/ftp_all_of.py
index f01c27be..f3332f37 100644
--- a/phrasetms_client/models/ftp_all_of.py
+++ b/phrasetms_client/models/ftp_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class FtpAllOf(BaseModel):
"""
@@ -32,14 +32,10 @@ class FtpAllOf(BaseModel):
encryption: Optional[StrictStr] = Field(None, description="Default TLS_IF_AVAILABLE")
__properties = ["userName", "password", "host", "port", "encryption"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> FtpAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> FtpAllOf:
return None
if not isinstance(obj, dict):
- return FtpAllOf.parse_obj(obj)
+ return FtpAllOf.model_validate(obj)
- _obj = FtpAllOf.parse_obj({
+ _obj = FtpAllOf.model_validate({
"user_name": obj.get("userName"),
"password": obj.get("password"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/fuzzy_inconsistency_warning_dto.py b/phrasetms_client/models/fuzzy_inconsistency_warning_dto.py
index 1cbbcf85..57e730c1 100644
--- a/phrasetms_client/models/fuzzy_inconsistency_warning_dto.py
+++ b/phrasetms_client/models/fuzzy_inconsistency_warning_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class FuzzyInconsistencyWarningDto(SegmentWarning):
"""
FuzzyInconsistencyWarningDto
"""
- segment_ids: Optional[conlist(StrictStr)] = Field(None, alias="segmentIds")
+ segment_ids: Optional[List[StrictStr]] = Field(None, alias="segmentIds")
__properties = ["id", "ignored", "type", "repetitionGroupId", "segmentIds"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> FuzzyInconsistencyWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> FuzzyInconsistencyWarningDto:
return None
if not isinstance(obj, dict):
- return FuzzyInconsistencyWarningDto.parse_obj(obj)
+ return FuzzyInconsistencyWarningDto.model_validate(obj)
- _obj = FuzzyInconsistencyWarningDto.parse_obj({
+ _obj = FuzzyInconsistencyWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/fuzzy_inconsistency_warning_dto_all_of.py b/phrasetms_client/models/fuzzy_inconsistency_warning_dto_all_of.py
index d64a3b42..4647bce3 100644
--- a/phrasetms_client/models/fuzzy_inconsistency_warning_dto_all_of.py
+++ b/phrasetms_client/models/fuzzy_inconsistency_warning_dto_all_of.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class FuzzyInconsistencyWarningDtoAllOf(BaseModel):
"""
FuzzyInconsistencyWarningDtoAllOf
"""
- segment_ids: Optional[conlist(StrictStr)] = Field(None, alias="segmentIds")
+ segment_ids: Optional[List[StrictStr]] = Field(None, alias="segmentIds")
__properties = ["segmentIds"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> FuzzyInconsistencyWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> FuzzyInconsistencyWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return FuzzyInconsistencyWarningDtoAllOf.parse_obj(obj)
+ return FuzzyInconsistencyWarningDtoAllOf.model_validate(obj)
- _obj = FuzzyInconsistencyWarningDtoAllOf.parse_obj({
+ _obj = FuzzyInconsistencyWarningDtoAllOf.model_validate({
"segment_ids": obj.get("segmentIds")
})
return _obj
diff --git a/phrasetms_client/models/get_bilingual_file_dto.py b/phrasetms_client/models/get_bilingual_file_dto.py
index d6a89d52..b1d0098c 100644
--- a/phrasetms_client/models/get_bilingual_file_dto.py
+++ b/phrasetms_client/models/get_bilingual_file_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class GetBilingualFileDto(BaseModel):
"""
GetBilingualFileDto
"""
- jobs: Optional[conlist(UidReference, max_items=1000, min_items=1)] = None
+ jobs: Optional[List[UidReference]] = None
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> GetBilingualFileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> GetBilingualFileDto:
return None
if not isinstance(obj, dict):
- return GetBilingualFileDto.parse_obj(obj)
+ return GetBilingualFileDto.model_validate(obj)
- _obj = GetBilingualFileDto.parse_obj({
+ _obj = GetBilingualFileDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/get_file_request_params_dto.py b/phrasetms_client/models/get_file_request_params_dto.py
index be06a46f..3681d62f 100644
--- a/phrasetms_client/models/get_file_request_params_dto.py
+++ b/phrasetms_client/models/get_file_request_params_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class GetFileRequestParamsDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class GetFileRequestParamsDto(BaseModel):
callback_url: StrictStr = Field(..., alias="callbackUrl")
__properties = ["sourceLang", "targetLang", "callbackUrl"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> GetFileRequestParamsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> GetFileRequestParamsDto:
return None
if not isinstance(obj, dict):
- return GetFileRequestParamsDto.parse_obj(obj)
+ return GetFileRequestParamsDto.model_validate(obj)
- _obj = GetFileRequestParamsDto.parse_obj({
+ _obj = GetFileRequestParamsDto.model_validate({
"source_lang": obj.get("sourceLang"),
"target_lang": obj.get("targetLang"),
"callback_url": obj.get("callbackUrl")
diff --git a/phrasetms_client/models/git.py b/phrasetms_client/models/git.py
index 387f5d56..62ffd23b 100644
--- a/phrasetms_client/models/git.py
+++ b/phrasetms_client/models/git.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Git(AbstractConnectorDto):
@@ -35,14 +35,10 @@ class Git(AbstractConnectorDto):
ssh_pass_phrase: Optional[StrictStr] = Field(None, alias="sshPassPhrase")
__properties = ["name", "type", "userName", "password", "host", "commitMessage", "sshKeyName", "sshKey", "sshPassPhrase"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> Git:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> Git:
return None
if not isinstance(obj, dict):
- return Git.parse_obj(obj)
+ return Git.model_validate(obj)
- _obj = Git.parse_obj({
+ _obj = Git.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/git_all_of.py b/phrasetms_client/models/git_all_of.py
index 7f95031d..7b07c714 100644
--- a/phrasetms_client/models/git_all_of.py
+++ b/phrasetms_client/models/git_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class GitAllOf(BaseModel):
"""
@@ -34,14 +34,10 @@ class GitAllOf(BaseModel):
ssh_pass_phrase: Optional[StrictStr] = Field(None, alias="sshPassPhrase")
__properties = ["userName", "password", "host", "commitMessage", "sshKeyName", "sshKey", "sshPassPhrase"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> GitAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> GitAllOf:
return None
if not isinstance(obj, dict):
- return GitAllOf.parse_obj(obj)
+ return GitAllOf.model_validate(obj)
- _obj = GitAllOf.parse_obj({
+ _obj = GitAllOf.model_validate({
"user_name": obj.get("userName"),
"password": obj.get("password"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/git_lab.py b/phrasetms_client/models/git_lab.py
index 4bd8e796..a94b94d0 100644
--- a/phrasetms_client/models/git_lab.py
+++ b/phrasetms_client/models/git_lab.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class GitLab(AbstractConnectorDto):
@@ -31,14 +31,10 @@ class GitLab(AbstractConnectorDto):
token: StrictStr = Field(...)
__properties = ["name", "type", "commitMessage", "host", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> GitLab:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> GitLab:
return None
if not isinstance(obj, dict):
- return GitLab.parse_obj(obj)
+ return GitLab.model_validate(obj)
- _obj = GitLab.parse_obj({
+ _obj = GitLab.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"commit_message": obj.get("commitMessage"),
diff --git a/phrasetms_client/models/git_lab_all_of.py b/phrasetms_client/models/git_lab_all_of.py
index bb3dfb84..1aae88e3 100644
--- a/phrasetms_client/models/git_lab_all_of.py
+++ b/phrasetms_client/models/git_lab_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class GitLabAllOf(BaseModel):
"""
@@ -30,14 +30,10 @@ class GitLabAllOf(BaseModel):
token: StrictStr = Field(...)
__properties = ["commitMessage", "host", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> GitLabAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> GitLabAllOf:
return None
if not isinstance(obj, dict):
- return GitLabAllOf.parse_obj(obj)
+ return GitLabAllOf.model_validate(obj)
- _obj = GitLabAllOf.parse_obj({
+ _obj = GitLabAllOf.model_validate({
"commit_message": obj.get("commitMessage"),
"host": obj.get("host"),
"token": obj.get("token")
diff --git a/phrasetms_client/models/glossary_activation_dto.py b/phrasetms_client/models/glossary_activation_dto.py
index 2f18f7e9..e74f1863 100644
--- a/phrasetms_client/models/glossary_activation_dto.py
+++ b/phrasetms_client/models/glossary_activation_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool
+from pydantic import BaseModel, ConfigDict, StrictBool
class GlossaryActivationDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class GlossaryActivationDto(BaseModel):
active: Optional[StrictBool] = None
__properties = ["active"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> GlossaryActivationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> GlossaryActivationDto:
return None
if not isinstance(obj, dict):
- return GlossaryActivationDto.parse_obj(obj)
+ return GlossaryActivationDto.model_validate(obj)
- _obj = GlossaryActivationDto.parse_obj({
+ _obj = GlossaryActivationDto.model_validate({
"active": obj.get("active")
})
return _obj
diff --git a/phrasetms_client/models/glossary_dto.py b/phrasetms_client/models/glossary_dto.py
index 50efb215..4f28d74b 100644
--- a/phrasetms_client/models/glossary_dto.py
+++ b/phrasetms_client/models/glossary_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.memsource_translate_profile_simple_dto import MemsourceTranslateProfileSimpleDto
from phrasetms_client.models.user_reference import UserReference
@@ -31,23 +31,19 @@ class GlossaryDto(BaseModel):
uid: Optional[StrictStr] = None
internal_id: Optional[StrictInt] = Field(None, alias="internalId")
name: StrictStr = Field(...)
- langs: Optional[conlist(StrictStr)] = None
+ langs: Optional[List[StrictStr]] = None
created_by: Optional[UserReference] = Field(None, alias="createdBy")
owner: Optional[UserReference] = None
date_created: Optional[datetime] = Field(None, alias="dateCreated")
profile_count: Optional[StrictInt] = Field(None, alias="profileCount")
active: Optional[StrictBool] = None
- profiles: Optional[conlist(MemsourceTranslateProfileSimpleDto)] = None
+ profiles: Optional[List[MemsourceTranslateProfileSimpleDto]] = None
__properties = ["id", "uid", "internalId", "name", "langs", "createdBy", "owner", "dateCreated", "profileCount", "active", "profiles"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +56,7 @@ def from_json(cls, json_str: str) -> GlossaryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -86,9 +82,9 @@ def from_dict(cls, obj: dict) -> GlossaryDto:
return None
if not isinstance(obj, dict):
- return GlossaryDto.parse_obj(obj)
+ return GlossaryDto.model_validate(obj)
- _obj = GlossaryDto.parse_obj({
+ _obj = GlossaryDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/glossary_edit_dto.py b/phrasetms_client/models/glossary_edit_dto.py
index 6d1ee585..4f42cd2f 100644
--- a/phrasetms_client/models/glossary_edit_dto.py
+++ b/phrasetms_client/models/glossary_edit_dto.py
@@ -18,27 +18,24 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
class GlossaryEditDto(BaseModel):
"""
GlossaryEditDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
- langs: conlist(StrictStr, max_items=2147483647, min_items=1) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ langs: List[StrictStr] = Field(...)
owner: Optional[IdReference] = None
__properties = ["name", "langs", "owner"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +48,7 @@ def from_json(cls, json_str: str) -> GlossaryEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +64,9 @@ def from_dict(cls, obj: dict) -> GlossaryEditDto:
return None
if not isinstance(obj, dict):
- return GlossaryEditDto.parse_obj(obj)
+ return GlossaryEditDto.model_validate(obj)
- _obj = GlossaryEditDto.parse_obj({
+ _obj = GlossaryEditDto.model_validate({
"name": obj.get("name"),
"langs": obj.get("langs"),
"owner": IdReference.from_dict(obj.get("owner")) if obj.get("owner") is not None else None
diff --git a/phrasetms_client/models/guest.py b/phrasetms_client/models/guest.py
index f28ac236..9a711d95 100644
--- a/phrasetms_client/models/guest.py
+++ b/phrasetms_client/models/guest.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.abstract_user_create_dto import AbstractUserCreateDto
from phrasetms_client.models.uid_reference import UidReference
@@ -43,14 +43,10 @@ class GUEST(AbstractUserCreateDto):
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther", description="Approve terms in TBs created by other users. Default: true")
__properties = ["userName", "firstName", "lastName", "email", "password", "role", "timezone", "receiveNewsletter", "note", "active", "client", "enableMT", "projectViewOther", "projectViewOtherLinguist", "projectViewOtherEditor", "transMemoryViewOther", "transMemoryEditOther", "transMemoryExportOther", "transMemoryImportOther", "termBaseViewOther", "termBaseEditOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +59,7 @@ def from_json(cls, json_str: str) -> GUEST:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> GUEST:
return None
if not isinstance(obj, dict):
- return GUEST.parse_obj(obj)
+ return GUEST.model_validate(obj)
- _obj = GUEST.parse_obj({
+ _obj = GUEST.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/guestedit.py b/phrasetms_client/models/guestedit.py
index cad11514..e9c8bdad 100644
--- a/phrasetms_client/models/guestedit.py
+++ b/phrasetms_client/models/guestedit.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.abstract_user_edit_dto import AbstractUserEditDto
from phrasetms_client.models.uid_reference import UidReference
@@ -43,14 +43,10 @@ class GUESTEDIT(AbstractUserEditDto):
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther", description="Approve terms in TBs created by other users. Default: true")
__properties = ["userName", "firstName", "lastName", "email", "role", "timezone", "receiveNewsletter", "note", "active", "client", "enableMT", "projectViewOther", "projectViewOtherLinguist", "projectViewOtherEditor", "transMemoryViewOther", "transMemoryEditOther", "transMemoryExportOther", "transMemoryImportOther", "termBaseViewOther", "termBaseEditOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +59,7 @@ def from_json(cls, json_str: str) -> GUESTEDIT:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> GUESTEDIT:
return None
if not isinstance(obj, dict):
- return GUESTEDIT.parse_obj(obj)
+ return GUESTEDIT.model_validate(obj)
- _obj = GUESTEDIT.parse_obj({
+ _obj = GUESTEDIT.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/guestedit_all_of.py b/phrasetms_client/models/guestedit_all_of.py
index 4239ad31..75b90dbc 100644
--- a/phrasetms_client/models/guestedit_all_of.py
+++ b/phrasetms_client/models/guestedit_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.uid_reference import UidReference
class GUESTEDITAllOf(BaseModel):
@@ -42,14 +42,10 @@ class GUESTEDITAllOf(BaseModel):
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther", description="Approve terms in TBs created by other users. Default: true")
__properties = ["client", "enableMT", "projectViewOther", "projectViewOtherLinguist", "projectViewOtherEditor", "transMemoryViewOther", "transMemoryEditOther", "transMemoryExportOther", "transMemoryImportOther", "termBaseViewOther", "termBaseEditOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> GUESTEDITAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +74,9 @@ def from_dict(cls, obj: dict) -> GUESTEDITAllOf:
return None
if not isinstance(obj, dict):
- return GUESTEDITAllOf.parse_obj(obj)
+ return GUESTEDITAllOf.model_validate(obj)
- _obj = GUESTEDITAllOf.parse_obj({
+ _obj = GUESTEDITAllOf.model_validate({
"client": UidReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
"enable_mt": obj.get("enableMT"),
"project_view_other": obj.get("projectViewOther"),
diff --git a/phrasetms_client/models/guestresponse.py b/phrasetms_client/models/guestresponse.py
index f62648aa..4b67a2e1 100644
--- a/phrasetms_client/models/guestresponse.py
+++ b/phrasetms_client/models/guestresponse.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.user_details_dto_v3 import UserDetailsDtoV3
from phrasetms_client.models.user_reference import UserReference
@@ -44,14 +44,10 @@ class GUESTRESPONSE(UserDetailsDtoV3):
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther")
__properties = ["uid", "userName", "firstName", "lastName", "email", "dateCreated", "dateDeleted", "createdBy", "role", "timezone", "note", "receiveNewsletter", "active", "pendingEmailChange", "client", "enableMT", "projectViewOther", "projectViewOtherLinguist", "projectViewOtherEditor", "transMemoryViewOther", "transMemoryEditOther", "transMemoryExportOther", "transMemoryImportOther", "termBaseViewOther", "termBaseEditOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -64,7 +60,7 @@ def from_json(cls, json_str: str) -> GUESTRESPONSE:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -83,9 +79,9 @@ def from_dict(cls, obj: dict) -> GUESTRESPONSE:
return None
if not isinstance(obj, dict):
- return GUESTRESPONSE.parse_obj(obj)
+ return GUESTRESPONSE.model_validate(obj)
- _obj = GUESTRESPONSE.parse_obj({
+ _obj = GUESTRESPONSE.model_validate({
"uid": obj.get("uid"),
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
diff --git a/phrasetms_client/models/guestresponse_all_of.py b/phrasetms_client/models/guestresponse_all_of.py
index 6c5074c7..7994fd82 100644
--- a/phrasetms_client/models/guestresponse_all_of.py
+++ b/phrasetms_client/models/guestresponse_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.client_reference import ClientReference
class GUESTRESPONSEAllOf(BaseModel):
@@ -42,14 +42,10 @@ class GUESTRESPONSEAllOf(BaseModel):
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther")
__properties = ["client", "enableMT", "projectViewOther", "projectViewOtherLinguist", "projectViewOtherEditor", "transMemoryViewOther", "transMemoryEditOther", "transMemoryExportOther", "transMemoryImportOther", "termBaseViewOther", "termBaseEditOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> GUESTRESPONSEAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +74,9 @@ def from_dict(cls, obj: dict) -> GUESTRESPONSEAllOf:
return None
if not isinstance(obj, dict):
- return GUESTRESPONSEAllOf.parse_obj(obj)
+ return GUESTRESPONSEAllOf.model_validate(obj)
- _obj = GUESTRESPONSEAllOf.parse_obj({
+ _obj = GUESTRESPONSEAllOf.model_validate({
"client": ClientReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
"enable_mt": obj.get("enableMT"),
"project_view_other": obj.get("projectViewOther"),
diff --git a/phrasetms_client/models/html_settings_dto.py b/phrasetms_client/models/html_settings_dto.py
index 3e100fd9..5c4df01d 100644
--- a/phrasetms_client/models/html_settings_dto.py
+++ b/phrasetms_client/models/html_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class HtmlSettingsDto(BaseModel):
"""
@@ -42,14 +42,10 @@ class HtmlSettingsDto(BaseModel):
escape_disabled: Optional[StrictBool] = Field(None, alias="escapeDisabled", description="Default: `false`")
__properties = ["breakTagCreatesSegment", "unknownTagCreatesTag", "preserveWhitespace", "importComments", "excludeElements", "tagRegexp", "charEntitiesToTags", "translateMetaTagRegexp", "importDefaultMetaTags", "translatableAttributes", "importDefaultAttributes", "nonTranslatableInlineElements", "translatableInlineElements", "updateLang", "escapeDisabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> HtmlSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> HtmlSettingsDto:
return None
if not isinstance(obj, dict):
- return HtmlSettingsDto.parse_obj(obj)
+ return HtmlSettingsDto.model_validate(obj)
- _obj = HtmlSettingsDto.parse_obj({
+ _obj = HtmlSettingsDto.model_validate({
"break_tag_creates_segment": obj.get("breakTagCreatesSegment"),
"unknown_tag_creates_tag": obj.get("unknownTagCreatesTag"),
"preserve_whitespace": obj.get("preserveWhitespace"),
diff --git a/phrasetms_client/models/human_translate_jobs_dto.py b/phrasetms_client/models/human_translate_jobs_dto.py
index f688e71c..50be52fe 100644
--- a/phrasetms_client/models/human_translate_jobs_dto.py
+++ b/phrasetms_client/models/human_translate_jobs_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.uid_reference import UidReference
@@ -27,7 +27,7 @@ class HumanTranslateJobsDto(BaseModel):
"""
HumanTranslateJobsDto
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
human_translate_settings: IdReference = Field(..., alias="humanTranslateSettings")
comment: Optional[StrictStr] = None
glossary_id: Optional[StrictStr] = Field(None, alias="glossaryId")
@@ -36,7 +36,8 @@ class HumanTranslateJobsDto(BaseModel):
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
__properties = ["jobs", "humanTranslateSettings", "comment", "glossaryId", "usePreferredTranslators", "level", "callbackUrl"]
- @validator('level')
+ @field_validator('level')
+ @classmethod
def level_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -46,14 +47,10 @@ def level_validate_enum(cls, value):
raise ValueError("must be one of enum values ('STANDARD', 'PRO')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -66,7 +63,7 @@ def from_json(cls, json_str: str) -> HumanTranslateJobsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -89,9 +86,9 @@ def from_dict(cls, obj: dict) -> HumanTranslateJobsDto:
return None
if not isinstance(obj, dict):
- return HumanTranslateJobsDto.parse_obj(obj)
+ return HumanTranslateJobsDto.model_validate(obj)
- _obj = HumanTranslateJobsDto.parse_obj({
+ _obj = HumanTranslateJobsDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"human_translate_settings": IdReference.from_dict(obj.get("humanTranslateSettings")) if obj.get("humanTranslateSettings") is not None else None,
"comment": obj.get("comment"),
diff --git a/phrasetms_client/models/id_reference.py b/phrasetms_client/models/id_reference.py
index 2ad434bb..4bebd33c 100644
--- a/phrasetms_client/models/id_reference.py
+++ b/phrasetms_client/models/id_reference.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class IdReference(BaseModel):
"""
@@ -28,14 +28,10 @@ class IdReference(BaseModel):
id: StrictStr = Field(...)
__properties = ["id"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> IdReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> IdReference:
return None
if not isinstance(obj, dict):
- return IdReference.parse_obj(obj)
+ return IdReference.model_validate(obj)
- _obj = IdReference.parse_obj({
+ _obj = IdReference.model_validate({
"id": obj.get("id")
})
return _obj
diff --git a/phrasetms_client/models/idml_settings_dto.py b/phrasetms_client/models/idml_settings_dto.py
index dfd81ee4..21a69772 100644
--- a/phrasetms_client/models/idml_settings_dto.py
+++ b/phrasetms_client/models/idml_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class IdmlSettingsDto(BaseModel):
"""
@@ -42,14 +42,10 @@ class IdmlSettingsDto(BaseModel):
extract_variables: Optional[StrictBool] = Field(None, alias="extractVariables", description="Default: true")
__properties = ["extractNotes", "simplifyCodes", "extractMasterSpreads", "extractLockedLayers", "extractInvisibleLayers", "extractHiddenConditionalText", "extractHyperlinks", "keepKerning", "keepTracking", "targetFont", "replaceFont", "removeXmlElements", "tagRegexp", "extractCrossReferenceFormats", "extractVariables"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> IdmlSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> IdmlSettingsDto:
return None
if not isinstance(obj, dict):
- return IdmlSettingsDto.parse_obj(obj)
+ return IdmlSettingsDto.model_validate(obj)
- _obj = IdmlSettingsDto.parse_obj({
+ _obj = IdmlSettingsDto.model_validate({
"extract_notes": obj.get("extractNotes"),
"simplify_codes": obj.get("simplifyCodes"),
"extract_master_spreads": obj.get("extractMasterSpreads"),
diff --git a/phrasetms_client/models/import_settings_create_dto.py b/phrasetms_client/models/import_settings_create_dto.py
index d45e899b..62e54ec6 100644
--- a/phrasetms_client/models/import_settings_create_dto.py
+++ b/phrasetms_client/models/import_settings_create_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.file_import_settings_create_dto import FileImportSettingsCreateDto
class ImportSettingsCreateDto(BaseModel):
@@ -30,14 +30,10 @@ class ImportSettingsCreateDto(BaseModel):
file_import_settings: FileImportSettingsCreateDto = Field(..., alias="fileImportSettings")
__properties = ["name", "fileImportSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ImportSettingsCreateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> ImportSettingsCreateDto:
return None
if not isinstance(obj, dict):
- return ImportSettingsCreateDto.parse_obj(obj)
+ return ImportSettingsCreateDto.model_validate(obj)
- _obj = ImportSettingsCreateDto.parse_obj({
+ _obj = ImportSettingsCreateDto.model_validate({
"name": obj.get("name"),
"file_import_settings": FileImportSettingsCreateDto.from_dict(obj.get("fileImportSettings")) if obj.get("fileImportSettings") is not None else None
})
diff --git a/phrasetms_client/models/import_settings_dto.py b/phrasetms_client/models/import_settings_dto.py
index 9d403813..4107ec30 100644
--- a/phrasetms_client/models/import_settings_dto.py
+++ b/phrasetms_client/models/import_settings_dto.py
@@ -20,7 +20,7 @@
from datetime import datetime
from dateutil.parser import parse
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.file_import_settings_dto import FileImportSettingsDto
from phrasetms_client.models.user_reference import UserReference
@@ -35,14 +35,10 @@ class ImportSettingsDto(BaseModel):
file_import_settings: Optional[FileImportSettingsDto] = Field(None, alias="fileImportSettings")
__properties = ["uid", "name", "createdBy", "dateCreated", "fileImportSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> ImportSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> ImportSettingsDto:
return None
if not isinstance(obj, dict):
- return ImportSettingsDto.parse_obj(obj)
+ return ImportSettingsDto.model_validate(obj)
- _obj = ImportSettingsDto.parse_obj({
+ _obj = ImportSettingsDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"created_by": UserReference.from_dict(obj.get("createdBy")) if obj.get("createdBy") is not None else None,
diff --git a/phrasetms_client/models/import_settings_edit_dto.py b/phrasetms_client/models/import_settings_edit_dto.py
index 96318791..8a0a1e53 100644
--- a/phrasetms_client/models/import_settings_edit_dto.py
+++ b/phrasetms_client/models/import_settings_edit_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.file_import_settings_create_dto import FileImportSettingsCreateDto
class ImportSettingsEditDto(BaseModel):
@@ -31,14 +31,10 @@ class ImportSettingsEditDto(BaseModel):
file_import_settings: FileImportSettingsCreateDto = Field(..., alias="fileImportSettings")
__properties = ["uid", "name", "fileImportSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> ImportSettingsEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> ImportSettingsEditDto:
return None
if not isinstance(obj, dict):
- return ImportSettingsEditDto.parse_obj(obj)
+ return ImportSettingsEditDto.model_validate(obj)
- _obj = ImportSettingsEditDto.parse_obj({
+ _obj = ImportSettingsEditDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"file_import_settings": FileImportSettingsCreateDto.from_dict(obj.get("fileImportSettings")) if obj.get("fileImportSettings") is not None else None
diff --git a/phrasetms_client/models/import_settings_reference.py b/phrasetms_client/models/import_settings_reference.py
index 203cca81..f358583e 100644
--- a/phrasetms_client/models/import_settings_reference.py
+++ b/phrasetms_client/models/import_settings_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class ImportSettingsReference(BaseModel):
@@ -32,14 +32,10 @@ class ImportSettingsReference(BaseModel):
date_created: Optional[datetime] = Field(None, alias="dateCreated")
__properties = ["uid", "name", "createdBy", "dateCreated"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> ImportSettingsReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> ImportSettingsReference:
return None
if not isinstance(obj, dict):
- return ImportSettingsReference.parse_obj(obj)
+ return ImportSettingsReference.model_validate(obj)
- _obj = ImportSettingsReference.parse_obj({
+ _obj = ImportSettingsReference.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"created_by": UserReference.from_dict(obj.get("createdBy")) if obj.get("createdBy") is not None else None,
diff --git a/phrasetms_client/models/import_status_dto.py b/phrasetms_client/models/import_status_dto.py
index 2c78be3f..66ff3d33 100644
--- a/phrasetms_client/models/import_status_dto.py
+++ b/phrasetms_client/models/import_status_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class ImportStatusDto(BaseModel):
"""
@@ -29,7 +29,8 @@ class ImportStatusDto(BaseModel):
error_message: Optional[StrictStr] = Field(None, alias="errorMessage")
__properties = ["status", "errorMessage"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -39,14 +40,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('RUNNING', 'ERROR', 'OK')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> ImportStatusDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +69,9 @@ def from_dict(cls, obj: dict) -> ImportStatusDto:
return None
if not isinstance(obj, dict):
- return ImportStatusDto.parse_obj(obj)
+ return ImportStatusDto.model_validate(obj)
- _obj = ImportStatusDto.parse_obj({
+ _obj = ImportStatusDto.model_validate({
"status": obj.get("status"),
"error_message": obj.get("errorMessage")
})
diff --git a/phrasetms_client/models/import_status_dto_v2.py b/phrasetms_client/models/import_status_dto_v2.py
index a4317b2f..0e47bd20 100644
--- a/phrasetms_client/models/import_status_dto_v2.py
+++ b/phrasetms_client/models/import_status_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class ImportStatusDtoV2(BaseModel):
"""
@@ -29,7 +29,8 @@ class ImportStatusDtoV2(BaseModel):
error_message: Optional[StrictStr] = Field(None, alias="errorMessage")
__properties = ["status", "errorMessage"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -39,14 +40,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('RUNNING', 'ERROR', 'OK')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> ImportStatusDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +69,9 @@ def from_dict(cls, obj: dict) -> ImportStatusDtoV2:
return None
if not isinstance(obj, dict):
- return ImportStatusDtoV2.parse_obj(obj)
+ return ImportStatusDtoV2.model_validate(obj)
- _obj = ImportStatusDtoV2.parse_obj({
+ _obj = ImportStatusDtoV2.model_validate({
"status": obj.get("status"),
"error_message": obj.get("errorMessage")
})
diff --git a/phrasetms_client/models/import_term_base_response_dto.py b/phrasetms_client/models/import_term_base_response_dto.py
index a334064f..2eeee3fd 100644
--- a/phrasetms_client/models/import_term_base_response_dto.py
+++ b/phrasetms_client/models/import_term_base_response_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class ImportTermBaseResponseDto(BaseModel):
"""
ImportTermBaseResponseDto
"""
- langs: Optional[conlist(StrictStr)] = None
+ langs: Optional[List[StrictStr]] = None
created_terms_count: Optional[StrictInt] = Field(None, alias="createdTermsCount")
updated_terms_count: Optional[StrictInt] = Field(None, alias="updatedTermsCount")
__properties = ["langs", "createdTermsCount", "updatedTermsCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ImportTermBaseResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ImportTermBaseResponseDto:
return None
if not isinstance(obj, dict):
- return ImportTermBaseResponseDto.parse_obj(obj)
+ return ImportTermBaseResponseDto.model_validate(obj)
- _obj = ImportTermBaseResponseDto.parse_obj({
+ _obj = ImportTermBaseResponseDto.model_validate({
"langs": obj.get("langs"),
"created_terms_count": obj.get("createdTermsCount"),
"updated_terms_count": obj.get("updatedTermsCount")
diff --git a/phrasetms_client/models/inconsistent_tag_content_warning_dto.py b/phrasetms_client/models/inconsistent_tag_content_warning_dto.py
index e44dd119..2db78d1e 100644
--- a/phrasetms_client/models/inconsistent_tag_content_warning_dto.py
+++ b/phrasetms_client/models/inconsistent_tag_content_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class InconsistentTagContentWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class InconsistentTagContentWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> InconsistentTagContentWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> InconsistentTagContentWarningDto:
return None
if not isinstance(obj, dict):
- return InconsistentTagContentWarningDto.parse_obj(obj)
+ return InconsistentTagContentWarningDto.model_validate(obj)
- _obj = InconsistentTagContentWarningDto.parse_obj({
+ _obj = InconsistentTagContentWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/inconsistent_translation_warning_dto.py b/phrasetms_client/models/inconsistent_translation_warning_dto.py
index debfb4f3..eff0edda 100644
--- a/phrasetms_client/models/inconsistent_translation_warning_dto.py
+++ b/phrasetms_client/models/inconsistent_translation_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class InconsistentTranslationWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class InconsistentTranslationWarningDto(SegmentWarning):
segment_id: Optional[StrictStr] = Field(None, alias="segmentId")
__properties = ["id", "ignored", "type", "repetitionGroupId", "segmentId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> InconsistentTranslationWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> InconsistentTranslationWarningDto:
return None
if not isinstance(obj, dict):
- return InconsistentTranslationWarningDto.parse_obj(obj)
+ return InconsistentTranslationWarningDto.model_validate(obj)
- _obj = InconsistentTranslationWarningDto.parse_obj({
+ _obj = InconsistentTranslationWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/inconsistent_translation_warning_dto_all_of.py b/phrasetms_client/models/inconsistent_translation_warning_dto_all_of.py
index 13ab268d..caa31c1b 100644
--- a/phrasetms_client/models/inconsistent_translation_warning_dto_all_of.py
+++ b/phrasetms_client/models/inconsistent_translation_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class InconsistentTranslationWarningDtoAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class InconsistentTranslationWarningDtoAllOf(BaseModel):
segment_id: Optional[StrictStr] = Field(None, alias="segmentId")
__properties = ["segmentId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> InconsistentTranslationWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> InconsistentTranslationWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return InconsistentTranslationWarningDtoAllOf.parse_obj(obj)
+ return InconsistentTranslationWarningDtoAllOf.model_validate(obj)
- _obj = InconsistentTranslationWarningDtoAllOf.parse_obj({
+ _obj = InconsistentTranslationWarningDtoAllOf.model_validate({
"segment_id": obj.get("segmentId")
})
return _obj
diff --git a/phrasetms_client/models/input_stream_length.py b/phrasetms_client/models/input_stream_length.py
index 9dae7440..206b1f17 100644
--- a/phrasetms_client/models/input_stream_length.py
+++ b/phrasetms_client/models/input_stream_length.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class InputStreamLength(BaseModel):
"""
@@ -33,14 +33,10 @@ class InputStreamLength(BaseModel):
cleanup_task: Optional[Dict[str, Any]] = Field(None, alias="cleanupTask")
__properties = ["stream", "length", "name", "characterEncoding", "extension", "cleanupTask"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> InputStreamLength:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> InputStreamLength:
return None
if not isinstance(obj, dict):
- return InputStreamLength.parse_obj(obj)
+ return InputStreamLength.model_validate(obj)
- _obj = InputStreamLength.parse_obj({
+ _obj = InputStreamLength.model_validate({
"stream": obj.get("stream"),
"length": obj.get("length"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/job_create_remote_file_dto.py b/phrasetms_client/models/job_create_remote_file_dto.py
index 9ece1a37..c46d71e7 100644
--- a/phrasetms_client/models/job_create_remote_file_dto.py
+++ b/phrasetms_client/models/job_create_remote_file_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class JobCreateRemoteFileDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class JobCreateRemoteFileDto(BaseModel):
continuous: Optional[StrictBool] = None
__properties = ["connectorToken", "remoteFolder", "remoteFileName", "remoteFileNameRegex", "continuous"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> JobCreateRemoteFileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> JobCreateRemoteFileDto:
return None
if not isinstance(obj, dict):
- return JobCreateRemoteFileDto.parse_obj(obj)
+ return JobCreateRemoteFileDto.model_validate(obj)
- _obj = JobCreateRemoteFileDto.parse_obj({
+ _obj = JobCreateRemoteFileDto.model_validate({
"connector_token": obj.get("connectorToken"),
"remote_folder": obj.get("remoteFolder"),
"remote_file_name": obj.get("remoteFileName"),
diff --git a/phrasetms_client/models/job_create_request_dto.py b/phrasetms_client/models/job_create_request_dto.py
index 128b3590..2b999af9 100644
--- a/phrasetms_client/models/job_create_request_dto.py
+++ b/phrasetms_client/models/job_create_request_dto.py
@@ -18,8 +18,9 @@
import json
from datetime import datetime
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, StringConstraints
from phrasetms_client.models.job_create_remote_file_dto import JobCreateRemoteFileDto
from phrasetms_client.models.notify_provider_dto import NotifyProviderDto
from phrasetms_client.models.providers_per_language import ProvidersPerLanguage
@@ -31,27 +32,23 @@ class JobCreateRequestDto(BaseModel):
"""
JobCreateRequestDto
"""
- target_langs: conlist(StrictStr) = Field(..., alias="targetLangs")
+ target_langs: List[StrictStr] = Field(..., alias="targetLangs")
due: Optional[datetime] = Field(None, description="only use for projects without workflows; otherwise specify in the workflowSettings object. Use ISO 8601 date format.")
- workflow_settings: Optional[conlist(WorkflowStepConfiguration)] = Field(None, alias="workflowSettings")
- assignments: Optional[conlist(ProvidersPerLanguage)] = Field(None, description="only use for projects without workflows; otherwise specify in the workflowSettings object")
+ workflow_settings: Optional[List[WorkflowStepConfiguration]] = Field(None, alias="workflowSettings")
+ assignments: Optional[List[ProvidersPerLanguage]] = Field(None, description="only use for projects without workflows; otherwise specify in the workflowSettings object")
import_settings: Optional[UidReference] = Field(None, alias="importSettings")
use_project_file_import_settings: Optional[StrictBool] = Field(None, alias="useProjectFileImportSettings", description="Default: false")
pre_translate: Optional[StrictBool] = Field(None, alias="preTranslate")
notify_provider: Optional[NotifyProviderDto] = Field(None, alias="notifyProvider")
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
- path: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ path: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
remote_file: Optional[JobCreateRemoteFileDto] = Field(None, alias="remoteFile")
__properties = ["targetLangs", "due", "workflowSettings", "assignments", "importSettings", "useProjectFileImportSettings", "preTranslate", "notifyProvider", "callbackUrl", "path", "remoteFile"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -64,7 +61,7 @@ def from_json(cls, json_str: str) -> JobCreateRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -100,9 +97,9 @@ def from_dict(cls, obj: dict) -> JobCreateRequestDto:
return None
if not isinstance(obj, dict):
- return JobCreateRequestDto.parse_obj(obj)
+ return JobCreateRequestDto.model_validate(obj)
- _obj = JobCreateRequestDto.parse_obj({
+ _obj = JobCreateRequestDto.model_validate({
"target_langs": obj.get("targetLangs"),
"due": obj.get("due"),
"workflow_settings": [WorkflowStepConfiguration.from_dict(_item) for _item in obj.get("workflowSettings")] if obj.get("workflowSettings") is not None else None,
diff --git a/phrasetms_client/models/job_export_action_dto.py b/phrasetms_client/models/job_export_action_dto.py
index 6945e1e4..459e3c71 100644
--- a/phrasetms_client/models/job_export_action_dto.py
+++ b/phrasetms_client/models/job_export_action_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class JobExportActionDto(BaseModel):
"""
JobExportActionDto
"""
- jobs: conlist(UidReference, max_items=1000, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JobExportActionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> JobExportActionDto:
return None
if not isinstance(obj, dict):
- return JobExportActionDto.parse_obj(obj)
+ return JobExportActionDto.model_validate(obj)
- _obj = JobExportActionDto.parse_obj({
+ _obj = JobExportActionDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/job_export_response_dto.py b/phrasetms_client/models/job_export_response_dto.py
index 90eb1b4e..2a4c7ed5 100644
--- a/phrasetms_client/models/job_export_response_dto.py
+++ b/phrasetms_client/models/job_export_response_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class JobExportResponseDto(BaseModel):
"""
JobExportResponseDto
"""
- jobs: Optional[conlist(UidReference)] = None
+ jobs: Optional[List[UidReference]] = None
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JobExportResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> JobExportResponseDto:
return None
if not isinstance(obj, dict):
- return JobExportResponseDto.parse_obj(obj)
+ return JobExportResponseDto.model_validate(obj)
- _obj = JobExportResponseDto.parse_obj({
+ _obj = JobExportResponseDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/job_list_dto.py b/phrasetms_client/models/job_list_dto.py
index ec18fe2b..8879a6be 100644
--- a/phrasetms_client/models/job_list_dto.py
+++ b/phrasetms_client/models/job_list_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.async_request_reference import AsyncRequestReference
from phrasetms_client.models.job_part_reference import JobPartReference
@@ -27,19 +27,15 @@ class JobListDto(BaseModel):
"""
JobListDto
"""
- unsupported_files: Optional[conlist(StrictStr)] = Field(None, alias="unsupportedFiles")
- jobs: Optional[conlist(JobPartReference)] = None
+ unsupported_files: Optional[List[StrictStr]] = Field(None, alias="unsupportedFiles")
+ jobs: Optional[List[JobPartReference]] = None
async_request: Optional[AsyncRequestReference] = Field(None, alias="asyncRequest")
__properties = ["unsupportedFiles", "jobs", "asyncRequest"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> JobListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> JobListDto:
return None
if not isinstance(obj, dict):
- return JobListDto.parse_obj(obj)
+ return JobListDto.model_validate(obj)
- _obj = JobListDto.parse_obj({
+ _obj = JobListDto.model_validate({
"unsupported_files": obj.get("unsupportedFiles"),
"jobs": [JobPartReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"async_request": AsyncRequestReference.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None
diff --git a/phrasetms_client/models/job_machine_translation_settings_dto.py b/phrasetms_client/models/job_machine_translation_settings_dto.py
index 9a6a48a5..9175da69 100644
--- a/phrasetms_client/models/job_machine_translation_settings_dto.py
+++ b/phrasetms_client/models/job_machine_translation_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class JobMachineTranslationSettingsDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class JobMachineTranslationSettingsDto(BaseModel):
use_alt_trans_only: Optional[StrictBool] = Field(None, alias="useAltTransOnly", description="Do not put machine translations to target and use alt-trans fields (alt-trans in mxlf). Default: false")
__properties = ["useMachineTranslation", "lock100PercentMatches", "confirm100PercentMatches", "useAltTransOnly"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> JobMachineTranslationSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> JobMachineTranslationSettingsDto:
return None
if not isinstance(obj, dict):
- return JobMachineTranslationSettingsDto.parse_obj(obj)
+ return JobMachineTranslationSettingsDto.model_validate(obj)
- _obj = JobMachineTranslationSettingsDto.parse_obj({
+ _obj = JobMachineTranslationSettingsDto.model_validate({
"use_machine_translation": obj.get("useMachineTranslation"),
"lock100_percent_matches": obj.get("lock100PercentMatches"),
"confirm100_percent_matches": obj.get("confirm100PercentMatches"),
diff --git a/phrasetms_client/models/job_non_translatable_settings_dto.py b/phrasetms_client/models/job_non_translatable_settings_dto.py
index a0e5b972..af269eb2 100644
--- a/phrasetms_client/models/job_non_translatable_settings_dto.py
+++ b/phrasetms_client/models/job_non_translatable_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class JobNonTranslatableSettingsDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class JobNonTranslatableSettingsDto(BaseModel):
lock100_percent_matches: Optional[StrictBool] = Field(None, alias="lock100PercentMatches", description="Lock section: 100% non-translatable matches. Default: false")
__properties = ["preTranslateNonTranslatables", "confirm100PercentMatches", "lock100PercentMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> JobNonTranslatableSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> JobNonTranslatableSettingsDto:
return None
if not isinstance(obj, dict):
- return JobNonTranslatableSettingsDto.parse_obj(obj)
+ return JobNonTranslatableSettingsDto.model_validate(obj)
- _obj = JobNonTranslatableSettingsDto.parse_obj({
+ _obj = JobNonTranslatableSettingsDto.model_validate({
"pre_translate_non_translatables": obj.get("preTranslateNonTranslatables"),
"confirm100_percent_matches": obj.get("confirm100PercentMatches"),
"lock100_percent_matches": obj.get("lock100PercentMatches")
diff --git a/phrasetms_client/models/job_part_delete_references.py b/phrasetms_client/models/job_part_delete_references.py
index 46637478..966f6e82 100644
--- a/phrasetms_client/models/job_part_delete_references.py
+++ b/phrasetms_client/models/job_part_delete_references.py
@@ -19,25 +19,21 @@
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class JobPartDeleteReferences(BaseModel):
"""
JobPartDeleteReferences
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
get_parts: Optional[Dict[str, Any]] = Field(None, alias="getParts")
__properties = ["jobs", "getParts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> JobPartDeleteReferences:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> JobPartDeleteReferences:
return None
if not isinstance(obj, dict):
- return JobPartDeleteReferences.parse_obj(obj)
+ return JobPartDeleteReferences.model_validate(obj)
- _obj = JobPartDeleteReferences.parse_obj({
+ _obj = JobPartDeleteReferences.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"get_parts": obj.get("getParts")
})
diff --git a/phrasetms_client/models/job_part_extended_dto.py b/phrasetms_client/models/job_part_extended_dto.py
index 5bf26495..6a125e5e 100644
--- a/phrasetms_client/models/job_part_extended_dto.py
+++ b/phrasetms_client/models/job_part_extended_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator
from phrasetms_client.models.continuous_job_info_dto import ContinuousJobInfoDto
from phrasetms_client.models.import_status_dto import ImportStatusDto
from phrasetms_client.models.job_reference import JobReference
@@ -34,7 +34,7 @@ class JobPartExtendedDto(BaseModel):
uid: Optional[StrictStr] = None
inner_id: Optional[StrictStr] = Field(None, alias="innerId", description="InnerId is a sequential number of a job in a project. Jobs created from the same file share the same innerId across workflow steps.")
status: Optional[StrictStr] = None
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
workflow_level: Optional[StrictInt] = Field(None, alias="workflowLevel")
@@ -59,7 +59,8 @@ class JobPartExtendedDto(BaseModel):
original_file_directory: Optional[StrictStr] = Field(None, alias="originalFileDirectory")
__properties = ["uid", "innerId", "status", "providers", "sourceLang", "targetLang", "workflowLevel", "workflowStep", "filename", "dateDue", "wordsCount", "beginIndex", "endIndex", "isParentJobSplit", "updateSourceDate", "updateTargetDate", "dateCreated", "jobReference", "project", "lastWorkflowLevel", "workUnit", "importStatus", "imported", "continuous", "continuousJobInfo", "originalFileDirectory"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -69,14 +70,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -89,7 +86,7 @@ def from_json(cls, json_str: str) -> JobPartExtendedDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -124,9 +121,9 @@ def from_dict(cls, obj: dict) -> JobPartExtendedDto:
return None
if not isinstance(obj, dict):
- return JobPartExtendedDto.parse_obj(obj)
+ return JobPartExtendedDto.model_validate(obj)
- _obj = JobPartExtendedDto.parse_obj({
+ _obj = JobPartExtendedDto.model_validate({
"uid": obj.get("uid"),
"inner_id": obj.get("innerId"),
"status": obj.get("status"),
diff --git a/phrasetms_client/models/job_part_patch_batch_dto.py b/phrasetms_client/models/job_part_patch_batch_dto.py
index 529f0a62..a36cf1a5 100644
--- a/phrasetms_client/models/job_part_patch_batch_dto.py
+++ b/phrasetms_client/models/job_part_patch_batch_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.uid_reference import UidReference
@@ -27,14 +27,15 @@ class JobPartPatchBatchDto(BaseModel):
"""
JobPartPatchBatchDto
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
status: Optional[StrictStr] = None
date_due: Optional[datetime] = Field(None, alias="dateDue")
clear_date_due: Optional[StrictBool] = Field(None, alias="clearDateDue")
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
__properties = ["jobs", "status", "dateDue", "clearDateDue", "providers"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -44,14 +45,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -64,7 +61,7 @@ def from_json(cls, json_str: str) -> JobPartPatchBatchDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -91,9 +88,9 @@ def from_dict(cls, obj: dict) -> JobPartPatchBatchDto:
return None
if not isinstance(obj, dict):
- return JobPartPatchBatchDto.parse_obj(obj)
+ return JobPartPatchBatchDto.model_validate(obj)
- _obj = JobPartPatchBatchDto.parse_obj({
+ _obj = JobPartPatchBatchDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"status": obj.get("status"),
"date_due": obj.get("dateDue"),
diff --git a/phrasetms_client/models/job_part_patch_result_dto.py b/phrasetms_client/models/job_part_patch_result_dto.py
index aedb15c7..f1f060b1 100644
--- a/phrasetms_client/models/job_part_patch_result_dto.py
+++ b/phrasetms_client/models/job_part_patch_result_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.error_detail_dto_v3 import ErrorDetailDtoV3
class JobPartPatchResultDto(BaseModel):
@@ -27,17 +27,13 @@ class JobPartPatchResultDto(BaseModel):
JobPartPatchResultDto
"""
updated: Optional[StrictInt] = Field(None, description="Number of successfully updated job parts")
- errors: Optional[conlist(ErrorDetailDtoV3)] = Field(None, description="Errors and their counts encountered during the update")
+ errors: Optional[List[ErrorDetailDtoV3]] = Field(None, description="Errors and their counts encountered during the update")
__properties = ["updated", "errors"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> JobPartPatchResultDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> JobPartPatchResultDto:
return None
if not isinstance(obj, dict):
- return JobPartPatchResultDto.parse_obj(obj)
+ return JobPartPatchResultDto.model_validate(obj)
- _obj = JobPartPatchResultDto.parse_obj({
+ _obj = JobPartPatchResultDto.model_validate({
"updated": obj.get("updated"),
"errors": [ErrorDetailDtoV3.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None
})
diff --git a/phrasetms_client/models/job_part_patch_single_dto.py b/phrasetms_client/models/job_part_patch_single_dto.py
index af2734f1..53342f9a 100644
--- a/phrasetms_client/models/job_part_patch_single_dto.py
+++ b/phrasetms_client/models/job_part_patch_single_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.provider_reference import ProviderReference
class JobPartPatchSingleDto(BaseModel):
@@ -28,10 +28,11 @@ class JobPartPatchSingleDto(BaseModel):
"""
status: Optional[StrictStr] = None
date_due: Optional[datetime] = Field(None, alias="dateDue")
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
__properties = ["status", "dateDue", "providers"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -41,14 +42,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +58,7 @@ def from_json(cls, json_str: str) -> JobPartPatchSingleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +78,9 @@ def from_dict(cls, obj: dict) -> JobPartPatchSingleDto:
return None
if not isinstance(obj, dict):
- return JobPartPatchSingleDto.parse_obj(obj)
+ return JobPartPatchSingleDto.model_validate(obj)
- _obj = JobPartPatchSingleDto.parse_obj({
+ _obj = JobPartPatchSingleDto.model_validate({
"status": obj.get("status"),
"date_due": obj.get("dateDue"),
"providers": [ProviderReference.from_dict(_item) for _item in obj.get("providers")] if obj.get("providers") is not None else None
diff --git a/phrasetms_client/models/job_part_ready_delete_translation_dto.py b/phrasetms_client/models/job_part_ready_delete_translation_dto.py
index 36eba698..a080cb67 100644
--- a/phrasetms_client/models/job_part_ready_delete_translation_dto.py
+++ b/phrasetms_client/models/job_part_ready_delete_translation_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt
from phrasetms_client.models.job_part_ready_delete_translation_filter_dto import JobPartReadyDeleteTranslationFilterDto
from phrasetms_client.models.translation_segments_reference_v2 import TranslationSegmentsReferenceV2
from phrasetms_client.models.uid_reference import UidReference
@@ -28,7 +28,7 @@ class JobPartReadyDeleteTranslationDto(BaseModel):
"""
JobPartReadyDeleteTranslationDto
"""
- jobs: Optional[conlist(UidReference, max_items=100, min_items=1)] = None
+ jobs: Optional[List[UidReference]] = None
delete_settings: Optional[TranslationSegmentsReferenceV2] = Field(None, alias="deleteSettings")
for_all_jobs: Optional[StrictBool] = Field(None, alias="forAllJobs", description="Set true if you want to delete translations for all jobs from project from specific workflow step. Default: false")
workflow_level: Optional[StrictInt] = Field(None, alias="workflowLevel", description="Specifies workflow level for all jobs")
@@ -36,14 +36,10 @@ class JobPartReadyDeleteTranslationDto(BaseModel):
get_parts: Optional[Dict[str, Any]] = Field(None, alias="getParts")
__properties = ["jobs", "deleteSettings", "forAllJobs", "workflowLevel", "filter", "getParts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> JobPartReadyDeleteTranslationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> JobPartReadyDeleteTranslationDto:
return None
if not isinstance(obj, dict):
- return JobPartReadyDeleteTranslationDto.parse_obj(obj)
+ return JobPartReadyDeleteTranslationDto.model_validate(obj)
- _obj = JobPartReadyDeleteTranslationDto.parse_obj({
+ _obj = JobPartReadyDeleteTranslationDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"delete_settings": TranslationSegmentsReferenceV2.from_dict(obj.get("deleteSettings")) if obj.get("deleteSettings") is not None else None,
"for_all_jobs": obj.get("forAllJobs"),
diff --git a/phrasetms_client/models/job_part_ready_delete_translation_filter_dto.py b/phrasetms_client/models/job_part_ready_delete_translation_filter_dto.py
index ea82ae32..5cc24007 100644
--- a/phrasetms_client/models/job_part_ready_delete_translation_filter_dto.py
+++ b/phrasetms_client/models/job_part_ready_delete_translation_filter_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.uid_reference import UidReference
@@ -28,7 +28,7 @@ class JobPartReadyDeleteTranslationFilterDto(BaseModel):
JobPartReadyDeleteTranslationFilterDto
"""
filename: Optional[StrictStr] = None
- statuses: Optional[conlist(StrictStr)] = None
+ statuses: Optional[List[StrictStr]] = None
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
provider: Optional[ProviderReference] = None
owner: Optional[UidReference] = None
@@ -37,14 +37,10 @@ class JobPartReadyDeleteTranslationFilterDto(BaseModel):
overdue: Optional[StrictBool] = None
__properties = ["filename", "statuses", "targetLang", "provider", "owner", "dateDue", "dueInHours", "overdue"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> JobPartReadyDeleteTranslationFilterDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> JobPartReadyDeleteTranslationFilterDto:
return None
if not isinstance(obj, dict):
- return JobPartReadyDeleteTranslationFilterDto.parse_obj(obj)
+ return JobPartReadyDeleteTranslationFilterDto.model_validate(obj)
- _obj = JobPartReadyDeleteTranslationFilterDto.parse_obj({
+ _obj = JobPartReadyDeleteTranslationFilterDto.model_validate({
"filename": obj.get("filename"),
"statuses": obj.get("statuses"),
"target_lang": obj.get("targetLang"),
diff --git a/phrasetms_client/models/job_part_ready_references.py b/phrasetms_client/models/job_part_ready_references.py
index 561756c3..c8b4e710 100644
--- a/phrasetms_client/models/job_part_ready_references.py
+++ b/phrasetms_client/models/job_part_ready_references.py
@@ -19,25 +19,21 @@
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class JobPartReadyReferences(BaseModel):
"""
JobPartReadyReferences
"""
- jobs: Optional[conlist(UidReference, max_items=100, min_items=1)] = None
+ jobs: Optional[List[UidReference]] = None
get_parts: Optional[Dict[str, Any]] = Field(None, alias="getParts")
__properties = ["jobs", "getParts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> JobPartReadyReferences:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> JobPartReadyReferences:
return None
if not isinstance(obj, dict):
- return JobPartReadyReferences.parse_obj(obj)
+ return JobPartReadyReferences.model_validate(obj)
- _obj = JobPartReadyReferences.parse_obj({
+ _obj = JobPartReadyReferences.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"get_parts": obj.get("getParts")
})
diff --git a/phrasetms_client/models/job_part_reference.py b/phrasetms_client/models/job_part_reference.py
index fbb4067e..97ed9cdd 100644
--- a/phrasetms_client/models/job_part_reference.py
+++ b/phrasetms_client/models/job_part_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.workflow_step_reference import WorkflowStepReference
@@ -29,7 +29,7 @@ class JobPartReference(BaseModel):
"""
uid: Optional[StrictStr] = None
status: Optional[StrictStr] = None
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
workflow_level: Optional[StrictInt] = Field(None, alias="workflowLevel")
workflow_step: Optional[WorkflowStepReference] = Field(None, alias="workflowStep")
@@ -44,7 +44,8 @@ class JobPartReference(BaseModel):
source_file_uid: Optional[StrictStr] = Field(None, alias="sourceFileUid")
__properties = ["uid", "status", "providers", "targetLang", "workflowLevel", "workflowStep", "filename", "dateDue", "dateCreated", "updateSourceDate", "imported", "jobAssignedEmailTemplate", "notificationIntervalInMinutes", "continuous", "sourceFileUid"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -54,14 +55,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -74,7 +71,7 @@ def from_json(cls, json_str: str) -> JobPartReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -97,9 +94,9 @@ def from_dict(cls, obj: dict) -> JobPartReference:
return None
if not isinstance(obj, dict):
- return JobPartReference.parse_obj(obj)
+ return JobPartReference.model_validate(obj)
- _obj = JobPartReference.parse_obj({
+ _obj = JobPartReference.model_validate({
"uid": obj.get("uid"),
"status": obj.get("status"),
"providers": [ProviderReference.from_dict(_item) for _item in obj.get("providers")] if obj.get("providers") is not None else None,
diff --git a/phrasetms_client/models/job_part_reference_v2.py b/phrasetms_client/models/job_part_reference_v2.py
index 30300a11..0e818595 100644
--- a/phrasetms_client/models/job_part_reference_v2.py
+++ b/phrasetms_client/models/job_part_reference_v2.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.import_status_dto_v2 import ImportStatusDtoV2
from phrasetms_client.models.project_workflow_step_reference import ProjectWorkflowStepReference
from phrasetms_client.models.provider_reference import ProviderReference
@@ -32,7 +32,7 @@ class JobPartReferenceV2(BaseModel):
uid: Optional[StrictStr] = None
inner_id: Optional[StrictStr] = Field(None, alias="innerId", description="InnerId is a sequential number of a job in a project. Jobs created from the same file share the same innerId across workflow steps")
status: Optional[StrictStr] = None
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
workflow_step: Optional[ProjectWorkflowStepReference] = Field(None, alias="workflowStep")
filename: Optional[StrictStr] = None
@@ -48,7 +48,8 @@ class JobPartReferenceV2(BaseModel):
imported: Optional[StrictBool] = Field(None, description="Default: false")
__properties = ["uid", "innerId", "status", "providers", "targetLang", "workflowStep", "filename", "originalFileDirectory", "dateDue", "dateCreated", "importStatus", "continuous", "sourceFileUid", "split", "serverTaskId", "owner", "imported"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -58,14 +59,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -78,7 +75,7 @@ def from_json(cls, json_str: str) -> JobPartReferenceV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -107,9 +104,9 @@ def from_dict(cls, obj: dict) -> JobPartReferenceV2:
return None
if not isinstance(obj, dict):
- return JobPartReferenceV2.parse_obj(obj)
+ return JobPartReferenceV2.model_validate(obj)
- _obj = JobPartReferenceV2.parse_obj({
+ _obj = JobPartReferenceV2.model_validate({
"uid": obj.get("uid"),
"inner_id": obj.get("innerId"),
"status": obj.get("status"),
diff --git a/phrasetms_client/models/job_part_references.py b/phrasetms_client/models/job_part_references.py
index 5ef24ad5..29e7e866 100644
--- a/phrasetms_client/models/job_part_references.py
+++ b/phrasetms_client/models/job_part_references.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class JobPartReferences(BaseModel):
"""
JobPartReferences
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JobPartReferences:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> JobPartReferences:
return None
if not isinstance(obj, dict):
- return JobPartReferences.parse_obj(obj)
+ return JobPartReferences.model_validate(obj)
- _obj = JobPartReferences.parse_obj({
+ _obj = JobPartReferences.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/job_part_segments_dto_v3.py b/phrasetms_client/models/job_part_segments_dto_v3.py
index f0ce5dd5..c12b6cb5 100644
--- a/phrasetms_client/models/job_part_segments_dto_v3.py
+++ b/phrasetms_client/models/job_part_segments_dto_v3.py
@@ -19,7 +19,7 @@
from typing import List
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.uid_reference import UidReference
class JobPartSegmentsDtoV3(BaseModel):
@@ -27,17 +27,13 @@ class JobPartSegmentsDtoV3(BaseModel):
JobPartSegmentsDtoV3
"""
job: UidReference = Field(...)
- segments: conlist(StrictStr) = Field(...)
+ segments: List[StrictStr] = Field(...)
__properties = ["job", "segments"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> JobPartSegmentsDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> JobPartSegmentsDtoV3:
return None
if not isinstance(obj, dict):
- return JobPartSegmentsDtoV3.parse_obj(obj)
+ return JobPartSegmentsDtoV3.model_validate(obj)
- _obj = JobPartSegmentsDtoV3.parse_obj({
+ _obj = JobPartSegmentsDtoV3.model_validate({
"job": UidReference.from_dict(obj.get("job")) if obj.get("job") is not None else None,
"segments": obj.get("segments")
})
diff --git a/phrasetms_client/models/job_part_status_change_dto.py b/phrasetms_client/models/job_part_status_change_dto.py
index 4294a795..363d992a 100644
--- a/phrasetms_client/models/job_part_status_change_dto.py
+++ b/phrasetms_client/models/job_part_status_change_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.user_reference import UserReference
class JobPartStatusChangeDto(BaseModel):
@@ -31,7 +31,8 @@ class JobPartStatusChangeDto(BaseModel):
changed_by: Optional[UserReference] = Field(None, alias="changedBy")
__properties = ["status", "changedDate", "changedBy"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -41,14 +42,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +58,7 @@ def from_json(cls, json_str: str) -> JobPartStatusChangeDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +74,9 @@ def from_dict(cls, obj: dict) -> JobPartStatusChangeDto:
return None
if not isinstance(obj, dict):
- return JobPartStatusChangeDto.parse_obj(obj)
+ return JobPartStatusChangeDto.model_validate(obj)
- _obj = JobPartStatusChangeDto.parse_obj({
+ _obj = JobPartStatusChangeDto.model_validate({
"status": obj.get("status"),
"changed_date": obj.get("changedDate"),
"changed_by": UserReference.from_dict(obj.get("changedBy")) if obj.get("changedBy") is not None else None
diff --git a/phrasetms_client/models/job_part_status_changes_dto.py b/phrasetms_client/models/job_part_status_changes_dto.py
index 621263dd..1ef4ed39 100644
--- a/phrasetms_client/models/job_part_status_changes_dto.py
+++ b/phrasetms_client/models/job_part_status_changes_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.job_part_status_change_dto import JobPartStatusChangeDto
class JobPartStatusChangesDto(BaseModel):
"""
JobPartStatusChangesDto
"""
- status_changes: Optional[conlist(JobPartStatusChangeDto)] = Field(None, alias="statusChanges")
+ status_changes: Optional[List[JobPartStatusChangeDto]] = Field(None, alias="statusChanges")
__properties = ["statusChanges"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JobPartStatusChangesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> JobPartStatusChangesDto:
return None
if not isinstance(obj, dict):
- return JobPartStatusChangesDto.parse_obj(obj)
+ return JobPartStatusChangesDto.model_validate(obj)
- _obj = JobPartStatusChangesDto.parse_obj({
+ _obj = JobPartStatusChangesDto.model_validate({
"status_changes": [JobPartStatusChangeDto.from_dict(_item) for _item in obj.get("statusChanges")] if obj.get("statusChanges") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/job_part_update_batch_dto.py b/phrasetms_client/models/job_part_update_batch_dto.py
index f0ac3a29..a603e829 100644
--- a/phrasetms_client/models/job_part_update_batch_dto.py
+++ b/phrasetms_client/models/job_part_update_batch_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.uid_reference import UidReference
@@ -27,27 +27,24 @@ class JobPartUpdateBatchDto(BaseModel):
"""
JobPartUpdateBatchDto
"""
- jobs: Optional[conlist(UidReference, max_items=100, min_items=1)] = None
+ jobs: Optional[List[UidReference]] = None
status: StrictStr = Field(...)
date_due: Optional[datetime] = Field(None, alias="dateDue")
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
__properties = ["jobs", "status", "dateDue", "providers"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED'):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +57,7 @@ def from_json(cls, json_str: str) -> JobPartUpdateBatchDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +84,9 @@ def from_dict(cls, obj: dict) -> JobPartUpdateBatchDto:
return None
if not isinstance(obj, dict):
- return JobPartUpdateBatchDto.parse_obj(obj)
+ return JobPartUpdateBatchDto.model_validate(obj)
- _obj = JobPartUpdateBatchDto.parse_obj({
+ _obj = JobPartUpdateBatchDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"status": obj.get("status"),
"date_due": obj.get("dateDue"),
diff --git a/phrasetms_client/models/job_part_update_single_dto.py b/phrasetms_client/models/job_part_update_single_dto.py
index 34e11b32..cc7800e9 100644
--- a/phrasetms_client/models/job_part_update_single_dto.py
+++ b/phrasetms_client/models/job_part_update_single_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.provider_reference import ProviderReference
class JobPartUpdateSingleDto(BaseModel):
@@ -28,24 +28,21 @@ class JobPartUpdateSingleDto(BaseModel):
"""
status: StrictStr = Field(...)
date_due: Optional[datetime] = Field(None, alias="dateDue")
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
__properties = ["status", "dateDue", "providers"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED'):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +55,7 @@ def from_json(cls, json_str: str) -> JobPartUpdateSingleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +75,9 @@ def from_dict(cls, obj: dict) -> JobPartUpdateSingleDto:
return None
if not isinstance(obj, dict):
- return JobPartUpdateSingleDto.parse_obj(obj)
+ return JobPartUpdateSingleDto.model_validate(obj)
- _obj = JobPartUpdateSingleDto.parse_obj({
+ _obj = JobPartUpdateSingleDto.model_validate({
"status": obj.get("status"),
"date_due": obj.get("dateDue"),
"providers": [ProviderReference.from_dict(_item) for _item in obj.get("providers")] if obj.get("providers") is not None else None
diff --git a/phrasetms_client/models/job_part_update_source_dto.py b/phrasetms_client/models/job_part_update_source_dto.py
index 72f595da..9bf06eb6 100644
--- a/phrasetms_client/models/job_part_update_source_dto.py
+++ b/phrasetms_client/models/job_part_update_source_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr, field_validator
from phrasetms_client.models.workflow_step_reference import WorkflowStepReference
class JobPartUpdateSourceDto(BaseModel):
@@ -34,7 +34,8 @@ class JobPartUpdateSourceDto(BaseModel):
workflow_step: Optional[WorkflowStepReference] = Field(None, alias="workflowStep")
__properties = ["uid", "status", "targetLang", "filename", "workflowLevel", "workflowStep"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -44,14 +45,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -64,7 +61,7 @@ def from_json(cls, json_str: str) -> JobPartUpdateSourceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +77,9 @@ def from_dict(cls, obj: dict) -> JobPartUpdateSourceDto:
return None
if not isinstance(obj, dict):
- return JobPartUpdateSourceDto.parse_obj(obj)
+ return JobPartUpdateSourceDto.model_validate(obj)
- _obj = JobPartUpdateSourceDto.parse_obj({
+ _obj = JobPartUpdateSourceDto.model_validate({
"uid": obj.get("uid"),
"status": obj.get("status"),
"target_lang": obj.get("targetLang"),
diff --git a/phrasetms_client/models/job_parts_dto.py b/phrasetms_client/models/job_parts_dto.py
index 6f122d0a..46dda87c 100644
--- a/phrasetms_client/models/job_parts_dto.py
+++ b/phrasetms_client/models/job_parts_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.job_part_reference import JobPartReference
class JobPartsDto(BaseModel):
"""
JobPartsDto
"""
- jobs: Optional[conlist(JobPartReference)] = None
+ jobs: Optional[List[JobPartReference]] = None
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JobPartsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> JobPartsDto:
return None
if not isinstance(obj, dict):
- return JobPartsDto.parse_obj(obj)
+ return JobPartsDto.model_validate(obj)
- _obj = JobPartsDto.parse_obj({
+ _obj = JobPartsDto.model_validate({
"jobs": [JobPartReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/job_reference.py b/phrasetms_client/models/job_reference.py
index 36fee57c..cef7a6f9 100644
--- a/phrasetms_client/models/job_reference.py
+++ b/phrasetms_client/models/job_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class JobReference(BaseModel):
"""
@@ -29,14 +29,10 @@ class JobReference(BaseModel):
filename: Optional[StrictStr] = None
__properties = ["uid", "filename"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JobReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> JobReference:
return None
if not isinstance(obj, dict):
- return JobReference.parse_obj(obj)
+ return JobReference.model_validate(obj)
- _obj = JobReference.parse_obj({
+ _obj = JobReference.model_validate({
"uid": obj.get("uid"),
"filename": obj.get("filename")
})
diff --git a/phrasetms_client/models/job_role_dto.py b/phrasetms_client/models/job_role_dto.py
index 6faab5dd..45ee2e5f 100644
--- a/phrasetms_client/models/job_role_dto.py
+++ b/phrasetms_client/models/job_role_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.project_workflow_step_dto_v2 import ProjectWorkflowStepDtoV2
class JobRoleDto(BaseModel):
@@ -31,14 +31,16 @@ class JobRoleDto(BaseModel):
organization_type: Optional[StrictStr] = Field(None, alias="organizationType", description="not null only for shared projects")
__properties = ["type", "workflowStep", "organizationType"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('PROJECT_OWNER', 'JOB_OWNER', 'PROVIDER', 'GUEST'):
raise ValueError("must be one of enum values ('PROJECT_OWNER', 'JOB_OWNER', 'PROVIDER', 'GUEST')")
return value
- @validator('organization_type')
+ @field_validator('organization_type')
+ @classmethod
def organization_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -48,14 +50,10 @@ def organization_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('VENDOR', 'BUYER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -68,7 +66,7 @@ def from_json(cls, json_str: str) -> JobRoleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -84,9 +82,9 @@ def from_dict(cls, obj: dict) -> JobRoleDto:
return None
if not isinstance(obj, dict):
- return JobRoleDto.parse_obj(obj)
+ return JobRoleDto.model_validate(obj)
- _obj = JobRoleDto.parse_obj({
+ _obj = JobRoleDto.model_validate({
"type": obj.get("type"),
"workflow_step": ProjectWorkflowStepDtoV2.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"organization_type": obj.get("organizationType")
diff --git a/phrasetms_client/models/job_segment_dto.py b/phrasetms_client/models/job_segment_dto.py
index 64b58de6..854922c0 100644
--- a/phrasetms_client/models/job_segment_dto.py
+++ b/phrasetms_client/models/job_segment_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.user_reference import UserReference
from phrasetms_client.models.workflow_step_dto import WorkflowStepDto
@@ -38,14 +38,10 @@ class JobSegmentDto(BaseModel):
workflow_step: Optional[WorkflowStepDto] = Field(None, alias="workflowStep")
__properties = ["id", "source", "translation", "createdAt", "modifiedAt", "createdBy", "modifiedBy", "workflowLevel", "workflowStep"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +54,7 @@ def from_json(cls, json_str: str) -> JobSegmentDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +76,9 @@ def from_dict(cls, obj: dict) -> JobSegmentDto:
return None
if not isinstance(obj, dict):
- return JobSegmentDto.parse_obj(obj)
+ return JobSegmentDto.model_validate(obj)
- _obj = JobSegmentDto.parse_obj({
+ _obj = JobSegmentDto.model_validate({
"id": obj.get("id"),
"source": obj.get("source"),
"translation": obj.get("translation"),
diff --git a/phrasetms_client/models/job_status_change_action_dto.py b/phrasetms_client/models/job_status_change_action_dto.py
index 8ac8889d..c77c5f0f 100644
--- a/phrasetms_client/models/job_status_change_action_dto.py
+++ b/phrasetms_client/models/job_status_change_action_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class JobStatusChangeActionDto(BaseModel):
"""
@@ -30,7 +30,8 @@ class JobStatusChangeActionDto(BaseModel):
propagate_status: Optional[StrictBool] = Field(None, alias="propagateStatus", description="Default: false; Controls both job status and email notifications to previous/next provider")
__properties = ["requestedStatus", "notifyOwner", "propagateStatus"]
- @validator('requested_status')
+ @field_validator('requested_status')
+ @classmethod
def requested_status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -40,14 +41,10 @@ def requested_status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ACCEPTED', 'DECLINED', 'REJECTED', 'DELIVERED', 'EMAILED', 'COMPLETED', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +57,7 @@ def from_json(cls, json_str: str) -> JobStatusChangeActionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -73,9 +70,9 @@ def from_dict(cls, obj: dict) -> JobStatusChangeActionDto:
return None
if not isinstance(obj, dict):
- return JobStatusChangeActionDto.parse_obj(obj)
+ return JobStatusChangeActionDto.model_validate(obj)
- _obj = JobStatusChangeActionDto.parse_obj({
+ _obj = JobStatusChangeActionDto.model_validate({
"requested_status": obj.get("requestedStatus"),
"notify_owner": obj.get("notifyOwner"),
"propagate_status": obj.get("propagateStatus")
diff --git a/phrasetms_client/models/job_translation_memory_settings_dto.py b/phrasetms_client/models/job_translation_memory_settings_dto.py
index 712fe194..67c7b13f 100644
--- a/phrasetms_client/models/job_translation_memory_settings_dto.py
+++ b/phrasetms_client/models/job_translation_memory_settings_dto.py
@@ -18,29 +18,26 @@
import json
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, confloat, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class JobTranslationMemorySettingsDto(BaseModel):
"""
Translation memory related settings
"""
use_translation_memory: Optional[StrictBool] = Field(None, alias="useTranslationMemory", description="Pre-translate from translation memory. Default: true")
- translation_memory_threshold: Optional[Union[confloat(le=1.01, ge=0, strict=True), conint(le=1, ge=0, strict=True)]] = Field(None, alias="translationMemoryThreshold", description="Pre-translation threshold percent. Default: 0.7")
+ translation_memory_threshold: Optional[Union[Annotated[float, Field(le=1.01, ge=0, strict=True)], Annotated[int, Field(le=1, ge=0, strict=True)]]] = Field(None, alias="translationMemoryThreshold", description="Pre-translation threshold percent. Default: 0.7")
confirm100_percent_matches: Optional[StrictBool] = Field(None, alias="confirm100PercentMatches", description="Set segment status to confirmed for: 100% translation memory matches. Default: false")
confirm101_percent_matches: Optional[StrictBool] = Field(None, alias="confirm101PercentMatches", description="Set segment status to confirmed for: 101% translation memory matches. Default: false")
lock100_percent_matches: Optional[StrictBool] = Field(None, alias="lock100PercentMatches", description="Lock section: 100% translation memory matches. Default: false")
lock101_percent_matches: Optional[StrictBool] = Field(None, alias="lock101PercentMatches", description="Lock section: 101% translation memory matches. Default: false")
__properties = ["useTranslationMemory", "translationMemoryThreshold", "confirm100PercentMatches", "confirm101PercentMatches", "lock100PercentMatches", "lock101PercentMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +50,7 @@ def from_json(cls, json_str: str) -> JobTranslationMemorySettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +63,9 @@ def from_dict(cls, obj: dict) -> JobTranslationMemorySettingsDto:
return None
if not isinstance(obj, dict):
- return JobTranslationMemorySettingsDto.parse_obj(obj)
+ return JobTranslationMemorySettingsDto.model_validate(obj)
- _obj = JobTranslationMemorySettingsDto.parse_obj({
+ _obj = JobTranslationMemorySettingsDto.model_validate({
"use_translation_memory": obj.get("useTranslationMemory"),
"translation_memory_threshold": obj.get("translationMemoryThreshold"),
"confirm100_percent_matches": obj.get("confirm100PercentMatches"),
diff --git a/phrasetms_client/models/job_update_source_response_dto.py b/phrasetms_client/models/job_update_source_response_dto.py
index b701157b..975e5e62 100644
--- a/phrasetms_client/models/job_update_source_response_dto.py
+++ b/phrasetms_client/models/job_update_source_response_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.async_request_reference import AsyncRequestReference
from phrasetms_client.models.job_part_update_source_dto import JobPartUpdateSourceDto
@@ -28,17 +28,13 @@ class JobUpdateSourceResponseDto(BaseModel):
JobUpdateSourceResponseDto
"""
async_request: Optional[AsyncRequestReference] = Field(None, alias="asyncRequest")
- jobs: Optional[conlist(JobPartUpdateSourceDto)] = None
+ jobs: Optional[List[JobPartUpdateSourceDto]] = None
__properties = ["asyncRequest", "jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> JobUpdateSourceResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> JobUpdateSourceResponseDto:
return None
if not isinstance(obj, dict):
- return JobUpdateSourceResponseDto.parse_obj(obj)
+ return JobUpdateSourceResponseDto.model_validate(obj)
- _obj = JobUpdateSourceResponseDto.parse_obj({
+ _obj = JobUpdateSourceResponseDto.model_validate({
"async_request": AsyncRequestReference.from_dict(obj.get("asyncRequest")) if obj.get("asyncRequest") is not None else None,
"jobs": [JobPartUpdateSourceDto.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
diff --git a/phrasetms_client/models/join_tags_warning_dto.py b/phrasetms_client/models/join_tags_warning_dto.py
index fc0e9ff6..3db8a73d 100644
--- a/phrasetms_client/models/join_tags_warning_dto.py
+++ b/phrasetms_client/models/join_tags_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.segment_warning import SegmentWarning
class JoinTagsWarningDto(SegmentWarning):
@@ -30,14 +30,10 @@ class JoinTagsWarningDto(SegmentWarning):
translation_tags_count: Optional[StrictInt] = Field(None, alias="translationTagsCount")
__properties = ["id", "ignored", "type", "repetitionGroupId", "sourceTagsCount", "translationTagsCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> JoinTagsWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> JoinTagsWarningDto:
return None
if not isinstance(obj, dict):
- return JoinTagsWarningDto.parse_obj(obj)
+ return JoinTagsWarningDto.model_validate(obj)
- _obj = JoinTagsWarningDto.parse_obj({
+ _obj = JoinTagsWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/join_tags_warning_dto_all_of.py b/phrasetms_client/models/join_tags_warning_dto_all_of.py
index f2784e28..01deef68 100644
--- a/phrasetms_client/models/join_tags_warning_dto_all_of.py
+++ b/phrasetms_client/models/join_tags_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class JoinTagsWarningDtoAllOf(BaseModel):
"""
@@ -29,14 +29,10 @@ class JoinTagsWarningDtoAllOf(BaseModel):
translation_tags_count: Optional[StrictInt] = Field(None, alias="translationTagsCount")
__properties = ["sourceTagsCount", "translationTagsCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JoinTagsWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> JoinTagsWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return JoinTagsWarningDtoAllOf.parse_obj(obj)
+ return JoinTagsWarningDtoAllOf.model_validate(obj)
- _obj = JoinTagsWarningDtoAllOf.parse_obj({
+ _obj = JoinTagsWarningDtoAllOf.model_validate({
"source_tags_count": obj.get("sourceTagsCount"),
"translation_tags_count": obj.get("translationTagsCount")
})
diff --git a/phrasetms_client/models/joomla.py b/phrasetms_client/models/joomla.py
index a80a33d3..113c66c6 100644
--- a/phrasetms_client/models/joomla.py
+++ b/phrasetms_client/models/joomla.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Joomla(AbstractConnectorDto):
@@ -30,14 +30,10 @@ class Joomla(AbstractConnectorDto):
token: StrictStr = Field(...)
__properties = ["name", "type", "host", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> Joomla:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> Joomla:
return None
if not isinstance(obj, dict):
- return Joomla.parse_obj(obj)
+ return Joomla.model_validate(obj)
- _obj = Joomla.parse_obj({
+ _obj = Joomla.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/joomla_all_of.py b/phrasetms_client/models/joomla_all_of.py
index 936ff0c2..6c1819f3 100644
--- a/phrasetms_client/models/joomla_all_of.py
+++ b/phrasetms_client/models/joomla_all_of.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class JoomlaAllOf(BaseModel):
"""
@@ -29,14 +29,10 @@ class JoomlaAllOf(BaseModel):
token: StrictStr = Field(...)
__properties = ["host", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> JoomlaAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> JoomlaAllOf:
return None
if not isinstance(obj, dict):
- return JoomlaAllOf.parse_obj(obj)
+ return JoomlaAllOf.model_validate(obj)
- _obj = JoomlaAllOf.parse_obj({
+ _obj = JoomlaAllOf.model_validate({
"host": obj.get("host"),
"token": obj.get("token")
})
diff --git a/phrasetms_client/models/json_settings_dto.py b/phrasetms_client/models/json_settings_dto.py
index e2585af6..d4c1368c 100644
--- a/phrasetms_client/models/json_settings_dto.py
+++ b/phrasetms_client/models/json_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class JsonSettingsDto(BaseModel):
"""
@@ -35,14 +35,10 @@ class JsonSettingsDto(BaseModel):
context_key_path: Optional[StrictStr] = Field(None, alias="contextKeyPath")
__properties = ["tagRegexp", "htmlSubFilter", "icuSubFilter", "excludeKeyRegexp", "includeKeyRegexp", "contextNotePath", "maxLenPath", "contextKeyPath"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> JsonSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> JsonSettingsDto:
return None
if not isinstance(obj, dict):
- return JsonSettingsDto.parse_obj(obj)
+ return JsonSettingsDto.model_validate(obj)
- _obj = JsonSettingsDto.parse_obj({
+ _obj = JsonSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp"),
"html_sub_filter": obj.get("htmlSubFilter"),
"icu_sub_filter": obj.get("icuSubFilter"),
diff --git a/phrasetms_client/models/kentico.py b/phrasetms_client/models/kentico.py
index 2c737222..0d7ca038 100644
--- a/phrasetms_client/models/kentico.py
+++ b/phrasetms_client/models/kentico.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Kentico(AbstractConnectorDto):
@@ -32,14 +32,10 @@ class Kentico(AbstractConnectorDto):
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
__properties = ["name", "type", "userName", "password", "host", "sourceLang"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> Kentico:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> Kentico:
return None
if not isinstance(obj, dict):
- return Kentico.parse_obj(obj)
+ return Kentico.model_validate(obj)
- _obj = Kentico.parse_obj({
+ _obj = Kentico.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/kentico_all_of.py b/phrasetms_client/models/kentico_all_of.py
index 8ee96554..6c58d1fa 100644
--- a/phrasetms_client/models/kentico_all_of.py
+++ b/phrasetms_client/models/kentico_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class KenticoAllOf(BaseModel):
"""
@@ -31,14 +31,10 @@ class KenticoAllOf(BaseModel):
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
__properties = ["userName", "password", "host", "sourceLang"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> KenticoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> KenticoAllOf:
return None
if not isinstance(obj, dict):
- return KenticoAllOf.parse_obj(obj)
+ return KenticoAllOf.model_validate(obj)
- _obj = KenticoAllOf.parse_obj({
+ _obj = KenticoAllOf.model_validate({
"user_name": obj.get("userName"),
"password": obj.get("password"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/language_dto.py b/phrasetms_client/models/language_dto.py
index 6b7ee51d..fcffc145 100644
--- a/phrasetms_client/models/language_dto.py
+++ b/phrasetms_client/models/language_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class LanguageDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class LanguageDto(BaseModel):
android_bcp: Optional[StrictStr] = Field(None, alias="androidBcp")
__properties = ["code", "name", "rfc", "android", "androidBcp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> LanguageDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> LanguageDto:
return None
if not isinstance(obj, dict):
- return LanguageDto.parse_obj(obj)
+ return LanguageDto.model_validate(obj)
- _obj = LanguageDto.parse_obj({
+ _obj = LanguageDto.model_validate({
"code": obj.get("code"),
"name": obj.get("name"),
"rfc": obj.get("rfc"),
diff --git a/phrasetms_client/models/language_list_dto.py b/phrasetms_client/models/language_list_dto.py
index e988a2f1..bb225378 100644
--- a/phrasetms_client/models/language_list_dto.py
+++ b/phrasetms_client/models/language_list_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.language_dto import LanguageDto
class LanguageListDto(BaseModel):
"""
envelope for list of languages
"""
- languages: conlist(LanguageDto) = Field(...)
+ languages: List[LanguageDto] = Field(...)
__properties = ["languages"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> LanguageListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> LanguageListDto:
return None
if not isinstance(obj, dict):
- return LanguageListDto.parse_obj(obj)
+ return LanguageListDto.model_validate(obj)
- _obj = LanguageListDto.parse_obj({
+ _obj = LanguageListDto.model_validate({
"languages": [LanguageDto.from_dict(_item) for _item in obj.get("languages")] if obj.get("languages") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/language_metadata1.py b/phrasetms_client/models/language_metadata1.py
index f7667b64..d4d24751 100644
--- a/phrasetms_client/models/language_metadata1.py
+++ b/phrasetms_client/models/language_metadata1.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class LanguageMetadata1(BaseModel):
"""
@@ -28,14 +28,10 @@ class LanguageMetadata1(BaseModel):
segments_count: Optional[StrictInt] = Field(None, alias="segmentsCount")
__properties = ["segmentsCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> LanguageMetadata1:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> LanguageMetadata1:
return None
if not isinstance(obj, dict):
- return LanguageMetadata1.parse_obj(obj)
+ return LanguageMetadata1.model_validate(obj)
- _obj = LanguageMetadata1.parse_obj({
+ _obj = LanguageMetadata1.model_validate({
"segments_count": obj.get("segmentsCount")
})
return _obj
diff --git a/phrasetms_client/models/last_login_dto.py b/phrasetms_client/models/last_login_dto.py
index 6e881030..be564f8f 100644
--- a/phrasetms_client/models/last_login_dto.py
+++ b/phrasetms_client/models/last_login_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.user_reference import UserReference
class LastLoginDto(BaseModel):
@@ -30,14 +30,10 @@ class LastLoginDto(BaseModel):
last_login_date: Optional[datetime] = Field(None, alias="lastLoginDate")
__properties = ["user", "lastLoginDate"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> LastLoginDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> LastLoginDto:
return None
if not isinstance(obj, dict):
- return LastLoginDto.parse_obj(obj)
+ return LastLoginDto.model_validate(obj)
- _obj = LastLoginDto.parse_obj({
+ _obj = LastLoginDto.model_validate({
"user": UserReference.from_dict(obj.get("user")) if obj.get("user") is not None else None,
"last_login_date": obj.get("lastLoginDate")
})
diff --git a/phrasetms_client/models/leading_and_trailing_spaces_warning_dto.py b/phrasetms_client/models/leading_and_trailing_spaces_warning_dto.py
index 9c7c256b..46a76c27 100644
--- a/phrasetms_client/models/leading_and_trailing_spaces_warning_dto.py
+++ b/phrasetms_client/models/leading_and_trailing_spaces_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
from phrasetms_client.models.suggestion import Suggestion
@@ -35,14 +35,10 @@ class LeadingAndTrailingSpacesWarningDto(SegmentWarning):
suggestion: Optional[Suggestion] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "srcPosition", "srcWhitespaces", "tgtPosition", "tgtWhitespaces", "suggestion"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> LeadingAndTrailingSpacesWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +73,9 @@ def from_dict(cls, obj: dict) -> LeadingAndTrailingSpacesWarningDto:
return None
if not isinstance(obj, dict):
- return LeadingAndTrailingSpacesWarningDto.parse_obj(obj)
+ return LeadingAndTrailingSpacesWarningDto.model_validate(obj)
- _obj = LeadingAndTrailingSpacesWarningDto.parse_obj({
+ _obj = LeadingAndTrailingSpacesWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/leading_and_trailing_spaces_warning_dto_all_of.py b/phrasetms_client/models/leading_and_trailing_spaces_warning_dto_all_of.py
index 7b07ba1b..26d8539e 100644
--- a/phrasetms_client/models/leading_and_trailing_spaces_warning_dto_all_of.py
+++ b/phrasetms_client/models/leading_and_trailing_spaces_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.suggestion import Suggestion
@@ -34,14 +34,10 @@ class LeadingAndTrailingSpacesWarningDtoAllOf(BaseModel):
suggestion: Optional[Suggestion] = None
__properties = ["srcPosition", "srcWhitespaces", "tgtPosition", "tgtWhitespaces", "suggestion"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> LeadingAndTrailingSpacesWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> LeadingAndTrailingSpacesWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return LeadingAndTrailingSpacesWarningDtoAllOf.parse_obj(obj)
+ return LeadingAndTrailingSpacesWarningDtoAllOf.model_validate(obj)
- _obj = LeadingAndTrailingSpacesWarningDtoAllOf.parse_obj({
+ _obj = LeadingAndTrailingSpacesWarningDtoAllOf.model_validate({
"src_position": Position.from_dict(obj.get("srcPosition")) if obj.get("srcPosition") is not None else None,
"src_whitespaces": obj.get("srcWhitespaces"),
"tgt_position": Position.from_dict(obj.get("tgtPosition")) if obj.get("tgtPosition") is not None else None,
diff --git a/phrasetms_client/models/linguist.py b/phrasetms_client/models/linguist.py
index 8ffcfa3f..afdae84a 100644
--- a/phrasetms_client/models/linguist.py
+++ b/phrasetms_client/models/linguist.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.abstract_project_dto import AbstractProjectDto
from phrasetms_client.models.domain_reference import DomainReference
from phrasetms_client.models.mt_settings_per_language_reference import MTSettingsPerLanguageReference
@@ -33,14 +33,10 @@ class Linguist(AbstractProjectDto):
"""
__properties = ["uid", "internalId", "id", "name", "dateCreated", "domain", "subDomain", "owner", "sourceLang", "targetLangs", "references", "mtSettingsPerLanguageList", "userRole"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> Linguist:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> Linguist:
return None
if not isinstance(obj, dict):
- return Linguist.parse_obj(obj)
+ return Linguist.model_validate(obj)
- _obj = Linguist.parse_obj({
+ _obj = Linguist.model_validate({
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
"id": obj.get("id"),
diff --git a/phrasetms_client/models/linguist_.py b/phrasetms_client/models/linguist_.py
index d42d14b5..e05e2fd6 100644
--- a/phrasetms_client/models/linguist_.py
+++ b/phrasetms_client/models/linguist_.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.abstract_user_create_dto import AbstractUserCreateDto
from phrasetms_client.models.uid_reference import UidReference
@@ -45,12 +45,12 @@ class LINGUIST(AbstractUserCreateDto):
may_reject_jobs: Optional[StrictBool] = Field(
None, alias="mayRejectJobs", description="Reject jobs. Default: false"
)
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(UidReference)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(UidReference)] = None
- domains: Optional[conlist(UidReference)] = None
- sub_domains: Optional[conlist(UidReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[UidReference]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[UidReference]] = None
+ domains: Optional[List[UidReference]] = None
+ sub_domains: Optional[List[UidReference]] = Field(None, alias="subDomains")
net_rate_scheme: Optional[UidReference] = Field(None, alias="netRateScheme")
translation_price_list: Optional[UidReference] = Field(
None, alias="translationPriceList"
@@ -80,15 +80,10 @@ class LINGUIST(AbstractUserCreateDto):
"translationPriceList",
]
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -101,7 +96,7 @@ def from_json(cls, json_str: str) -> LINGUIST:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in workflow_steps (list)
_items = []
if self.workflow_steps:
@@ -145,9 +140,9 @@ def from_dict(cls, obj: dict) -> LINGUIST:
return None
if not isinstance(obj, dict):
- return LINGUIST.parse_obj(obj)
+ return LINGUIST.model_validate(obj)
- _obj = LINGUIST.parse_obj(
+ _obj = LINGUIST.model_validate(
{
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
diff --git a/phrasetms_client/models/linguist_v2.py b/phrasetms_client/models/linguist_v2.py
index e9e5880e..bdf555db 100644
--- a/phrasetms_client/models/linguist_v2.py
+++ b/phrasetms_client/models/linguist_v2.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.abstract_project_dto_v2 import AbstractProjectDtoV2
from phrasetms_client.models.domain_reference import DomainReference
from phrasetms_client.models.mt_settings_per_language_reference import MTSettingsPerLanguageReference
@@ -33,14 +33,10 @@ class LinguistV2(AbstractProjectDtoV2):
"""
__properties = ["uid", "internalId", "id", "name", "dateCreated", "domain", "subDomain", "owner", "sourceLang", "targetLangs", "references", "mtSettingsPerLanguageList", "userRole"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> LinguistV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> LinguistV2:
return None
if not isinstance(obj, dict):
- return LinguistV2.parse_obj(obj)
+ return LinguistV2.model_validate(obj)
- _obj = LinguistV2.parse_obj({
+ _obj = LinguistV2.model_validate({
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
"id": obj.get("id"),
diff --git a/phrasetms_client/models/linguistedit.py b/phrasetms_client/models/linguistedit.py
index 4d50fe10..8705c128 100644
--- a/phrasetms_client/models/linguistedit.py
+++ b/phrasetms_client/models/linguistedit.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.abstract_user_edit_dto import AbstractUserEditDto
from phrasetms_client.models.uid_reference import UidReference
@@ -31,24 +31,20 @@ class LINGUISTEDIT(AbstractUserEditDto):
edit_translations_in_tm: Optional[StrictBool] = Field(None, alias="editTranslationsInTM", description="Edit translations in TM. Default: false")
enable_mt: Optional[StrictBool] = Field(None, alias="enableMT", description="Enable MT. Default: true")
may_reject_jobs: Optional[StrictBool] = Field(None, alias="mayRejectJobs", description="Reject jobs. Default: false")
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(UidReference)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(UidReference)] = None
- domains: Optional[conlist(UidReference)] = None
- sub_domains: Optional[conlist(UidReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[UidReference]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[UidReference]] = None
+ domains: Optional[List[UidReference]] = None
+ sub_domains: Optional[List[UidReference]] = Field(None, alias="subDomains")
net_rate_scheme: Optional[UidReference] = Field(None, alias="netRateScheme")
translation_price_list: Optional[UidReference] = Field(None, alias="translationPriceList")
__properties = ["userName", "firstName", "lastName", "email", "role", "timezone", "receiveNewsletter", "note", "active", "editAllTermsInTB", "editTranslationsInTM", "enableMT", "mayRejectJobs", "sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "netRateScheme", "translationPriceList"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +57,7 @@ def from_json(cls, json_str: str) -> LINGUISTEDIT:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -108,9 +104,9 @@ def from_dict(cls, obj: dict) -> LINGUISTEDIT:
return None
if not isinstance(obj, dict):
- return LINGUISTEDIT.parse_obj(obj)
+ return LINGUISTEDIT.model_validate(obj)
- _obj = LINGUISTEDIT.parse_obj({
+ _obj = LINGUISTEDIT.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/linguistedit_all_of.py b/phrasetms_client/models/linguistedit_all_of.py
index b7219f0b..d385544f 100644
--- a/phrasetms_client/models/linguistedit_all_of.py
+++ b/phrasetms_client/models/linguistedit_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.uid_reference import UidReference
@@ -44,12 +44,12 @@ class LINGUISTEDITAllOf(BaseModel):
may_reject_jobs: Optional[StrictBool] = Field(
None, alias="mayRejectJobs", description="Reject jobs. Default: false"
)
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(UidReference)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(UidReference)] = None
- domains: Optional[conlist(UidReference)] = None
- sub_domains: Optional[conlist(UidReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[UidReference]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[UidReference]] = None
+ domains: Optional[List[UidReference]] = None
+ sub_domains: Optional[List[UidReference]] = Field(None, alias="subDomains")
net_rate_scheme: Optional[UidReference] = Field(None, alias="netRateScheme")
translation_price_list: Optional[UidReference] = Field(
None, alias="translationPriceList"
@@ -69,15 +69,10 @@ class LINGUISTEDITAllOf(BaseModel):
"translationPriceList",
]
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -90,7 +85,7 @@ def from_json(cls, json_str: str) -> LINGUISTEDITAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in workflow_steps (list)
_items = []
if self.workflow_steps:
@@ -134,9 +129,9 @@ def from_dict(cls, obj: dict) -> LINGUISTEDITAllOf:
return None
if not isinstance(obj, dict):
- return LINGUISTEDITAllOf.parse_obj(obj)
+ return LINGUISTEDITAllOf.model_validate(obj)
- _obj = LINGUISTEDITAllOf.parse_obj(
+ _obj = LINGUISTEDITAllOf.model_validate(
{
"edit_all_terms_in_tb": obj.get("editAllTermsInTB"),
"edit_translations_in_tm": obj.get("editTranslationsInTM"),
diff --git a/phrasetms_client/models/linguistresponse.py b/phrasetms_client/models/linguistresponse.py
index 10cf346e..5ae21529 100644
--- a/phrasetms_client/models/linguistresponse.py
+++ b/phrasetms_client/models/linguistresponse.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.discount_scheme_reference import DiscountSchemeReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -37,24 +37,20 @@ class LINGUISTRESPONSE(UserDetailsDtoV3):
edit_translations_in_tm: Optional[StrictBool] = Field(None, alias="editTranslationsInTM")
enable_mt: Optional[StrictBool] = Field(None, alias="enableMT")
may_reject_jobs: Optional[StrictBool] = Field(None, alias="mayRejectJobs")
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(WorkflowStepReferenceV3)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(ClientReference)] = None
- domains: Optional[conlist(DomainReference)] = None
- sub_domains: Optional[conlist(SubDomainReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[WorkflowStepReferenceV3]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[ClientReference]] = None
+ domains: Optional[List[DomainReference]] = None
+ sub_domains: Optional[List[SubDomainReference]] = Field(None, alias="subDomains")
net_rate_scheme: Optional[DiscountSchemeReference] = Field(None, alias="netRateScheme")
translation_price_list: Optional[PriceListReference] = Field(None, alias="translationPriceList")
__properties = ["uid", "userName", "firstName", "lastName", "email", "dateCreated", "dateDeleted", "createdBy", "role", "timezone", "note", "receiveNewsletter", "active", "pendingEmailChange", "editAllTermsInTB", "editTranslationsInTM", "enableMT", "mayRejectJobs", "sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "netRateScheme", "translationPriceList"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +63,7 @@ def from_json(cls, json_str: str) -> LINGUISTRESPONSE:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -117,9 +113,9 @@ def from_dict(cls, obj: dict) -> LINGUISTRESPONSE:
return None
if not isinstance(obj, dict):
- return LINGUISTRESPONSE.parse_obj(obj)
+ return LINGUISTRESPONSE.model_validate(obj)
- _obj = LINGUISTRESPONSE.parse_obj({
+ _obj = LINGUISTRESPONSE.model_validate({
"uid": obj.get("uid"),
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
diff --git a/phrasetms_client/models/linguistresponse_all_of.py b/phrasetms_client/models/linguistresponse_all_of.py
index dece157a..6004717d 100644
--- a/phrasetms_client/models/linguistresponse_all_of.py
+++ b/phrasetms_client/models/linguistresponse_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.discount_scheme_reference import DiscountSchemeReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -35,24 +35,20 @@ class LINGUISTRESPONSEAllOf(BaseModel):
edit_translations_in_tm: Optional[StrictBool] = Field(None, alias="editTranslationsInTM")
enable_mt: Optional[StrictBool] = Field(None, alias="enableMT")
may_reject_jobs: Optional[StrictBool] = Field(None, alias="mayRejectJobs")
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(WorkflowStepReferenceV3)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(ClientReference)] = None
- domains: Optional[conlist(DomainReference)] = None
- sub_domains: Optional[conlist(SubDomainReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[WorkflowStepReferenceV3]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[ClientReference]] = None
+ domains: Optional[List[DomainReference]] = None
+ sub_domains: Optional[List[SubDomainReference]] = Field(None, alias="subDomains")
net_rate_scheme: Optional[DiscountSchemeReference] = Field(None, alias="netRateScheme")
translation_price_list: Optional[PriceListReference] = Field(None, alias="translationPriceList")
__properties = ["editAllTermsInTB", "editTranslationsInTM", "enableMT", "mayRejectJobs", "sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "netRateScheme", "translationPriceList"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +61,7 @@ def from_json(cls, json_str: str) -> LINGUISTRESPONSEAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -112,9 +108,9 @@ def from_dict(cls, obj: dict) -> LINGUISTRESPONSEAllOf:
return None
if not isinstance(obj, dict):
- return LINGUISTRESPONSEAllOf.parse_obj(obj)
+ return LINGUISTRESPONSEAllOf.model_validate(obj)
- _obj = LINGUISTRESPONSEAllOf.parse_obj({
+ _obj = LINGUISTRESPONSEAllOf.model_validate({
"edit_all_terms_in_tb": obj.get("editAllTermsInTB"),
"edit_translations_in_tm": obj.get("editTranslationsInTM"),
"enable_mt": obj.get("enableMT"),
diff --git a/phrasetms_client/models/locale_convention_weights_dto.py b/phrasetms_client/models/locale_convention_weights_dto.py
index 46b863e6..c4a0dcaf 100644
--- a/phrasetms_client/models/locale_convention_weights_dto.py
+++ b/phrasetms_client/models/locale_convention_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class LocaleConventionWeightsDto(BaseModel):
@@ -35,14 +35,10 @@ class LocaleConventionWeightsDto(BaseModel):
telephone_format: Optional[ToggleableWeightDto] = Field(None, alias="telephoneFormat")
__properties = ["localeConvention", "addressFormat", "dateFormat", "currencyFormat", "measurementFormat", "shortcutKey", "telephoneFormat"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> LocaleConventionWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> LocaleConventionWeightsDto:
return None
if not isinstance(obj, dict):
- return LocaleConventionWeightsDto.parse_obj(obj)
+ return LocaleConventionWeightsDto.model_validate(obj)
- _obj = LocaleConventionWeightsDto.parse_obj({
+ _obj = LocaleConventionWeightsDto.model_validate({
"locale_convention": ToggleableWeightDto.from_dict(obj.get("localeConvention")) if obj.get("localeConvention") is not None else None,
"address_format": ToggleableWeightDto.from_dict(obj.get("addressFormat")) if obj.get("addressFormat") is not None else None,
"date_format": ToggleableWeightDto.from_dict(obj.get("dateFormat")) if obj.get("dateFormat") is not None else None,
diff --git a/phrasetms_client/models/login_dto.py b/phrasetms_client/models/login_dto.py
index 88969c4a..0109a47e 100644
--- a/phrasetms_client/models/login_dto.py
+++ b/phrasetms_client/models/login_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class LoginDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class LoginDto(BaseModel):
code: Optional[StrictStr] = Field(None, description="Required only for 2-factor authentication")
__properties = ["userName", "password", "code"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> LoginDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> LoginDto:
return None
if not isinstance(obj, dict):
- return LoginDto.parse_obj(obj)
+ return LoginDto.model_validate(obj)
- _obj = LoginDto.parse_obj({
+ _obj = LoginDto.model_validate({
"user_name": obj.get("userName"),
"password": obj.get("password"),
"code": obj.get("code")
diff --git a/phrasetms_client/models/login_other_dto.py b/phrasetms_client/models/login_other_dto.py
index 289e43b5..684eb2b8 100644
--- a/phrasetms_client/models/login_other_dto.py
+++ b/phrasetms_client/models/login_other_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class LoginOtherDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class LoginOtherDto(BaseModel):
user_name: StrictStr = Field(..., alias="userName")
__properties = ["userName"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> LoginOtherDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> LoginOtherDto:
return None
if not isinstance(obj, dict):
- return LoginOtherDto.parse_obj(obj)
+ return LoginOtherDto.model_validate(obj)
- _obj = LoginOtherDto.parse_obj({
+ _obj = LoginOtherDto.model_validate({
"user_name": obj.get("userName")
})
return _obj
diff --git a/phrasetms_client/models/login_other_v3_dto.py b/phrasetms_client/models/login_other_v3_dto.py
index d4347e71..8e3160b8 100644
--- a/phrasetms_client/models/login_other_v3_dto.py
+++ b/phrasetms_client/models/login_other_v3_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class LoginOtherV3Dto(BaseModel):
"""
@@ -29,14 +29,10 @@ class LoginOtherV3Dto(BaseModel):
user_name: StrictStr = Field(..., alias="userName")
__properties = ["userUid", "userName"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> LoginOtherV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> LoginOtherV3Dto:
return None
if not isinstance(obj, dict):
- return LoginOtherV3Dto.parse_obj(obj)
+ return LoginOtherV3Dto.model_validate(obj)
- _obj = LoginOtherV3Dto.parse_obj({
+ _obj = LoginOtherV3Dto.model_validate({
"user_uid": obj.get("userUid"),
"user_name": obj.get("userName")
})
diff --git a/phrasetms_client/models/login_response_dto.py b/phrasetms_client/models/login_response_dto.py
index 171c2c97..9e882de6 100644
--- a/phrasetms_client/models/login_response_dto.py
+++ b/phrasetms_client/models/login_response_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class LoginResponseDto(BaseModel):
@@ -32,14 +32,10 @@ class LoginResponseDto(BaseModel):
last_invalidate_all_sessions_performed: Optional[datetime] = Field(None, alias="lastInvalidateAllSessionsPerformed")
__properties = ["user", "token", "expires", "lastInvalidateAllSessionsPerformed"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> LoginResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> LoginResponseDto:
return None
if not isinstance(obj, dict):
- return LoginResponseDto.parse_obj(obj)
+ return LoginResponseDto.model_validate(obj)
- _obj = LoginResponseDto.parse_obj({
+ _obj = LoginResponseDto.model_validate({
"user": UserReference.from_dict(obj.get("user")) if obj.get("user") is not None else None,
"token": obj.get("token"),
"expires": obj.get("expires"),
diff --git a/phrasetms_client/models/login_response_v3_dto.py b/phrasetms_client/models/login_response_v3_dto.py
index dbfe9500..1f9abf09 100644
--- a/phrasetms_client/models/login_response_v3_dto.py
+++ b/phrasetms_client/models/login_response_v3_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class LoginResponseV3Dto(BaseModel):
@@ -32,14 +32,10 @@ class LoginResponseV3Dto(BaseModel):
last_invalidate_all_sessions_performed: Optional[datetime] = Field(None, alias="lastInvalidateAllSessionsPerformed")
__properties = ["user", "token", "expires", "lastInvalidateAllSessionsPerformed"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> LoginResponseV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> LoginResponseV3Dto:
return None
if not isinstance(obj, dict):
- return LoginResponseV3Dto.parse_obj(obj)
+ return LoginResponseV3Dto.model_validate(obj)
- _obj = LoginResponseV3Dto.parse_obj({
+ _obj = LoginResponseV3Dto.model_validate({
"user": UserReference.from_dict(obj.get("user")) if obj.get("user") is not None else None,
"token": obj.get("token"),
"expires": obj.get("expires"),
diff --git a/phrasetms_client/models/login_to_session_dto.py b/phrasetms_client/models/login_to_session_dto.py
index 4ea8ce8e..07cd5b0c 100644
--- a/phrasetms_client/models/login_to_session_dto.py
+++ b/phrasetms_client/models/login_to_session_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class LoginToSessionDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class LoginToSessionDto(BaseModel):
remember_me: Optional[StrictBool] = Field(None, alias="rememberMe")
__properties = ["userName", "password", "rememberMe"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> LoginToSessionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> LoginToSessionDto:
return None
if not isinstance(obj, dict):
- return LoginToSessionDto.parse_obj(obj)
+ return LoginToSessionDto.model_validate(obj)
- _obj = LoginToSessionDto.parse_obj({
+ _obj = LoginToSessionDto.model_validate({
"user_name": obj.get("userName"),
"password": obj.get("password"),
"remember_me": obj.get("rememberMe")
diff --git a/phrasetms_client/models/login_to_session_response_dto.py b/phrasetms_client/models/login_to_session_response_dto.py
index d754ac4a..cef060ec 100644
--- a/phrasetms_client/models/login_to_session_response_dto.py
+++ b/phrasetms_client/models/login_to_session_response_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class LoginToSessionResponseDto(BaseModel):
@@ -31,14 +31,10 @@ class LoginToSessionResponseDto(BaseModel):
csrf_token: Optional[StrictStr] = Field(None, alias="csrfToken")
__properties = ["user", "cookie", "csrfToken"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> LoginToSessionResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> LoginToSessionResponseDto:
return None
if not isinstance(obj, dict):
- return LoginToSessionResponseDto.parse_obj(obj)
+ return LoginToSessionResponseDto.model_validate(obj)
- _obj = LoginToSessionResponseDto.parse_obj({
+ _obj = LoginToSessionResponseDto.model_validate({
"user": UserReference.from_dict(obj.get("user")) if obj.get("user") is not None else None,
"cookie": obj.get("cookie"),
"csrf_token": obj.get("csrfToken")
diff --git a/phrasetms_client/models/login_to_session_response_v3_dto.py b/phrasetms_client/models/login_to_session_response_v3_dto.py
index bbf06594..9e7f8d30 100644
--- a/phrasetms_client/models/login_to_session_response_v3_dto.py
+++ b/phrasetms_client/models/login_to_session_response_v3_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class LoginToSessionResponseV3Dto(BaseModel):
@@ -31,14 +31,10 @@ class LoginToSessionResponseV3Dto(BaseModel):
csrf_token: Optional[StrictStr] = Field(None, alias="csrfToken")
__properties = ["user", "cookie", "csrfToken"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> LoginToSessionResponseV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> LoginToSessionResponseV3Dto:
return None
if not isinstance(obj, dict):
- return LoginToSessionResponseV3Dto.parse_obj(obj)
+ return LoginToSessionResponseV3Dto.model_validate(obj)
- _obj = LoginToSessionResponseV3Dto.parse_obj({
+ _obj = LoginToSessionResponseV3Dto.model_validate({
"user": UserReference.from_dict(obj.get("user")) if obj.get("user") is not None else None,
"cookie": obj.get("cookie"),
"csrf_token": obj.get("csrfToken")
diff --git a/phrasetms_client/models/login_to_session_v3_dto.py b/phrasetms_client/models/login_to_session_v3_dto.py
index 0548bac5..a2a2cf37 100644
--- a/phrasetms_client/models/login_to_session_v3_dto.py
+++ b/phrasetms_client/models/login_to_session_v3_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class LoginToSessionV3Dto(BaseModel):
"""
@@ -33,14 +33,10 @@ class LoginToSessionV3Dto(BaseModel):
captcha_code: Optional[StrictStr] = Field(None, alias="captchaCode")
__properties = ["userUid", "userName", "password", "rememberMe", "twoFactorCode", "captchaCode"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> LoginToSessionV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> LoginToSessionV3Dto:
return None
if not isinstance(obj, dict):
- return LoginToSessionV3Dto.parse_obj(obj)
+ return LoginToSessionV3Dto.model_validate(obj)
- _obj = LoginToSessionV3Dto.parse_obj({
+ _obj = LoginToSessionV3Dto.model_validate({
"user_uid": obj.get("userUid"),
"user_name": obj.get("userName"),
"password": obj.get("password"),
diff --git a/phrasetms_client/models/login_user_dto.py b/phrasetms_client/models/login_user_dto.py
index 17954e0e..f0212883 100644
--- a/phrasetms_client/models/login_user_dto.py
+++ b/phrasetms_client/models/login_user_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.edition_dto import EditionDto
from phrasetms_client.models.features_dto import FeaturesDto
from phrasetms_client.models.organization_reference import OrganizationReference
@@ -36,14 +36,10 @@ class LoginUserDto(BaseModel):
features: Optional[FeaturesDto] = None
__properties = ["user", "csrfToken", "organization", "edition", "features"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> LoginUserDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +77,9 @@ def from_dict(cls, obj: dict) -> LoginUserDto:
return None
if not isinstance(obj, dict):
- return LoginUserDto.parse_obj(obj)
+ return LoginUserDto.model_validate(obj)
- _obj = LoginUserDto.parse_obj({
+ _obj = LoginUserDto.model_validate({
"user": UserReference.from_dict(obj.get("user")) if obj.get("user") is not None else None,
"csrf_token": obj.get("csrfToken"),
"organization": OrganizationReference.from_dict(obj.get("organization")) if obj.get("organization") is not None else None,
diff --git a/phrasetms_client/models/login_v3_dto.py b/phrasetms_client/models/login_v3_dto.py
index 9c2b350c..510329b8 100644
--- a/phrasetms_client/models/login_v3_dto.py
+++ b/phrasetms_client/models/login_v3_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class LoginV3Dto(BaseModel):
"""
@@ -31,14 +31,10 @@ class LoginV3Dto(BaseModel):
code: Optional[StrictStr] = Field(None, description="Required only for 2-factor authentication")
__properties = ["userUid", "userName", "password", "code"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> LoginV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> LoginV3Dto:
return None
if not isinstance(obj, dict):
- return LoginV3Dto.parse_obj(obj)
+ return LoginV3Dto.model_validate(obj)
- _obj = LoginV3Dto.parse_obj({
+ _obj = LoginV3Dto.model_validate({
"user_uid": obj.get("userUid"),
"user_name": obj.get("userName"),
"password": obj.get("password"),
diff --git a/phrasetms_client/models/login_with_apple_dto.py b/phrasetms_client/models/login_with_apple_dto.py
index 879a902d..6cd37438 100644
--- a/phrasetms_client/models/login_with_apple_dto.py
+++ b/phrasetms_client/models/login_with_apple_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class LoginWithAppleDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class LoginWithAppleDto(BaseModel):
code_or_refresh_token: StrictStr = Field(..., alias="codeOrRefreshToken")
__properties = ["codeOrRefreshToken"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> LoginWithAppleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> LoginWithAppleDto:
return None
if not isinstance(obj, dict):
- return LoginWithAppleDto.parse_obj(obj)
+ return LoginWithAppleDto.model_validate(obj)
- _obj = LoginWithAppleDto.parse_obj({
+ _obj = LoginWithAppleDto.model_validate({
"code_or_refresh_token": obj.get("codeOrRefreshToken")
})
return _obj
diff --git a/phrasetms_client/models/login_with_google_dto.py b/phrasetms_client/models/login_with_google_dto.py
index fac810af..04aaa8df 100644
--- a/phrasetms_client/models/login_with_google_dto.py
+++ b/phrasetms_client/models/login_with_google_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class LoginWithGoogleDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class LoginWithGoogleDto(BaseModel):
id_token: StrictStr = Field(..., alias="idToken")
__properties = ["idToken"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> LoginWithGoogleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> LoginWithGoogleDto:
return None
if not isinstance(obj, dict):
- return LoginWithGoogleDto.parse_obj(obj)
+ return LoginWithGoogleDto.model_validate(obj)
- _obj = LoginWithGoogleDto.parse_obj({
+ _obj = LoginWithGoogleDto.model_validate({
"id_token": obj.get("idToken")
})
return _obj
diff --git a/phrasetms_client/models/lqa.py b/phrasetms_client/models/lqa.py
index e78f6176..613b1fbd 100644
--- a/phrasetms_client/models/lqa.py
+++ b/phrasetms_client/models/lqa.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.comment_dto import CommentDto
from phrasetms_client.models.common_conversation_dto import CommonConversationDto
from phrasetms_client.models.lqa_references import LQAReferences
@@ -34,14 +34,10 @@ class LQA(CommonConversationDto):
lqa_description: Optional[StrictStr] = Field(None, alias="lqaDescription")
__properties = ["id", "type", "dateCreated", "dateModified", "dateEdited", "createdBy", "comments", "status", "deleted", "references", "lqaDescription"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> LQA:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -83,9 +79,9 @@ def from_dict(cls, obj: dict) -> LQA:
return None
if not isinstance(obj, dict):
- return LQA.parse_obj(obj)
+ return LQA.model_validate(obj)
- _obj = LQA.parse_obj({
+ _obj = LQA.model_validate({
"id": obj.get("id"),
"type": obj.get("type"),
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/lqa_all_of.py b/phrasetms_client/models/lqa_all_of.py
index 54daf398..5a68f003 100644
--- a/phrasetms_client/models/lqa_all_of.py
+++ b/phrasetms_client/models/lqa_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.lqa_references import LQAReferences
class LQAAllOf(BaseModel):
@@ -30,14 +30,10 @@ class LQAAllOf(BaseModel):
lqa_description: Optional[StrictStr] = Field(None, alias="lqaDescription")
__properties = ["references", "lqaDescription"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> LQAAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> LQAAllOf:
return None
if not isinstance(obj, dict):
- return LQAAllOf.parse_obj(obj)
+ return LQAAllOf.model_validate(obj)
- _obj = LQAAllOf.parse_obj({
+ _obj = LQAAllOf.model_validate({
"references": LQAReferences.from_dict(obj.get("references")) if obj.get("references") is not None else None,
"lqa_description": obj.get("lqaDescription")
})
diff --git a/phrasetms_client/models/lqa_conversation_dto.py b/phrasetms_client/models/lqa_conversation_dto.py
index 6b898968..441fa606 100644
--- a/phrasetms_client/models/lqa_conversation_dto.py
+++ b/phrasetms_client/models/lqa_conversation_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.comment_dto import CommentDto
from phrasetms_client.models.lqa_references import LQAReferences
from phrasetms_client.models.mentionable_user_dto import MentionableUserDto
@@ -35,21 +35,17 @@ class LQAConversationDto(BaseModel):
date_modified: Optional[datetime] = Field(None, alias="dateModified")
date_edited: Optional[datetime] = Field(None, alias="dateEdited")
created_by: Optional[MentionableUserDto] = Field(None, alias="createdBy")
- comments: Optional[conlist(CommentDto)] = None
+ comments: Optional[List[CommentDto]] = None
status: Optional[StatusDto] = None
deleted: Optional[StrictBool] = None
references: Optional[LQAReferences] = None
lqa_description: Optional[StrictStr] = Field(None, alias="lqaDescription")
__properties = ["id", "type", "dateCreated", "dateModified", "dateEdited", "createdBy", "comments", "status", "deleted", "references", "lqaDescription"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> LQAConversationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -91,9 +87,9 @@ def from_dict(cls, obj: dict) -> LQAConversationDto:
return None
if not isinstance(obj, dict):
- return LQAConversationDto.parse_obj(obj)
+ return LQAConversationDto.model_validate(obj)
- _obj = LQAConversationDto.parse_obj({
+ _obj = LQAConversationDto.model_validate({
"id": obj.get("id"),
"type": obj.get("type"),
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/lqa_conversations_list_dto.py b/phrasetms_client/models/lqa_conversations_list_dto.py
index abf05c6e..ee42e23f 100644
--- a/phrasetms_client/models/lqa_conversations_list_dto.py
+++ b/phrasetms_client/models/lqa_conversations_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.lqa_conversation_dto import LQAConversationDto
class LQAConversationsListDto(BaseModel):
"""
LQAConversationsListDto
"""
- conversations: Optional[conlist(LQAConversationDto)] = None
+ conversations: Optional[List[LQAConversationDto]] = None
__properties = ["conversations"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> LQAConversationsListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> LQAConversationsListDto:
return None
if not isinstance(obj, dict):
- return LQAConversationsListDto.parse_obj(obj)
+ return LQAConversationsListDto.model_validate(obj)
- _obj = LQAConversationsListDto.parse_obj({
+ _obj = LQAConversationsListDto.model_validate({
"conversations": [LQAConversationDto.from_dict(_item) for _item in obj.get("conversations")] if obj.get("conversations") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/lqa_error_category_dto.py b/phrasetms_client/models/lqa_error_category_dto.py
index 3cc29894..694b8934 100644
--- a/phrasetms_client/models/lqa_error_category_dto.py
+++ b/phrasetms_client/models/lqa_error_category_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class LqaErrorCategoryDto(BaseModel):
"""
@@ -28,17 +28,13 @@ class LqaErrorCategoryDto(BaseModel):
error_category_id: Optional[StrictInt] = Field(None, alias="errorCategoryId")
name: Optional[StrictStr] = None
enabled: Optional[StrictBool] = None
- error_categories: Optional[conlist(LqaErrorCategoryDto)] = Field(None, alias="errorCategories")
+ error_categories: Optional[List[LqaErrorCategoryDto]] = Field(None, alias="errorCategories")
__properties = ["errorCategoryId", "name", "enabled", "errorCategories"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> LqaErrorCategoryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> LqaErrorCategoryDto:
return None
if not isinstance(obj, dict):
- return LqaErrorCategoryDto.parse_obj(obj)
+ return LqaErrorCategoryDto.model_validate(obj)
- _obj = LqaErrorCategoryDto.parse_obj({
+ _obj = LqaErrorCategoryDto.model_validate({
"error_category_id": obj.get("errorCategoryId"),
"name": obj.get("name"),
"enabled": obj.get("enabled"),
diff --git a/phrasetms_client/models/lqa_profile_detail_dto.py b/phrasetms_client/models/lqa_profile_detail_dto.py
index 73d3ccad..9deeccfe 100644
--- a/phrasetms_client/models/lqa_profile_detail_dto.py
+++ b/phrasetms_client/models/lqa_profile_detail_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.error_categories_dto import ErrorCategoriesDto
from phrasetms_client.models.pass_fail_threshold_dto import PassFailThresholdDto
from phrasetms_client.models.penalty_points_dto import PenaltyPointsDto
@@ -41,14 +41,10 @@ class LqaProfileDetailDto(BaseModel):
organization: UidReference = Field(...)
__properties = ["uid", "name", "errorCategories", "penaltyPoints", "passFailThreshold", "isDefault", "createdBy", "dateCreated", "organization"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +57,7 @@ def from_json(cls, json_str: str) -> LqaProfileDetailDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> LqaProfileDetailDto:
return None
if not isinstance(obj, dict):
- return LqaProfileDetailDto.parse_obj(obj)
+ return LqaProfileDetailDto.model_validate(obj)
- _obj = LqaProfileDetailDto.parse_obj({
+ _obj = LqaProfileDetailDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"error_categories": ErrorCategoriesDto.from_dict(obj.get("errorCategories")) if obj.get("errorCategories") is not None else None,
diff --git a/phrasetms_client/models/lqa_profile_reference_dto.py b/phrasetms_client/models/lqa_profile_reference_dto.py
index baba7620..314ebac0 100644
--- a/phrasetms_client/models/lqa_profile_reference_dto.py
+++ b/phrasetms_client/models/lqa_profile_reference_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.uid_reference import UidReference
from phrasetms_client.models.user_reference import UserReference
@@ -35,14 +35,10 @@ class LqaProfileReferenceDto(BaseModel):
organization: UidReference = Field(...)
__properties = ["uid", "name", "isDefault", "createdBy", "dateCreated", "organization"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> LqaProfileReferenceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> LqaProfileReferenceDto:
return None
if not isinstance(obj, dict):
- return LqaProfileReferenceDto.parse_obj(obj)
+ return LqaProfileReferenceDto.model_validate(obj)
- _obj = LqaProfileReferenceDto.parse_obj({
+ _obj = LqaProfileReferenceDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"is_default": obj.get("isDefault"),
diff --git a/phrasetms_client/models/lqa_profiles_for_ws_v2_dto.py b/phrasetms_client/models/lqa_profiles_for_ws_v2_dto.py
index 28c920f7..9738da1e 100644
--- a/phrasetms_client/models/lqa_profiles_for_ws_v2_dto.py
+++ b/phrasetms_client/models/lqa_profiles_for_ws_v2_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.uid_reference import UidReference
@@ -31,14 +31,10 @@ class LqaProfilesForWsV2Dto(BaseModel):
lqa_profile: Optional[UidReference] = Field(None, alias="lqaProfile")
__properties = ["workflowStep", "lqaProfile"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> LqaProfilesForWsV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> LqaProfilesForWsV2Dto:
return None
if not isinstance(obj, dict):
- return LqaProfilesForWsV2Dto.parse_obj(obj)
+ return LqaProfilesForWsV2Dto.model_validate(obj)
- _obj = LqaProfilesForWsV2Dto.parse_obj({
+ _obj = LqaProfilesForWsV2Dto.model_validate({
"workflow_step": IdReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"lqa_profile": UidReference.from_dict(obj.get("lqaProfile")) if obj.get("lqaProfile") is not None else None
})
diff --git a/phrasetms_client/models/lqa_reference.py b/phrasetms_client/models/lqa_reference.py
index 641e92e8..bf67705a 100644
--- a/phrasetms_client/models/lqa_reference.py
+++ b/phrasetms_client/models/lqa_reference.py
@@ -18,21 +18,23 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, conint, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.id_reference import IdReference
class LQAReference(BaseModel):
"""
LQAReference
"""
- error_category_id: conint(strict=True, ge=1) = Field(..., alias="errorCategoryId")
- severity_id: conint(strict=True, ge=1) = Field(..., alias="severityId")
+ error_category_id: Annotated[int, Field(strict=True, ge=1)] = Field(..., alias="errorCategoryId")
+ severity_id: Annotated[int, Field(strict=True, ge=1)] = Field(..., alias="severityId")
user: Optional[IdReference] = None
repeated: Optional[StrictStr] = Field(None, description="Default: `NOT_REPEATED`")
__properties = ["errorCategoryId", "severityId", "user", "repeated"]
- @validator('repeated')
+ @field_validator('repeated')
+ @classmethod
def repeated_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -42,14 +44,10 @@ def repeated_validate_enum(cls, value):
raise ValueError("must be one of enum values ('REPEATED', 'NOT_REPEATED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +60,7 @@ def from_json(cls, json_str: str) -> LQAReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +76,9 @@ def from_dict(cls, obj: dict) -> LQAReference:
return None
if not isinstance(obj, dict):
- return LQAReference.parse_obj(obj)
+ return LQAReference.model_validate(obj)
- _obj = LQAReference.parse_obj({
+ _obj = LQAReference.model_validate({
"error_category_id": obj.get("errorCategoryId"),
"severity_id": obj.get("severityId"),
"user": IdReference.from_dict(obj.get("user")) if obj.get("user") is not None else None,
diff --git a/phrasetms_client/models/lqa_references.py b/phrasetms_client/models/lqa_references.py
index ead228c8..ec626971 100644
--- a/phrasetms_client/models/lqa_references.py
+++ b/phrasetms_client/models/lqa_references.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conint, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.lqa_reference import LQAReference
from phrasetms_client.models.reference_correlation import ReferenceCorrelation
@@ -29,23 +30,19 @@ class LQAReferences(BaseModel):
"""
task_id: Optional[StrictStr] = Field(None, alias="taskId")
job_part_uid: Optional[StrictStr] = Field(None, alias="jobPartUid")
- trans_group_id: conint(strict=True, ge=0) = Field(..., alias="transGroupId")
+ trans_group_id: Annotated[int, Field(strict=True, ge=0)] = Field(..., alias="transGroupId")
segment_id: StrictStr = Field(..., alias="segmentId")
conversation_title: Optional[StrictStr] = Field(None, alias="conversationTitle")
- conversation_title_offset: Optional[conint(strict=True, ge=0)] = Field(None, alias="conversationTitleOffset")
+ conversation_title_offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(None, alias="conversationTitleOffset")
commented_text: Optional[StrictStr] = Field(None, alias="commentedText")
correlation: Optional[ReferenceCorrelation] = None
- lqa: conlist(LQAReference, max_items=2147483647, min_items=1) = Field(...)
+ lqa: List[LQAReference] = Field(...)
__properties = ["taskId", "jobPartUid", "transGroupId", "segmentId", "conversationTitle", "conversationTitleOffset", "commentedText", "correlation", "lqa"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +55,7 @@ def from_json(cls, json_str: str) -> LQAReferences:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"task_id",
"job_part_uid",
@@ -83,9 +80,9 @@ def from_dict(cls, obj: dict) -> LQAReferences:
return None
if not isinstance(obj, dict):
- return LQAReferences.parse_obj(obj)
+ return LQAReferences.model_validate(obj)
- _obj = LQAReferences.parse_obj({
+ _obj = LQAReferences.model_validate({
"task_id": obj.get("taskId"),
"job_part_uid": obj.get("jobPartUid"),
"trans_group_id": obj.get("transGroupId"),
diff --git a/phrasetms_client/models/lqa_settings_dto.py b/phrasetms_client/models/lqa_settings_dto.py
index 2484c45a..1d589210 100644
--- a/phrasetms_client/models/lqa_settings_dto.py
+++ b/phrasetms_client/models/lqa_settings_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictBool, conlist
+from pydantic import BaseModel, ConfigDict, StrictBool
from phrasetms_client.models.lqa_error_category_dto import LqaErrorCategoryDto
from phrasetms_client.models.lqa_severity_dto import LqaSeverityDto
@@ -28,18 +28,14 @@ class LqaSettingsDto(BaseModel):
LqaSettingsDto
"""
enabled: Optional[StrictBool] = None
- severities: Optional[conlist(LqaSeverityDto)] = None
- categories: Optional[conlist(LqaErrorCategoryDto)] = None
+ severities: Optional[List[LqaSeverityDto]] = None
+ categories: Optional[List[LqaErrorCategoryDto]] = None
__properties = ["enabled", "severities", "categories"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> LqaSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> LqaSettingsDto:
return None
if not isinstance(obj, dict):
- return LqaSettingsDto.parse_obj(obj)
+ return LqaSettingsDto.model_validate(obj)
- _obj = LqaSettingsDto.parse_obj({
+ _obj = LqaSettingsDto.model_validate({
"enabled": obj.get("enabled"),
"severities": [LqaSeverityDto.from_dict(_item) for _item in obj.get("severities")] if obj.get("severities") is not None else None,
"categories": [LqaErrorCategoryDto.from_dict(_item) for _item in obj.get("categories")] if obj.get("categories") is not None else None
diff --git a/phrasetms_client/models/lqa_severity_dto.py b/phrasetms_client/models/lqa_severity_dto.py
index 89bd03b6..ebc8e985 100644
--- a/phrasetms_client/models/lqa_severity_dto.py
+++ b/phrasetms_client/models/lqa_severity_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class LqaSeverityDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class LqaSeverityDto(BaseModel):
weight: Optional[StrictInt] = None
__properties = ["severityId", "name", "weight"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> LqaSeverityDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> LqaSeverityDto:
return None
if not isinstance(obj, dict):
- return LqaSeverityDto.parse_obj(obj)
+ return LqaSeverityDto.model_validate(obj)
- _obj = LqaSeverityDto.parse_obj({
+ _obj = LqaSeverityDto.model_validate({
"severity_id": obj.get("severityId"),
"name": obj.get("name"),
"weight": obj.get("weight")
diff --git a/phrasetms_client/models/mac_settings_dto.py b/phrasetms_client/models/mac_settings_dto.py
index 868879d8..00a5cc65 100644
--- a/phrasetms_client/models/mac_settings_dto.py
+++ b/phrasetms_client/models/mac_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class MacSettingsDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class MacSettingsDto(BaseModel):
icu_sub_filter: Optional[StrictBool] = Field(None, alias="icuSubFilter", description="Default: `false`")
__properties = ["htmlSubfilter", "tagRegexp", "icuSubFilter"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MacSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> MacSettingsDto:
return None
if not isinstance(obj, dict):
- return MacSettingsDto.parse_obj(obj)
+ return MacSettingsDto.model_validate(obj)
- _obj = MacSettingsDto.parse_obj({
+ _obj = MacSettingsDto.model_validate({
"html_subfilter": obj.get("htmlSubfilter"),
"tag_regexp": obj.get("tagRegexp"),
"icu_sub_filter": obj.get("icuSubFilter")
diff --git a/phrasetms_client/models/machine_translate_response.py b/phrasetms_client/models/machine_translate_response.py
index dbe39403..8ec92655 100644
--- a/phrasetms_client/models/machine_translate_response.py
+++ b/phrasetms_client/models/machine_translate_response.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
class MachineTranslateResponse(BaseModel):
"""
MachineTranslateResponse
"""
- translations: Optional[conlist(StrictStr)] = None
+ translations: Optional[List[StrictStr]] = None
__properties = ["translations"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> MachineTranslateResponse:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> MachineTranslateResponse:
return None
if not isinstance(obj, dict):
- return MachineTranslateResponse.parse_obj(obj)
+ return MachineTranslateResponse.model_validate(obj)
- _obj = MachineTranslateResponse.parse_obj({
+ _obj = MachineTranslateResponse.model_validate({
"translations": obj.get("translations")
})
return _obj
diff --git a/phrasetms_client/models/machine_translate_settings_dto.py b/phrasetms_client/models/machine_translate_settings_dto.py
index 9f089801..11df9530 100644
--- a/phrasetms_client/models/machine_translate_settings_dto.py
+++ b/phrasetms_client/models/machine_translate_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.machine_translate_settings_langs_dto import MachineTranslateSettingsLangsDto
class MachineTranslateSettingsDto(BaseModel):
@@ -40,14 +40,10 @@ class MachineTranslateSettingsDto(BaseModel):
langs: Optional[MachineTranslateSettingsLangsDto] = None
__properties = ["id", "uid", "baseName", "name", "type", "category", "default_", "includeTags", "mtQualityEstimation", "enabled", "args", "langs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +56,7 @@ def from_json(cls, json_str: str) -> MachineTranslateSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> MachineTranslateSettingsDto:
return None
if not isinstance(obj, dict):
- return MachineTranslateSettingsDto.parse_obj(obj)
+ return MachineTranslateSettingsDto.model_validate(obj)
- _obj = MachineTranslateSettingsDto.parse_obj({
+ _obj = MachineTranslateSettingsDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"base_name": obj.get("baseName"),
diff --git a/phrasetms_client/models/machine_translate_settings_langs_dto.py b/phrasetms_client/models/machine_translate_settings_langs_dto.py
index 219de779..8b3ee4ab 100644
--- a/phrasetms_client/models/machine_translate_settings_langs_dto.py
+++ b/phrasetms_client/models/machine_translate_settings_langs_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class MachineTranslateSettingsLangsDto(BaseModel):
"""
@@ -27,17 +27,13 @@ class MachineTranslateSettingsLangsDto(BaseModel):
"""
id: Optional[StrictStr] = Field(None, description="Id")
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang", description="Source language for CUSTOMIZABLE engine")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs", description="List of target languages for the CUSTOMIZABLE engine")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs", description="List of target languages for the CUSTOMIZABLE engine")
__properties = ["id", "sourceLang", "targetLangs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MachineTranslateSettingsLangsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> MachineTranslateSettingsLangsDto:
return None
if not isinstance(obj, dict):
- return MachineTranslateSettingsLangsDto.parse_obj(obj)
+ return MachineTranslateSettingsLangsDto.model_validate(obj)
- _obj = MachineTranslateSettingsLangsDto.parse_obj({
+ _obj = MachineTranslateSettingsLangsDto.model_validate({
"id": obj.get("id"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs")
diff --git a/phrasetms_client/models/machine_translate_settings_pbm_dto.py b/phrasetms_client/models/machine_translate_settings_pbm_dto.py
index 32ed2d69..1827c918 100644
--- a/phrasetms_client/models/machine_translate_settings_pbm_dto.py
+++ b/phrasetms_client/models/machine_translate_settings_pbm_dto.py
@@ -19,7 +19,7 @@
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.machine_translate_settings_langs_dto import MachineTranslateSettingsLangsDto
class MachineTranslateSettingsPbmDto(BaseModel):
@@ -42,14 +42,10 @@ class MachineTranslateSettingsPbmDto(BaseModel):
langs: Optional[MachineTranslateSettingsLangsDto] = None
__properties = ["id", "uid", "baseName", "name", "type", "default_", "includeTags", "mtQualityEstimation", "args", "payForMtPossible", "payForMtActive", "charCount", "sharingSettings", "langs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> MachineTranslateSettingsPbmDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +74,9 @@ def from_dict(cls, obj: dict) -> MachineTranslateSettingsPbmDto:
return None
if not isinstance(obj, dict):
- return MachineTranslateSettingsPbmDto.parse_obj(obj)
+ return MachineTranslateSettingsPbmDto.model_validate(obj)
- _obj = MachineTranslateSettingsPbmDto.parse_obj({
+ _obj = MachineTranslateSettingsPbmDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"base_name": obj.get("baseName"),
diff --git a/phrasetms_client/models/machine_translate_settings_reference.py b/phrasetms_client/models/machine_translate_settings_reference.py
index a8f1946d..42cb6d75 100644
--- a/phrasetms_client/models/machine_translate_settings_reference.py
+++ b/phrasetms_client/models/machine_translate_settings_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class MachineTranslateSettingsReference(BaseModel):
"""
@@ -31,14 +31,10 @@ class MachineTranslateSettingsReference(BaseModel):
type: Optional[StrictStr] = None
__properties = ["id", "uid", "name", "type"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> MachineTranslateSettingsReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> MachineTranslateSettingsReference:
return None
if not isinstance(obj, dict):
- return MachineTranslateSettingsReference.parse_obj(obj)
+ return MachineTranslateSettingsReference.model_validate(obj)
- _obj = MachineTranslateSettingsReference.parse_obj({
+ _obj = MachineTranslateSettingsReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/machine_translate_status_dto.py b/phrasetms_client/models/machine_translate_status_dto.py
index 7c4dc709..0149a154 100644
--- a/phrasetms_client/models/machine_translate_status_dto.py
+++ b/phrasetms_client/models/machine_translate_status_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
class MachineTranslateStatusDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class MachineTranslateStatusDto(BaseModel):
error: Optional[StrictStr] = None
__properties = ["uid", "ok", "error"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MachineTranslateStatusDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> MachineTranslateStatusDto:
return None
if not isinstance(obj, dict):
- return MachineTranslateStatusDto.parse_obj(obj)
+ return MachineTranslateStatusDto.model_validate(obj)
- _obj = MachineTranslateStatusDto.parse_obj({
+ _obj = MachineTranslateStatusDto.model_validate({
"uid": obj.get("uid"),
"ok": obj.get("ok"),
"error": obj.get("error")
diff --git a/phrasetms_client/models/machine_translation_settings_dto.py b/phrasetms_client/models/machine_translation_settings_dto.py
index c236bf87..c8ee765a 100644
--- a/phrasetms_client/models/machine_translation_settings_dto.py
+++ b/phrasetms_client/models/machine_translation_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class MachineTranslationSettingsDto(BaseModel):
"""
@@ -33,14 +33,10 @@ class MachineTranslationSettingsDto(BaseModel):
mt_for_tm_above100: Optional[StrictBool] = Field(None, alias="mtForTMAbove100", description="Use machine translation for segments with a TM match of 100% or more. Default: false")
__properties = ["useMachineTranslation", "lock100PercentMatches", "confirm100PercentMatches", "useAltTransOnly", "mtQeMatchesInEditors", "mtForTMAbove100"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> MachineTranslationSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> MachineTranslationSettingsDto:
return None
if not isinstance(obj, dict):
- return MachineTranslationSettingsDto.parse_obj(obj)
+ return MachineTranslationSettingsDto.model_validate(obj)
- _obj = MachineTranslationSettingsDto.parse_obj({
+ _obj = MachineTranslationSettingsDto.model_validate({
"use_machine_translation": obj.get("useMachineTranslation"),
"lock100_percent_matches": obj.get("lock100PercentMatches"),
"confirm100_percent_matches": obj.get("confirm100PercentMatches"),
diff --git a/phrasetms_client/models/magento.py b/phrasetms_client/models/magento.py
index ab5f27dc..f6a63396 100644
--- a/phrasetms_client/models/magento.py
+++ b/phrasetms_client/models/magento.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Magento(AbstractConnectorDto):
@@ -30,14 +30,10 @@ class Magento(AbstractConnectorDto):
token: StrictStr = Field(...)
__properties = ["name", "type", "host", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> Magento:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> Magento:
return None
if not isinstance(obj, dict):
- return Magento.parse_obj(obj)
+ return Magento.model_validate(obj)
- _obj = Magento.parse_obj({
+ _obj = Magento.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/malformed_warning_dto.py b/phrasetms_client/models/malformed_warning_dto.py
index 11d65c19..e45be996 100644
--- a/phrasetms_client/models/malformed_warning_dto.py
+++ b/phrasetms_client/models/malformed_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class MalformedWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class MalformedWarningDto(SegmentWarning):
message: Optional[StrictStr] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "message"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MalformedWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MalformedWarningDto:
return None
if not isinstance(obj, dict):
- return MalformedWarningDto.parse_obj(obj)
+ return MalformedWarningDto.model_validate(obj)
- _obj = MalformedWarningDto.parse_obj({
+ _obj = MalformedWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/malformed_warning_dto_all_of.py b/phrasetms_client/models/malformed_warning_dto_all_of.py
index 8185a5e6..4f856664 100644
--- a/phrasetms_client/models/malformed_warning_dto_all_of.py
+++ b/phrasetms_client/models/malformed_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class MalformedWarningDtoAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class MalformedWarningDtoAllOf(BaseModel):
message: Optional[StrictStr] = None
__properties = ["message"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> MalformedWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> MalformedWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return MalformedWarningDtoAllOf.parse_obj(obj)
+ return MalformedWarningDtoAllOf.model_validate(obj)
- _obj = MalformedWarningDtoAllOf.parse_obj({
+ _obj = MalformedWarningDtoAllOf.model_validate({
"message": obj.get("message")
})
return _obj
diff --git a/phrasetms_client/models/marketo.py b/phrasetms_client/models/marketo.py
index 9fede181..35c30726 100644
--- a/phrasetms_client/models/marketo.py
+++ b/phrasetms_client/models/marketo.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
from phrasetms_client.models.marketo_segmentation_mapping_dto import MarketoSegmentationMappingDto
from phrasetms_client.models.variable_dto import VariableDto
@@ -32,20 +32,16 @@ class Marketo(AbstractConnectorDto):
api_secret: StrictStr = Field(..., alias="apiSecret")
identity_url: StrictStr = Field(..., alias="identityURL")
connector_type: StrictStr = Field(..., alias="connectorType")
- variables: Optional[conlist(VariableDto)] = None
+ variables: Optional[List[VariableDto]] = None
segmentation_mapping: Optional[MarketoSegmentationMappingDto] = Field(None, alias="segmentationMapping")
translate_tokens: Optional[StrictBool] = Field(None, alias="translateTokens")
debug_mode: Optional[StrictBool] = Field(None, alias="debugMode")
__properties = ["name", "type", "apiKey", "apiSecret", "identityURL", "connectorType", "variables", "segmentationMapping", "translateTokens", "debugMode"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +54,7 @@ def from_json(cls, json_str: str) -> Marketo:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +77,9 @@ def from_dict(cls, obj: dict) -> Marketo:
return None
if not isinstance(obj, dict):
- return Marketo.parse_obj(obj)
+ return Marketo.model_validate(obj)
- _obj = Marketo.parse_obj({
+ _obj = Marketo.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"api_key": obj.get("apiKey"),
diff --git a/phrasetms_client/models/marketo_all_of.py b/phrasetms_client/models/marketo_all_of.py
index 0d1fd4d0..fa1e08fc 100644
--- a/phrasetms_client/models/marketo_all_of.py
+++ b/phrasetms_client/models/marketo_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.marketo_segmentation_mapping_dto import MarketoSegmentationMappingDto
from phrasetms_client.models.variable_dto import VariableDto
@@ -31,20 +31,16 @@ class MarketoAllOf(BaseModel):
api_secret: StrictStr = Field(..., alias="apiSecret")
identity_url: StrictStr = Field(..., alias="identityURL")
connector_type: StrictStr = Field(..., alias="connectorType")
- variables: Optional[conlist(VariableDto)] = None
+ variables: Optional[List[VariableDto]] = None
segmentation_mapping: Optional[MarketoSegmentationMappingDto] = Field(None, alias="segmentationMapping")
translate_tokens: Optional[StrictBool] = Field(None, alias="translateTokens")
debug_mode: Optional[StrictBool] = Field(None, alias="debugMode")
__properties = ["apiKey", "apiSecret", "identityURL", "connectorType", "variables", "segmentationMapping", "translateTokens", "debugMode"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> MarketoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +76,9 @@ def from_dict(cls, obj: dict) -> MarketoAllOf:
return None
if not isinstance(obj, dict):
- return MarketoAllOf.parse_obj(obj)
+ return MarketoAllOf.model_validate(obj)
- _obj = MarketoAllOf.parse_obj({
+ _obj = MarketoAllOf.model_validate({
"api_key": obj.get("apiKey"),
"api_secret": obj.get("apiSecret"),
"identity_url": obj.get("identityURL"),
diff --git a/phrasetms_client/models/marketo_segment_mapping_dto.py b/phrasetms_client/models/marketo_segment_mapping_dto.py
index 10fe6700..19919a8b 100644
--- a/phrasetms_client/models/marketo_segment_mapping_dto.py
+++ b/phrasetms_client/models/marketo_segment_mapping_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class MarketoSegmentMappingDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class MarketoSegmentMappingDto(BaseModel):
source: Optional[StrictBool] = None
__properties = ["segmentId", "locale", "source"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MarketoSegmentMappingDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> MarketoSegmentMappingDto:
return None
if not isinstance(obj, dict):
- return MarketoSegmentMappingDto.parse_obj(obj)
+ return MarketoSegmentMappingDto.model_validate(obj)
- _obj = MarketoSegmentMappingDto.parse_obj({
+ _obj = MarketoSegmentMappingDto.model_validate({
"segment_id": obj.get("segmentId"),
"locale": obj.get("locale"),
"source": obj.get("source")
diff --git a/phrasetms_client/models/marketo_segmentation_mapping_dto.py b/phrasetms_client/models/marketo_segmentation_mapping_dto.py
index 8239d61d..ba3f042f 100644
--- a/phrasetms_client/models/marketo_segmentation_mapping_dto.py
+++ b/phrasetms_client/models/marketo_segmentation_mapping_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.marketo_segment_mapping_dto import MarketoSegmentMappingDto
class MarketoSegmentationMappingDto(BaseModel):
@@ -27,17 +27,13 @@ class MarketoSegmentationMappingDto(BaseModel):
MarketoSegmentationMappingDto
"""
segmentation_id: Optional[StrictInt] = Field(None, alias="segmentationId")
- segments_mapping: Optional[conlist(MarketoSegmentMappingDto)] = Field(None, alias="segmentsMapping")
+ segments_mapping: Optional[List[MarketoSegmentMappingDto]] = Field(None, alias="segmentsMapping")
__properties = ["segmentationId", "segmentsMapping"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MarketoSegmentationMappingDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> MarketoSegmentationMappingDto:
return None
if not isinstance(obj, dict):
- return MarketoSegmentationMappingDto.parse_obj(obj)
+ return MarketoSegmentationMappingDto.model_validate(obj)
- _obj = MarketoSegmentationMappingDto.parse_obj({
+ _obj = MarketoSegmentationMappingDto.model_validate({
"segmentation_id": obj.get("segmentationId"),
"segments_mapping": [MarketoSegmentMappingDto.from_dict(_item) for _item in obj.get("segmentsMapping")] if obj.get("segmentsMapping") is not None else None
})
diff --git a/phrasetms_client/models/match.py b/phrasetms_client/models/match.py
index 647096f3..3d020577 100644
--- a/phrasetms_client/models/match.py
+++ b/phrasetms_client/models/match.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class Match(BaseModel):
"""
@@ -29,14 +29,10 @@ class Match(BaseModel):
text: Optional[StrictStr] = None
__properties = ["beginIndex", "text"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> Match:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> Match:
return None
if not isinstance(obj, dict):
- return Match.parse_obj(obj)
+ return Match.model_validate(obj)
- _obj = Match.parse_obj({
+ _obj = Match.model_validate({
"begin_index": obj.get("beginIndex"),
"text": obj.get("text")
})
diff --git a/phrasetms_client/models/match_counts101_dto.py b/phrasetms_client/models/match_counts101_dto.py
index 0f4e7a21..386ded79 100644
--- a/phrasetms_client/models/match_counts101_dto.py
+++ b/phrasetms_client/models/match_counts101_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.counts_dto import CountsDto
class MatchCounts101Dto(BaseModel):
@@ -35,14 +35,10 @@ class MatchCounts101Dto(BaseModel):
match101: Optional[CountsDto] = None
__properties = ["match100", "match95", "match85", "match75", "match50", "match0", "match101"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> MatchCounts101Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> MatchCounts101Dto:
return None
if not isinstance(obj, dict):
- return MatchCounts101Dto.parse_obj(obj)
+ return MatchCounts101Dto.model_validate(obj)
- _obj = MatchCounts101Dto.parse_obj({
+ _obj = MatchCounts101Dto.model_validate({
"match100": CountsDto.from_dict(obj.get("match100")) if obj.get("match100") is not None else None,
"match95": CountsDto.from_dict(obj.get("match95")) if obj.get("match95") is not None else None,
"match85": CountsDto.from_dict(obj.get("match85")) if obj.get("match85") is not None else None,
diff --git a/phrasetms_client/models/match_counts_dto.py b/phrasetms_client/models/match_counts_dto.py
index e6ccdda9..198effd4 100644
--- a/phrasetms_client/models/match_counts_dto.py
+++ b/phrasetms_client/models/match_counts_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.counts_dto import CountsDto
class MatchCountsDto(BaseModel):
@@ -34,14 +34,10 @@ class MatchCountsDto(BaseModel):
match0: Optional[CountsDto] = None
__properties = ["match100", "match95", "match85", "match75", "match50", "match0"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> MatchCountsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -85,9 +81,9 @@ def from_dict(cls, obj: dict) -> MatchCountsDto:
return None
if not isinstance(obj, dict):
- return MatchCountsDto.parse_obj(obj)
+ return MatchCountsDto.model_validate(obj)
- _obj = MatchCountsDto.parse_obj({
+ _obj = MatchCountsDto.model_validate({
"match100": CountsDto.from_dict(obj.get("match100")) if obj.get("match100") is not None else None,
"match95": CountsDto.from_dict(obj.get("match95")) if obj.get("match95") is not None else None,
"match85": CountsDto.from_dict(obj.get("match85")) if obj.get("match85") is not None else None,
diff --git a/phrasetms_client/models/match_counts_nt_dto.py b/phrasetms_client/models/match_counts_nt_dto.py
index 5cc6aa1d..e038e5c3 100644
--- a/phrasetms_client/models/match_counts_nt_dto.py
+++ b/phrasetms_client/models/match_counts_nt_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.counts_dto import CountsDto
class MatchCountsNTDto(BaseModel):
@@ -34,14 +34,10 @@ class MatchCountsNTDto(BaseModel):
match0: Optional[CountsDto] = None
__properties = ["match100", "match95", "match85", "match75", "match50", "match0"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> MatchCountsNTDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -85,9 +81,9 @@ def from_dict(cls, obj: dict) -> MatchCountsNTDto:
return None
if not isinstance(obj, dict):
- return MatchCountsNTDto.parse_obj(obj)
+ return MatchCountsNTDto.model_validate(obj)
- _obj = MatchCountsNTDto.parse_obj({
+ _obj = MatchCountsNTDto.model_validate({
"match100": CountsDto.from_dict(obj.get("match100")) if obj.get("match100") is not None else None,
"match95": CountsDto.from_dict(obj.get("match95")) if obj.get("match95") is not None else None,
"match85": CountsDto.from_dict(obj.get("match85")) if obj.get("match85") is not None else None,
diff --git a/phrasetms_client/models/match_counts_nt_dto_v1.py b/phrasetms_client/models/match_counts_nt_dto_v1.py
index 9320ded1..6c4454a9 100644
--- a/phrasetms_client/models/match_counts_nt_dto_v1.py
+++ b/phrasetms_client/models/match_counts_nt_dto_v1.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.counts_dto import CountsDto
class MatchCountsNTDtoV1(BaseModel):
@@ -30,14 +30,10 @@ class MatchCountsNTDtoV1(BaseModel):
match99: Optional[CountsDto] = None
__properties = ["match100", "match99"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MatchCountsNTDtoV1:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> MatchCountsNTDtoV1:
return None
if not isinstance(obj, dict):
- return MatchCountsNTDtoV1.parse_obj(obj)
+ return MatchCountsNTDtoV1.model_validate(obj)
- _obj = MatchCountsNTDtoV1.parse_obj({
+ _obj = MatchCountsNTDtoV1.model_validate({
"match100": CountsDto.from_dict(obj.get("match100")) if obj.get("match100") is not None else None,
"match99": CountsDto.from_dict(obj.get("match99")) if obj.get("match99") is not None else None
})
diff --git a/phrasetms_client/models/md_settings_dto.py b/phrasetms_client/models/md_settings_dto.py
index f9fe79bb..799bc012 100644
--- a/phrasetms_client/models/md_settings_dto.py
+++ b/phrasetms_client/models/md_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class MdSettingsDto(BaseModel):
"""
@@ -37,7 +37,8 @@ class MdSettingsDto(BaseModel):
exclude_code_elements: Optional[StrictBool] = Field(None, alias="excludeCodeElements", description="Default: false")
__properties = ["hardLineBreaksSegments", "preserveWhiteSpaces", "tagRegexp", "customElements", "ignoredBlockPrefixes", "flavor", "processJekyllFrontMatter", "extractCodeBlocks", "notEscapedCharacters", "excludeCodeElements"]
- @validator('flavor')
+ @field_validator('flavor')
+ @classmethod
def flavor_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -47,14 +48,10 @@ def flavor_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PLAIN', 'PHP', 'GITHUB')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +64,7 @@ def from_json(cls, json_str: str) -> MdSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +77,9 @@ def from_dict(cls, obj: dict) -> MdSettingsDto:
return None
if not isinstance(obj, dict):
- return MdSettingsDto.parse_obj(obj)
+ return MdSettingsDto.model_validate(obj)
- _obj = MdSettingsDto.parse_obj({
+ _obj = MdSettingsDto.model_validate({
"hard_line_breaks_segments": obj.get("hardLineBreaksSegments"),
"preserve_white_spaces": obj.get("preserveWhiteSpaces"),
"tag_regexp": obj.get("tagRegexp"),
diff --git a/phrasetms_client/models/mem_trans_machine_translate_settings_dto.py b/phrasetms_client/models/mem_trans_machine_translate_settings_dto.py
index 4a3ededd..5ecf22f8 100644
--- a/phrasetms_client/models/mem_trans_machine_translate_settings_dto.py
+++ b/phrasetms_client/models/mem_trans_machine_translate_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.machine_translate_settings_langs_dto import MachineTranslateSettingsLangsDto
class MemTransMachineTranslateSettingsDto(BaseModel):
@@ -42,14 +42,10 @@ class MemTransMachineTranslateSettingsDto(BaseModel):
char_count: Optional[StrictInt] = Field(None, alias="charCount", description="Unknown value is represented by value: -1")
__properties = ["id", "uid", "baseName", "name", "type", "category", "default_", "includeTags", "mtQualityEstimation", "enabled", "glossarySupported", "args", "langs", "charCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +58,7 @@ def from_json(cls, json_str: str) -> MemTransMachineTranslateSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +74,9 @@ def from_dict(cls, obj: dict) -> MemTransMachineTranslateSettingsDto:
return None
if not isinstance(obj, dict):
- return MemTransMachineTranslateSettingsDto.parse_obj(obj)
+ return MemTransMachineTranslateSettingsDto.model_validate(obj)
- _obj = MemTransMachineTranslateSettingsDto.parse_obj({
+ _obj = MemTransMachineTranslateSettingsDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"base_name": obj.get("baseName"),
diff --git a/phrasetms_client/models/memsource_translate_profile_simple_dto.py b/phrasetms_client/models/memsource_translate_profile_simple_dto.py
index 2e960b32..dc492407 100644
--- a/phrasetms_client/models/memsource_translate_profile_simple_dto.py
+++ b/phrasetms_client/models/memsource_translate_profile_simple_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.mem_trans_machine_translate_settings_dto import MemTransMachineTranslateSettingsDto
from phrasetms_client.models.user_reference import UserReference
@@ -35,14 +35,10 @@ class MemsourceTranslateProfileSimpleDto(BaseModel):
locked: Optional[StrictBool] = None
__properties = ["uid", "name", "dateCreated", "createdBy", "memsourceTranslate", "locked"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> MemsourceTranslateProfileSimpleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> MemsourceTranslateProfileSimpleDto:
return None
if not isinstance(obj, dict):
- return MemsourceTranslateProfileSimpleDto.parse_obj(obj)
+ return MemsourceTranslateProfileSimpleDto.model_validate(obj)
- _obj = MemsourceTranslateProfileSimpleDto.parse_obj({
+ _obj = MemsourceTranslateProfileSimpleDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/mention_dto.py b/phrasetms_client/models/mention_dto.py
index 513d539b..ecfab391 100644
--- a/phrasetms_client/models/mention_dto.py
+++ b/phrasetms_client/models/mention_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.mentionable_group_dto import MentionableGroupDto
from phrasetms_client.models.mentionable_user_dto import MentionableUserDto
from phrasetms_client.models.uid_reference import UidReference
@@ -31,19 +31,21 @@ class MentionDto(BaseModel):
mention_type: StrictStr = Field(..., alias="mentionType")
mention_group_type: Optional[StrictStr] = Field(None, alias="mentionGroupType")
uid_reference: Optional[UidReference] = Field(None, alias="uidReference")
- user_references: Optional[conlist(MentionableUserDto)] = Field(None, alias="userReferences")
+ user_references: Optional[List[MentionableUserDto]] = Field(None, alias="userReferences")
mentionable_group: Optional[MentionableGroupDto] = Field(None, alias="mentionableGroup")
tag: Optional[StrictStr] = None
__properties = ["mentionType", "mentionGroupType", "uidReference", "userReferences", "mentionableGroup", "tag"]
- @validator('mention_type')
+ @field_validator('mention_type')
+ @classmethod
def mention_type_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('USER', 'GROUP'):
raise ValueError("must be one of enum values ('USER', 'GROUP')")
return value
- @validator('mention_group_type')
+ @field_validator('mention_group_type')
+ @classmethod
def mention_group_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -53,14 +55,10 @@ def mention_group_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('JOB', 'OWNERS', 'PROVIDERS', 'GUESTS', 'WORKFLOW_STEP')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -73,7 +71,7 @@ def from_json(cls, json_str: str) -> MentionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -99,9 +97,9 @@ def from_dict(cls, obj: dict) -> MentionDto:
return None
if not isinstance(obj, dict):
- return MentionDto.parse_obj(obj)
+ return MentionDto.model_validate(obj)
- _obj = MentionDto.parse_obj({
+ _obj = MentionDto.model_validate({
"mention_type": obj.get("mentionType"),
"mention_group_type": obj.get("mentionGroupType"),
"uid_reference": UidReference.from_dict(obj.get("uidReference")) if obj.get("uidReference") is not None else None,
diff --git a/phrasetms_client/models/mentionable_group_dto.py b/phrasetms_client/models/mentionable_group_dto.py
index f9543b3a..1d037924 100644
--- a/phrasetms_client/models/mentionable_group_dto.py
+++ b/phrasetms_client/models/mentionable_group_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.uid_reference import UidReference
class MentionableGroupDto(BaseModel):
@@ -31,7 +31,8 @@ class MentionableGroupDto(BaseModel):
group_reference: Optional[UidReference] = Field(None, alias="groupReference")
__properties = ["groupType", "groupName", "groupReference"]
- @validator('group_type')
+ @field_validator('group_type')
+ @classmethod
def group_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -41,14 +42,10 @@ def group_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('JOB', 'OWNERS', 'PROVIDERS', 'GUESTS', 'WORKFLOW_STEP')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +58,7 @@ def from_json(cls, json_str: str) -> MentionableGroupDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +74,9 @@ def from_dict(cls, obj: dict) -> MentionableGroupDto:
return None
if not isinstance(obj, dict):
- return MentionableGroupDto.parse_obj(obj)
+ return MentionableGroupDto.model_validate(obj)
- _obj = MentionableGroupDto.parse_obj({
+ _obj = MentionableGroupDto.model_validate({
"group_type": obj.get("groupType"),
"group_name": obj.get("groupName"),
"group_reference": UidReference.from_dict(obj.get("groupReference")) if obj.get("groupReference") is not None else None
diff --git a/phrasetms_client/models/mentionable_user_dto.py b/phrasetms_client/models/mentionable_user_dto.py
index cd2b6b4c..c8d6f7cc 100644
--- a/phrasetms_client/models/mentionable_user_dto.py
+++ b/phrasetms_client/models/mentionable_user_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.job_role_dto import JobRoleDto
class MentionableUserDto(BaseModel):
@@ -34,10 +34,11 @@ class MentionableUserDto(BaseModel):
id: Optional[StrictStr] = None
uid: Optional[StrictStr] = None
unavailable: Optional[StrictBool] = None
- job_roles: Optional[conlist(JobRoleDto)] = Field(None, alias="jobRoles")
+ job_roles: Optional[List[JobRoleDto]] = Field(None, alias="jobRoles")
__properties = ["firstName", "lastName", "userName", "email", "role", "id", "uid", "unavailable", "jobRoles"]
- @validator('role')
+ @field_validator('role')
+ @classmethod
def role_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -47,14 +48,10 @@ def role_validate_enum(cls, value):
raise ValueError("must be one of enum values ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +64,7 @@ def from_json(cls, json_str: str) -> MentionableUserDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +84,9 @@ def from_dict(cls, obj: dict) -> MentionableUserDto:
return None
if not isinstance(obj, dict):
- return MentionableUserDto.parse_obj(obj)
+ return MentionableUserDto.model_validate(obj)
- _obj = MentionableUserDto.parse_obj({
+ _obj = MentionableUserDto.model_validate({
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/metadata_field.py b/phrasetms_client/models/metadata_field.py
index e5684385..9fa3f8bf 100644
--- a/phrasetms_client/models/metadata_field.py
+++ b/phrasetms_client/models/metadata_field.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr, validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
class MetadataField(BaseModel):
"""
@@ -28,7 +28,8 @@ class MetadataField(BaseModel):
type: Optional[StrictStr] = None
__properties = ["type"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -38,14 +39,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('CLIENT', 'DOMAIN', 'SUBDOMAIN', 'FILENAME')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +55,7 @@ def from_json(cls, json_str: str) -> MetadataField:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +68,9 @@ def from_dict(cls, obj: dict) -> MetadataField:
return None
if not isinstance(obj, dict):
- return MetadataField.parse_obj(obj)
+ return MetadataField.model_validate(obj)
- _obj = MetadataField.parse_obj({
+ _obj = MetadataField.model_validate({
"type": obj.get("type")
})
return _obj
diff --git a/phrasetms_client/models/metadata_option_reference.py b/phrasetms_client/models/metadata_option_reference.py
index 255622a2..a03e0e68 100644
--- a/phrasetms_client/models/metadata_option_reference.py
+++ b/phrasetms_client/models/metadata_option_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class MetadataOptionReference(BaseModel):
"""
@@ -29,14 +29,10 @@ class MetadataOptionReference(BaseModel):
value: Optional[StrictStr] = None
__properties = ["uid", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MetadataOptionReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MetadataOptionReference:
return None
if not isinstance(obj, dict):
- return MetadataOptionReference.parse_obj(obj)
+ return MetadataOptionReference.model_validate(obj)
- _obj = MetadataOptionReference.parse_obj({
+ _obj = MetadataOptionReference.model_validate({
"uid": obj.get("uid"),
"value": obj.get("value")
})
diff --git a/phrasetms_client/models/metadata_priority_settings_dto.py b/phrasetms_client/models/metadata_priority_settings_dto.py
index de6f94e7..d26f0278 100644
--- a/phrasetms_client/models/metadata_priority_settings_dto.py
+++ b/phrasetms_client/models/metadata_priority_settings_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.metadata_field import MetadataField
class MetadataPrioritySettingsDto(BaseModel):
"""
MetadataPrioritySettingsDto
"""
- prioritized_fields: Optional[conlist(MetadataField)] = Field(None, alias="prioritizedFields")
+ prioritized_fields: Optional[List[MetadataField]] = Field(None, alias="prioritizedFields")
__properties = ["prioritizedFields"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MetadataPrioritySettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> MetadataPrioritySettingsDto:
return None
if not isinstance(obj, dict):
- return MetadataPrioritySettingsDto.parse_obj(obj)
+ return MetadataPrioritySettingsDto.model_validate(obj)
- _obj = MetadataPrioritySettingsDto.parse_obj({
+ _obj = MetadataPrioritySettingsDto.model_validate({
"prioritized_fields": [MetadataField.from_dict(_item) for _item in obj.get("prioritizedFields")] if obj.get("prioritizedFields") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/metadata_reference.py b/phrasetms_client/models/metadata_reference.py
index f02b8626..925a24d5 100644
--- a/phrasetms_client/models/metadata_reference.py
+++ b/phrasetms_client/models/metadata_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.metadata_option_reference import MetadataOptionReference
class MetadataReference(BaseModel):
@@ -29,17 +29,13 @@ class MetadataReference(BaseModel):
uid: Optional[StrictStr] = None
field_name: Optional[StrictStr] = Field(None, alias="fieldName")
value: Optional[StrictStr] = None
- options: Optional[conlist(MetadataOptionReference)] = None
+ options: Optional[List[MetadataOptionReference]] = None
__properties = ["uid", "fieldName", "value", "options"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> MetadataReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> MetadataReference:
return None
if not isinstance(obj, dict):
- return MetadataReference.parse_obj(obj)
+ return MetadataReference.model_validate(obj)
- _obj = MetadataReference.parse_obj({
+ _obj = MetadataReference.model_validate({
"uid": obj.get("uid"),
"field_name": obj.get("fieldName"),
"value": obj.get("value"),
diff --git a/phrasetms_client/models/metadata_response.py b/phrasetms_client/models/metadata_response.py
index 7c66337d..f46bd0db 100644
--- a/phrasetms_client/models/metadata_response.py
+++ b/phrasetms_client/models/metadata_response.py
@@ -19,7 +19,7 @@
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.language_metadata1 import LanguageMetadata1
class MetadataResponse(BaseModel):
@@ -31,14 +31,10 @@ class MetadataResponse(BaseModel):
metadata_by_language: Optional[Dict[str, LanguageMetadata1]] = Field(None, alias="metadataByLanguage")
__properties = ["segmentsCount", "deduplicatedSegmentsCount", "metadataByLanguage"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> MetadataResponse:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> MetadataResponse:
return None
if not isinstance(obj, dict):
- return MetadataResponse.parse_obj(obj)
+ return MetadataResponse.model_validate(obj)
- _obj = MetadataResponse.parse_obj({
+ _obj = MetadataResponse.model_validate({
"segments_count": obj.get("segmentsCount"),
"deduplicated_segments_count": obj.get("deduplicatedSegmentsCount"),
"metadata_by_language": dict(
diff --git a/phrasetms_client/models/metadata_tb_dto.py b/phrasetms_client/models/metadata_tb_dto.py
index 592a250f..cc06e9b8 100644
--- a/phrasetms_client/models/metadata_tb_dto.py
+++ b/phrasetms_client/models/metadata_tb_dto.py
@@ -19,7 +19,7 @@
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class MetadataTbDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class MetadataTbDto(BaseModel):
metadata_by_language: Optional[Dict[str, StrictInt]] = Field(None, alias="metadataByLanguage")
__properties = ["termsCount", "metadataByLanguage"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MetadataTbDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MetadataTbDto:
return None
if not isinstance(obj, dict):
- return MetadataTbDto.parse_obj(obj)
+ return MetadataTbDto.model_validate(obj)
- _obj = MetadataTbDto.parse_obj({
+ _obj = MetadataTbDto.model_validate({
"terms_count": obj.get("termsCount"),
"metadata_by_language": obj.get("metadataByLanguage")
})
diff --git a/phrasetms_client/models/microsoft_azure.py b/phrasetms_client/models/microsoft_azure.py
index 9a1df26b..32815f53 100644
--- a/phrasetms_client/models/microsoft_azure.py
+++ b/phrasetms_client/models/microsoft_azure.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class MicrosoftAzure(AbstractConnectorDto):
@@ -29,14 +29,10 @@ class MicrosoftAzure(AbstractConnectorDto):
connection_string: StrictStr = Field(..., alias="connectionString", description="Microsoft azure connection string")
__properties = ["name", "type", "connectionString"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MicrosoftAzure:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MicrosoftAzure:
return None
if not isinstance(obj, dict):
- return MicrosoftAzure.parse_obj(obj)
+ return MicrosoftAzure.model_validate(obj)
- _obj = MicrosoftAzure.parse_obj({
+ _obj = MicrosoftAzure.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"connection_string": obj.get("connectionString")
diff --git a/phrasetms_client/models/microsoft_azure_all_of.py b/phrasetms_client/models/microsoft_azure_all_of.py
index 17c84baa..f79e494b 100644
--- a/phrasetms_client/models/microsoft_azure_all_of.py
+++ b/phrasetms_client/models/microsoft_azure_all_of.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class MicrosoftAzureAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class MicrosoftAzureAllOf(BaseModel):
connection_string: StrictStr = Field(..., alias="connectionString", description="Microsoft azure connection string")
__properties = ["connectionString"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> MicrosoftAzureAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> MicrosoftAzureAllOf:
return None
if not isinstance(obj, dict):
- return MicrosoftAzureAllOf.parse_obj(obj)
+ return MicrosoftAzureAllOf.model_validate(obj)
- _obj = MicrosoftAzureAllOf.parse_obj({
+ _obj = MicrosoftAzureAllOf.model_validate({
"connection_string": obj.get("connectionString")
})
return _obj
diff --git a/phrasetms_client/models/mif_settings_dto.py b/phrasetms_client/models/mif_settings_dto.py
index ba65456d..dd4ae8f6 100644
--- a/phrasetms_client/models/mif_settings_dto.py
+++ b/phrasetms_client/models/mif_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class MifSettingsDto(BaseModel):
"""
@@ -43,14 +43,10 @@ class MifSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["extractBodyPages", "extractReferencePages", "extractMasterPages", "extractHiddenPages", "extractVariables", "extractIndexMarkers", "extractLinks", "extractXRefDef", "extractPgfNumFormat", "extractCustomReferencePages", "extractDefaultReferencePages", "extractUsedVariables", "extractHiddenCondText", "extractUsedXRefDef", "extractUsedPgfNumFormat", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +59,7 @@ def from_json(cls, json_str: str) -> MifSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> MifSettingsDto:
return None
if not isinstance(obj, dict):
- return MifSettingsDto.parse_obj(obj)
+ return MifSettingsDto.model_validate(obj)
- _obj = MifSettingsDto.parse_obj({
+ _obj = MifSettingsDto.model_validate({
"extract_body_pages": obj.get("extractBodyPages"),
"extract_reference_pages": obj.get("extractReferencePages"),
"extract_master_pages": obj.get("extractMasterPages"),
diff --git a/phrasetms_client/models/missing_numbers_v3_warning_dto.py b/phrasetms_client/models/missing_numbers_v3_warning_dto.py
index a233f627..4869c155 100644
--- a/phrasetms_client/models/missing_numbers_v3_warning_dto.py
+++ b/phrasetms_client/models/missing_numbers_v3_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -28,17 +28,13 @@ class MissingNumbersV3WarningDto(SegmentWarning):
MissingNumbersV3WarningDto
"""
number: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "number", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> MissingNumbersV3WarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> MissingNumbersV3WarningDto:
return None
if not isinstance(obj, dict):
- return MissingNumbersV3WarningDto.parse_obj(obj)
+ return MissingNumbersV3WarningDto.model_validate(obj)
- _obj = MissingNumbersV3WarningDto.parse_obj({
+ _obj = MissingNumbersV3WarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/missing_numbers_warning_dto.py b/phrasetms_client/models/missing_numbers_warning_dto.py
index 1020369d..a675b364 100644
--- a/phrasetms_client/models/missing_numbers_warning_dto.py
+++ b/phrasetms_client/models/missing_numbers_warning_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class MissingNumbersWarningDto(SegmentWarning):
"""
MissingNumbersWarningDto
"""
- missing_numbers: Optional[conlist(StrictStr)] = Field(None, alias="missingNumbers")
+ missing_numbers: Optional[List[StrictStr]] = Field(None, alias="missingNumbers")
__properties = ["id", "ignored", "type", "repetitionGroupId", "missingNumbers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MissingNumbersWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MissingNumbersWarningDto:
return None
if not isinstance(obj, dict):
- return MissingNumbersWarningDto.parse_obj(obj)
+ return MissingNumbersWarningDto.model_validate(obj)
- _obj = MissingNumbersWarningDto.parse_obj({
+ _obj = MissingNumbersWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/missing_numbers_warning_dto_all_of.py b/phrasetms_client/models/missing_numbers_warning_dto_all_of.py
index 2cfbbfb3..74121661 100644
--- a/phrasetms_client/models/missing_numbers_warning_dto_all_of.py
+++ b/phrasetms_client/models/missing_numbers_warning_dto_all_of.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class MissingNumbersWarningDtoAllOf(BaseModel):
"""
MissingNumbersWarningDtoAllOf
"""
- missing_numbers: Optional[conlist(StrictStr)] = Field(None, alias="missingNumbers")
+ missing_numbers: Optional[List[StrictStr]] = Field(None, alias="missingNumbers")
__properties = ["missingNumbers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> MissingNumbersWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> MissingNumbersWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return MissingNumbersWarningDtoAllOf.parse_obj(obj)
+ return MissingNumbersWarningDtoAllOf.model_validate(obj)
- _obj = MissingNumbersWarningDtoAllOf.parse_obj({
+ _obj = MissingNumbersWarningDtoAllOf.model_validate({
"missing_numbers": obj.get("missingNumbers")
})
return _obj
diff --git a/phrasetms_client/models/misspelled_word.py b/phrasetms_client/models/misspelled_word.py
index 94b7ef5f..ac9829c2 100644
--- a/phrasetms_client/models/misspelled_word.py
+++ b/phrasetms_client/models/misspelled_word.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class MisspelledWord(BaseModel):
"""
@@ -29,14 +29,10 @@ class MisspelledWord(BaseModel):
offset: Optional[StrictInt] = None
__properties = ["word", "offset"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MisspelledWord:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MisspelledWord:
return None
if not isinstance(obj, dict):
- return MisspelledWord.parse_obj(obj)
+ return MisspelledWord.model_validate(obj)
- _obj = MisspelledWord.parse_obj({
+ _obj = MisspelledWord.model_validate({
"word": obj.get("word"),
"offset": obj.get("offset")
})
diff --git a/phrasetms_client/models/misspelled_word_dto.py b/phrasetms_client/models/misspelled_word_dto.py
index da0664fc..be3bde8b 100644
--- a/phrasetms_client/models/misspelled_word_dto.py
+++ b/phrasetms_client/models/misspelled_word_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class MisspelledWordDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class MisspelledWordDto(BaseModel):
offset: Optional[StrictInt] = None
__properties = ["word", "offset"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MisspelledWordDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MisspelledWordDto:
return None
if not isinstance(obj, dict):
- return MisspelledWordDto.parse_obj(obj)
+ return MisspelledWordDto.model_validate(obj)
- _obj = MisspelledWordDto.parse_obj({
+ _obj = MisspelledWordDto.model_validate({
"word": obj.get("word"),
"offset": obj.get("offset")
})
diff --git a/phrasetms_client/models/moravia.py b/phrasetms_client/models/moravia.py
index f1966a6a..18885f8d 100644
--- a/phrasetms_client/models/moravia.py
+++ b/phrasetms_client/models/moravia.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.qa_check_dto_v2 import QACheckDtoV2
class MORAVIA(QACheckDtoV2):
@@ -32,14 +32,10 @@ class MORAVIA(QACheckDtoV2):
instant: Optional[StrictBool] = None
__properties = ["type", "name", "enabled", "profile", "ignorable", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> MORAVIA:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> MORAVIA:
return None
if not isinstance(obj, dict):
- return MORAVIA.parse_obj(obj)
+ return MORAVIA.model_validate(obj)
- _obj = MORAVIA.parse_obj({
+ _obj = MORAVIA.model_validate({
"type": obj.get("type"),
"name": obj.get("name"),
"enabled": obj.get("enabled"),
diff --git a/phrasetms_client/models/moravia_all_of.py b/phrasetms_client/models/moravia_all_of.py
index a9b442e3..0d341f4e 100644
--- a/phrasetms_client/models/moravia_all_of.py
+++ b/phrasetms_client/models/moravia_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
class MORAVIAAllOf(BaseModel):
"""
@@ -31,14 +31,10 @@ class MORAVIAAllOf(BaseModel):
instant: Optional[StrictBool] = None
__properties = ["enabled", "profile", "ignorable", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> MORAVIAAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> MORAVIAAllOf:
return None
if not isinstance(obj, dict):
- return MORAVIAAllOf.parse_obj(obj)
+ return MORAVIAAllOf.model_validate(obj)
- _obj = MORAVIAAllOf.parse_obj({
+ _obj = MORAVIAAllOf.model_validate({
"enabled": obj.get("enabled"),
"profile": obj.get("profile"),
"ignorable": obj.get("ignorable"),
diff --git a/phrasetms_client/models/moravia_warning_dto.py b/phrasetms_client/models/moravia_warning_dto.py
index f496f3cc..5708e5b1 100644
--- a/phrasetms_client/models/moravia_warning_dto.py
+++ b/phrasetms_client/models/moravia_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class MoraviaWarningDto(SegmentWarning):
@@ -30,14 +30,10 @@ class MoraviaWarningDto(SegmentWarning):
sub_type: Optional[StrictStr] = Field(None, alias="subType")
__properties = ["id", "ignored", "type", "repetitionGroupId", "message", "subType"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MoraviaWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> MoraviaWarningDto:
return None
if not isinstance(obj, dict):
- return MoraviaWarningDto.parse_obj(obj)
+ return MoraviaWarningDto.model_validate(obj)
- _obj = MoraviaWarningDto.parse_obj({
+ _obj = MoraviaWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/moravia_warning_dto_all_of.py b/phrasetms_client/models/moravia_warning_dto_all_of.py
index 5a60d7f7..5a92f838 100644
--- a/phrasetms_client/models/moravia_warning_dto_all_of.py
+++ b/phrasetms_client/models/moravia_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class MoraviaWarningDtoAllOf(BaseModel):
"""
@@ -29,14 +29,10 @@ class MoraviaWarningDtoAllOf(BaseModel):
sub_type: Optional[StrictStr] = Field(None, alias="subType")
__properties = ["message", "subType"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MoraviaWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> MoraviaWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return MoraviaWarningDtoAllOf.parse_obj(obj)
+ return MoraviaWarningDtoAllOf.model_validate(obj)
- _obj = MoraviaWarningDtoAllOf.parse_obj({
+ _obj = MoraviaWarningDtoAllOf.model_validate({
"message": obj.get("message"),
"sub_type": obj.get("subType")
})
diff --git a/phrasetms_client/models/mt_settings_per_language_dto.py b/phrasetms_client/models/mt_settings_per_language_dto.py
index 1f8bd079..efda91fa 100644
--- a/phrasetms_client/models/mt_settings_per_language_dto.py
+++ b/phrasetms_client/models/mt_settings_per_language_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.machine_translate_settings_dto import MachineTranslateSettingsDto
class MTSettingsPerLanguageDto(BaseModel):
@@ -30,14 +30,10 @@ class MTSettingsPerLanguageDto(BaseModel):
machine_translate_settings: Optional[MachineTranslateSettingsDto] = Field(None, alias="machineTranslateSettings")
__properties = ["targetLang", "machineTranslateSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MTSettingsPerLanguageDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> MTSettingsPerLanguageDto:
return None
if not isinstance(obj, dict):
- return MTSettingsPerLanguageDto.parse_obj(obj)
+ return MTSettingsPerLanguageDto.model_validate(obj)
- _obj = MTSettingsPerLanguageDto.parse_obj({
+ _obj = MTSettingsPerLanguageDto.model_validate({
"target_lang": obj.get("targetLang"),
"machine_translate_settings": MachineTranslateSettingsDto.from_dict(obj.get("machineTranslateSettings")) if obj.get("machineTranslateSettings") is not None else None
})
diff --git a/phrasetms_client/models/mt_settings_per_language_list_dto.py b/phrasetms_client/models/mt_settings_per_language_list_dto.py
index 826760ea..6de5da4f 100644
--- a/phrasetms_client/models/mt_settings_per_language_list_dto.py
+++ b/phrasetms_client/models/mt_settings_per_language_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.mt_settings_per_language_dto import MTSettingsPerLanguageDto
class MTSettingsPerLanguageListDto(BaseModel):
"""
MTSettingsPerLanguageListDto
"""
- mt_settings_per_lang_list: Optional[conlist(MTSettingsPerLanguageDto, unique_items=True)] = Field(None, alias="mtSettingsPerLangList")
+ mt_settings_per_lang_list: Optional[List[MTSettingsPerLanguageDto]] = Field(None, alias="mtSettingsPerLangList")
__properties = ["mtSettingsPerLangList"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> MTSettingsPerLanguageListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> MTSettingsPerLanguageListDto:
return None
if not isinstance(obj, dict):
- return MTSettingsPerLanguageListDto.parse_obj(obj)
+ return MTSettingsPerLanguageListDto.model_validate(obj)
- _obj = MTSettingsPerLanguageListDto.parse_obj({
+ _obj = MTSettingsPerLanguageListDto.model_validate({
"mt_settings_per_lang_list": [MTSettingsPerLanguageDto.from_dict(_item) for _item in obj.get("mtSettingsPerLangList")] if obj.get("mtSettingsPerLangList") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/mt_settings_per_language_reference.py b/phrasetms_client/models/mt_settings_per_language_reference.py
index 86a50c6f..0d25c259 100644
--- a/phrasetms_client/models/mt_settings_per_language_reference.py
+++ b/phrasetms_client/models/mt_settings_per_language_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.machine_translate_settings_reference import MachineTranslateSettingsReference
class MTSettingsPerLanguageReference(BaseModel):
@@ -30,14 +30,10 @@ class MTSettingsPerLanguageReference(BaseModel):
machine_translate_settings: Optional[MachineTranslateSettingsReference] = Field(None, alias="machineTranslateSettings")
__properties = ["targetLang", "machineTranslateSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MTSettingsPerLanguageReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> MTSettingsPerLanguageReference:
return None
if not isinstance(obj, dict):
- return MTSettingsPerLanguageReference.parse_obj(obj)
+ return MTSettingsPerLanguageReference.model_validate(obj)
- _obj = MTSettingsPerLanguageReference.parse_obj({
+ _obj = MTSettingsPerLanguageReference.model_validate({
"target_lang": obj.get("targetLang"),
"machine_translate_settings": MachineTranslateSettingsReference.from_dict(obj.get("machineTranslateSettings")) if obj.get("machineTranslateSettings") is not None else None
})
diff --git a/phrasetms_client/models/multilingual_csv_settings_dto.py b/phrasetms_client/models/multilingual_csv_settings_dto.py
index 8a595ec5..e74273a4 100644
--- a/phrasetms_client/models/multilingual_csv_settings_dto.py
+++ b/phrasetms_client/models/multilingual_csv_settings_dto.py
@@ -18,8 +18,17 @@
import json
+from typing_extensions import Annotated
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
class MultilingualCsvSettingsDto(BaseModel):
"""
@@ -32,8 +41,8 @@ class MultilingualCsvSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
html_sub_filter: Optional[StrictBool] = Field(None, alias="htmlSubFilter", description="Default: false")
segmentation: Optional[StrictBool] = Field(None, description="Default: true")
- delimiter: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, description="Default: ,")
- delimiter_type: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="delimiterType", description="Default: COMMA")
+ delimiter: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, description="Default: ,")
+ delimiter_type: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="delimiterType", description="Default: COMMA")
import_rows: Optional[StrictStr] = Field(None, alias="importRows")
max_len_columns: Optional[StrictStr] = Field(None, alias="maxLenColumns")
all_target_columns: Optional[Dict[str, StrictStr]] = Field(None, alias="allTargetColumns", description="Format: \"language\":\"column\"; example: {\"en\": \"A\", \"sk\": \"B\"}")
@@ -41,7 +50,8 @@ class MultilingualCsvSettingsDto(BaseModel):
save_confirmed_segments_to_tm: Optional[StrictBool] = Field(None, alias="saveConfirmedSegmentsToTm")
__properties = ["sourceColumns", "targetColumns", "contextNoteColumns", "contextKeyColumns", "tagRegexp", "htmlSubFilter", "segmentation", "delimiter", "delimiterType", "importRows", "maxLenColumns", "allTargetColumns", "nonEmptySegmentAction", "saveConfirmedSegmentsToTm"]
- @validator('delimiter_type')
+ @field_validator('delimiter_type')
+ @classmethod
def delimiter_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -51,7 +61,8 @@ def delimiter_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('TAB', 'COMMA', 'SEMICOLON', 'OTHER')")
return value
- @validator('non_empty_segment_action')
+ @field_validator('non_empty_segment_action')
+ @classmethod
def non_empty_segment_action_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -61,14 +72,10 @@ def non_empty_segment_action_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NONE', 'CONFIRM', 'LOCK', 'CONFIRM_LOCK')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -81,7 +88,7 @@ def from_json(cls, json_str: str) -> MultilingualCsvSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -94,9 +101,9 @@ def from_dict(cls, obj: dict) -> MultilingualCsvSettingsDto:
return None
if not isinstance(obj, dict):
- return MultilingualCsvSettingsDto.parse_obj(obj)
+ return MultilingualCsvSettingsDto.model_validate(obj)
- _obj = MultilingualCsvSettingsDto.parse_obj({
+ _obj = MultilingualCsvSettingsDto.model_validate({
"source_columns": obj.get("sourceColumns"),
"target_columns": obj.get("targetColumns"),
"context_note_columns": obj.get("contextNoteColumns"),
diff --git a/phrasetms_client/models/multilingual_xls_settings_dto.py b/phrasetms_client/models/multilingual_xls_settings_dto.py
index 0c14a8b9..8d515c84 100644
--- a/phrasetms_client/models/multilingual_xls_settings_dto.py
+++ b/phrasetms_client/models/multilingual_xls_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class MultilingualXlsSettingsDto(BaseModel):
"""
@@ -38,7 +38,8 @@ class MultilingualXlsSettingsDto(BaseModel):
save_confirmed_segments_to_tm: Optional[StrictBool] = Field(None, alias="saveConfirmedSegmentsToTm")
__properties = ["sourceColumn", "targetColumns", "contextNoteColumn", "contextKeyColumn", "tagRegexp", "htmlSubFilter", "segmentation", "importRows", "maxLenColumn", "nonEmptySegmentAction", "saveConfirmedSegmentsToTm"]
- @validator('non_empty_segment_action')
+ @field_validator('non_empty_segment_action')
+ @classmethod
def non_empty_segment_action_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -48,14 +49,10 @@ def non_empty_segment_action_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NONE', 'CONFIRM', 'LOCK', 'CONFIRM_LOCK')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -68,7 +65,7 @@ def from_json(cls, json_str: str) -> MultilingualXlsSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +78,9 @@ def from_dict(cls, obj: dict) -> MultilingualXlsSettingsDto:
return None
if not isinstance(obj, dict):
- return MultilingualXlsSettingsDto.parse_obj(obj)
+ return MultilingualXlsSettingsDto.model_validate(obj)
- _obj = MultilingualXlsSettingsDto.parse_obj({
+ _obj = MultilingualXlsSettingsDto.model_validate({
"source_column": obj.get("sourceColumn"),
"target_columns": obj.get("targetColumns"),
"context_note_column": obj.get("contextNoteColumn"),
diff --git a/phrasetms_client/models/multilingual_xml_settings_dto.py b/phrasetms_client/models/multilingual_xml_settings_dto.py
index 5e7595cb..ae75b01f 100644
--- a/phrasetms_client/models/multilingual_xml_settings_dto.py
+++ b/phrasetms_client/models/multilingual_xml_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class MultilingualXmlSettingsDto(BaseModel):
"""
@@ -44,7 +44,8 @@ class MultilingualXmlSettingsDto(BaseModel):
icu_sub_filter: Optional[StrictBool] = Field(None, alias="icuSubFilter", description="Default: `false`")
__properties = ["translatableElementsXPath", "sourceElementsXPath", "targetElementsXPaths", "inlineElementsNonTranslatableXPath", "tagRegexp", "segmentation", "htmlSubFilter", "contextKeyXPath", "contextNoteXPath", "maxLenXPath", "preserveWhitespace", "preserveCharEntities", "xslUrl", "xslFile", "nonEmptySegmentAction", "saveConfirmedSegmentsToTm", "icuSubFilter"]
- @validator('non_empty_segment_action')
+ @field_validator('non_empty_segment_action')
+ @classmethod
def non_empty_segment_action_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -54,14 +55,10 @@ def non_empty_segment_action_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NONE', 'CONFIRM', 'LOCK', 'CONFIRM_LOCK')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -74,7 +71,7 @@ def from_json(cls, json_str: str) -> MultilingualXmlSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +84,9 @@ def from_dict(cls, obj: dict) -> MultilingualXmlSettingsDto:
return None
if not isinstance(obj, dict):
- return MultilingualXmlSettingsDto.parse_obj(obj)
+ return MultilingualXmlSettingsDto.model_validate(obj)
- _obj = MultilingualXmlSettingsDto.parse_obj({
+ _obj = MultilingualXmlSettingsDto.model_validate({
"translatable_elements_x_path": obj.get("translatableElementsXPath"),
"source_elements_x_path": obj.get("sourceElementsXPath"),
"target_elements_x_paths": obj.get("targetElementsXPaths"),
diff --git a/phrasetms_client/models/multipart_file.py b/phrasetms_client/models/multipart_file.py
index 9a5e5256..138c70e7 100644
--- a/phrasetms_client/models/multipart_file.py
+++ b/phrasetms_client/models/multipart_file.py
@@ -18,17 +18,17 @@
import json
+from typing_extensions import Annotated
from typing import Any, Dict, List, Optional, Union
from pydantic import (
BaseModel,
Field,
+ ConfigDict,
StrictBool,
+ StrictBytes,
StrictInt,
StrictStr,
- conbytes,
- conlist,
- constr,
- validator,
+ StringConstraints,
)
@@ -39,7 +39,7 @@ class MultipartFile(BaseModel):
local_path: StrictStr = Field(...)
empty: Optional[StrictBool] = None
- bytes: Optional[conlist(Union[conbytes(strict=True), constr(strict=True)])] = None
+ bytes: Optional[List[Union[StrictBytes, Annotated[str, StringConstraints(strict=True)]]]] = None
size: Optional[StrictInt] = None
input_stream: Optional[Dict[str, Any]] = Field(None, alias="inputStream")
content_type: Optional[StrictStr] = Field(None, alias="contentType")
@@ -54,15 +54,10 @@ class MultipartFile(BaseModel):
"originalFilename",
]
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -75,7 +70,7 @@ def from_json(cls, json_str: str) -> MultipartFile:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
return _dict
@classmethod
@@ -85,9 +80,9 @@ def from_dict(cls, obj: dict) -> MultipartFile:
return None
if not isinstance(obj, dict):
- return MultipartFile.parse_obj(obj)
+ return MultipartFile.model_validate(obj)
- _obj = MultipartFile.parse_obj(
+ _obj = MultipartFile.model_validate(
{
"local_path": obj.get("local_path"),
"empty": obj.get("empty"),
diff --git a/phrasetms_client/models/multiple_spaces_v3_warning_dto.py b/phrasetms_client/models/multiple_spaces_v3_warning_dto.py
index 6c2edd24..bac6624e 100644
--- a/phrasetms_client/models/multiple_spaces_v3_warning_dto.py
+++ b/phrasetms_client/models/multiple_spaces_v3_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -28,17 +28,13 @@ class MultipleSpacesV3WarningDto(SegmentWarning):
MultipleSpacesV3WarningDto
"""
spaces: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "spaces", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> MultipleSpacesV3WarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> MultipleSpacesV3WarningDto:
return None
if not isinstance(obj, dict):
- return MultipleSpacesV3WarningDto.parse_obj(obj)
+ return MultipleSpacesV3WarningDto.model_validate(obj)
- _obj = MultipleSpacesV3WarningDto.parse_obj({
+ _obj = MultipleSpacesV3WarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/multiple_spaces_v3_warning_dto_all_of.py b/phrasetms_client/models/multiple_spaces_v3_warning_dto_all_of.py
index 2265d144..2ab7d085 100644
--- a/phrasetms_client/models/multiple_spaces_v3_warning_dto_all_of.py
+++ b/phrasetms_client/models/multiple_spaces_v3_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
class MultipleSpacesV3WarningDtoAllOf(BaseModel):
@@ -27,17 +27,13 @@ class MultipleSpacesV3WarningDtoAllOf(BaseModel):
MultipleSpacesV3WarningDtoAllOf
"""
spaces: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["spaces", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> MultipleSpacesV3WarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> MultipleSpacesV3WarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return MultipleSpacesV3WarningDtoAllOf.parse_obj(obj)
+ return MultipleSpacesV3WarningDtoAllOf.model_validate(obj)
- _obj = MultipleSpacesV3WarningDtoAllOf.parse_obj({
+ _obj = MultipleSpacesV3WarningDtoAllOf.model_validate({
"spaces": obj.get("spaces"),
"positions": [Position.from_dict(_item) for _item in obj.get("positions")] if obj.get("positions") is not None else None
})
diff --git a/phrasetms_client/models/multiple_spaces_warning_dto.py b/phrasetms_client/models/multiple_spaces_warning_dto.py
index c2700424..dc4f41c3 100644
--- a/phrasetms_client/models/multiple_spaces_warning_dto.py
+++ b/phrasetms_client/models/multiple_spaces_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class MultipleSpacesWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class MultipleSpacesWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> MultipleSpacesWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> MultipleSpacesWarningDto:
return None
if not isinstance(obj, dict):
- return MultipleSpacesWarningDto.parse_obj(obj)
+ return MultipleSpacesWarningDto.model_validate(obj)
- _obj = MultipleSpacesWarningDto.parse_obj({
+ _obj = MultipleSpacesWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/name.py b/phrasetms_client/models/name.py
index e9a584df..49bf9344 100644
--- a/phrasetms_client/models/name.py
+++ b/phrasetms_client/models/name.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class Name(BaseModel):
"""
@@ -29,14 +29,10 @@ class Name(BaseModel):
family_name: StrictStr = Field(..., alias="familyName")
__properties = ["givenName", "familyName"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> Name:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> Name:
return None
if not isinstance(obj, dict):
- return Name.parse_obj(obj)
+ return Name.model_validate(obj)
- _obj = Name.parse_obj({
+ _obj = Name.model_validate({
"given_name": obj.get("givenName"),
"family_name": obj.get("familyName")
})
diff --git a/phrasetms_client/models/name_dto.py b/phrasetms_client/models/name_dto.py
index d6ecdb14..eabe223b 100644
--- a/phrasetms_client/models/name_dto.py
+++ b/phrasetms_client/models/name_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class NameDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class NameDto(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> NameDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> NameDto:
return None
if not isinstance(obj, dict):
- return NameDto.parse_obj(obj)
+ return NameDto.model_validate(obj)
- _obj = NameDto.parse_obj({
+ _obj = NameDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/nested_tags_warning_dto.py b/phrasetms_client/models/nested_tags_warning_dto.py
index 6fba1838..3e39e1fe 100644
--- a/phrasetms_client/models/nested_tags_warning_dto.py
+++ b/phrasetms_client/models/nested_tags_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class NestedTagsWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class NestedTagsWarningDto(SegmentWarning):
misplaced_target_tag: Optional[StrictStr] = Field(None, alias="misplacedTargetTag")
__properties = ["id", "ignored", "type", "repetitionGroupId", "misplacedTargetTag"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> NestedTagsWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> NestedTagsWarningDto:
return None
if not isinstance(obj, dict):
- return NestedTagsWarningDto.parse_obj(obj)
+ return NestedTagsWarningDto.model_validate(obj)
- _obj = NestedTagsWarningDto.parse_obj({
+ _obj = NestedTagsWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/nested_tags_warning_dto_all_of.py b/phrasetms_client/models/nested_tags_warning_dto_all_of.py
index 8d5d3b73..615df8de 100644
--- a/phrasetms_client/models/nested_tags_warning_dto_all_of.py
+++ b/phrasetms_client/models/nested_tags_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class NestedTagsWarningDtoAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class NestedTagsWarningDtoAllOf(BaseModel):
misplaced_target_tag: Optional[StrictStr] = Field(None, alias="misplacedTargetTag")
__properties = ["misplacedTargetTag"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> NestedTagsWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> NestedTagsWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return NestedTagsWarningDtoAllOf.parse_obj(obj)
+ return NestedTagsWarningDtoAllOf.model_validate(obj)
- _obj = NestedTagsWarningDtoAllOf.parse_obj({
+ _obj = NestedTagsWarningDtoAllOf.model_validate({
"misplaced_target_tag": obj.get("misplacedTargetTag")
})
return _obj
diff --git a/phrasetms_client/models/net_rate_scheme.py b/phrasetms_client/models/net_rate_scheme.py
index 8edf41f1..573508a4 100644
--- a/phrasetms_client/models/net_rate_scheme.py
+++ b/phrasetms_client/models/net_rate_scheme.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.discount_settings_dto import DiscountSettingsDto
from phrasetms_client.models.net_rate_scheme_workflow_step_reference import NetRateSchemeWorkflowStepReference
from phrasetms_client.models.organization_reference import OrganizationReference
@@ -35,18 +35,14 @@ class NetRateScheme(BaseModel):
organization: Optional[OrganizationReference] = None
date_created: Optional[datetime] = Field(None, alias="dateCreated")
created_by: Optional[UserReference] = Field(None, alias="createdBy")
- workflow_step_net_schemes: Optional[conlist(NetRateSchemeWorkflowStepReference)] = Field(None, alias="workflowStepNetSchemes")
+ workflow_step_net_schemes: Optional[List[NetRateSchemeWorkflowStepReference]] = Field(None, alias="workflowStepNetSchemes")
rates: Optional[DiscountSettingsDto] = None
__properties = ["id", "uid", "name", "organization", "dateCreated", "createdBy", "workflowStepNetSchemes", "rates"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +55,7 @@ def from_json(cls, json_str: str) -> NetRateScheme:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -88,9 +84,9 @@ def from_dict(cls, obj: dict) -> NetRateScheme:
return None
if not isinstance(obj, dict):
- return NetRateScheme.parse_obj(obj)
+ return NetRateScheme.model_validate(obj)
- _obj = NetRateScheme.parse_obj({
+ _obj = NetRateScheme.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/net_rate_scheme_edit.py b/phrasetms_client/models/net_rate_scheme_edit.py
index f0f4e825..294b2531 100644
--- a/phrasetms_client/models/net_rate_scheme_edit.py
+++ b/phrasetms_client/models/net_rate_scheme_edit.py
@@ -18,26 +18,23 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.discount_settings_dto import DiscountSettingsDto
class NetRateSchemeEdit(BaseModel):
"""
NetRateSchemeEdit
"""
- name: constr(strict=True, max_length=255, min_length=1) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=1)] = Field(...)
rates: Optional[DiscountSettingsDto] = None
__properties = ["name", "rates"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +47,7 @@ def from_json(cls, json_str: str) -> NetRateSchemeEdit:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +63,9 @@ def from_dict(cls, obj: dict) -> NetRateSchemeEdit:
return None
if not isinstance(obj, dict):
- return NetRateSchemeEdit.parse_obj(obj)
+ return NetRateSchemeEdit.model_validate(obj)
- _obj = NetRateSchemeEdit.parse_obj({
+ _obj = NetRateSchemeEdit.model_validate({
"name": obj.get("name"),
"rates": DiscountSettingsDto.from_dict(obj.get("rates")) if obj.get("rates") is not None else None
})
diff --git a/phrasetms_client/models/net_rate_scheme_reference.py b/phrasetms_client/models/net_rate_scheme_reference.py
index 31ca8c0a..ff02dd5f 100644
--- a/phrasetms_client/models/net_rate_scheme_reference.py
+++ b/phrasetms_client/models/net_rate_scheme_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class NetRateSchemeReference(BaseModel):
@@ -33,14 +33,10 @@ class NetRateSchemeReference(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "dateCreated", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> NetRateSchemeReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> NetRateSchemeReference:
return None
if not isinstance(obj, dict):
- return NetRateSchemeReference.parse_obj(obj)
+ return NetRateSchemeReference.model_validate(obj)
- _obj = NetRateSchemeReference.parse_obj({
+ _obj = NetRateSchemeReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/net_rate_scheme_workflow_step.py b/phrasetms_client/models/net_rate_scheme_workflow_step.py
index 8e48598a..6ebc50a5 100644
--- a/phrasetms_client/models/net_rate_scheme_workflow_step.py
+++ b/phrasetms_client/models/net_rate_scheme_workflow_step.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.discount_settings_dto import DiscountSettingsDto
from phrasetms_client.models.workflow_step_reference import WorkflowStepReference
@@ -32,14 +32,10 @@ class NetRateSchemeWorkflowStep(BaseModel):
rates: Optional[DiscountSettingsDto] = None
__properties = ["id", "workflowStep", "rates"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> NetRateSchemeWorkflowStep:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> NetRateSchemeWorkflowStep:
return None
if not isinstance(obj, dict):
- return NetRateSchemeWorkflowStep.parse_obj(obj)
+ return NetRateSchemeWorkflowStep.model_validate(obj)
- _obj = NetRateSchemeWorkflowStep.parse_obj({
+ _obj = NetRateSchemeWorkflowStep.model_validate({
"id": obj.get("id"),
"workflow_step": WorkflowStepReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"rates": DiscountSettingsDto.from_dict(obj.get("rates")) if obj.get("rates") is not None else None
diff --git a/phrasetms_client/models/net_rate_scheme_workflow_step_create.py b/phrasetms_client/models/net_rate_scheme_workflow_step_create.py
index 6c6c07e7..d80cd822 100644
--- a/phrasetms_client/models/net_rate_scheme_workflow_step_create.py
+++ b/phrasetms_client/models/net_rate_scheme_workflow_step_create.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.discount_settings_dto import DiscountSettingsDto
from phrasetms_client.models.id_reference import IdReference
@@ -31,14 +31,10 @@ class NetRateSchemeWorkflowStepCreate(BaseModel):
rates: Optional[DiscountSettingsDto] = None
__properties = ["workflowStep", "rates"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> NetRateSchemeWorkflowStepCreate:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> NetRateSchemeWorkflowStepCreate:
return None
if not isinstance(obj, dict):
- return NetRateSchemeWorkflowStepCreate.parse_obj(obj)
+ return NetRateSchemeWorkflowStepCreate.model_validate(obj)
- _obj = NetRateSchemeWorkflowStepCreate.parse_obj({
+ _obj = NetRateSchemeWorkflowStepCreate.model_validate({
"workflow_step": IdReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"rates": DiscountSettingsDto.from_dict(obj.get("rates")) if obj.get("rates") is not None else None
})
diff --git a/phrasetms_client/models/net_rate_scheme_workflow_step_edit.py b/phrasetms_client/models/net_rate_scheme_workflow_step_edit.py
index a8df2a6b..b25855f6 100644
--- a/phrasetms_client/models/net_rate_scheme_workflow_step_edit.py
+++ b/phrasetms_client/models/net_rate_scheme_workflow_step_edit.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.discount_settings_dto import DiscountSettingsDto
class NetRateSchemeWorkflowStepEdit(BaseModel):
@@ -29,14 +29,10 @@ class NetRateSchemeWorkflowStepEdit(BaseModel):
rates: Optional[DiscountSettingsDto] = None
__properties = ["rates"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> NetRateSchemeWorkflowStepEdit:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> NetRateSchemeWorkflowStepEdit:
return None
if not isinstance(obj, dict):
- return NetRateSchemeWorkflowStepEdit.parse_obj(obj)
+ return NetRateSchemeWorkflowStepEdit.model_validate(obj)
- _obj = NetRateSchemeWorkflowStepEdit.parse_obj({
+ _obj = NetRateSchemeWorkflowStepEdit.model_validate({
"rates": DiscountSettingsDto.from_dict(obj.get("rates")) if obj.get("rates") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/net_rate_scheme_workflow_step_reference.py b/phrasetms_client/models/net_rate_scheme_workflow_step_reference.py
index d26fd3d3..8aab0798 100644
--- a/phrasetms_client/models/net_rate_scheme_workflow_step_reference.py
+++ b/phrasetms_client/models/net_rate_scheme_workflow_step_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.workflow_step_reference import WorkflowStepReference
class NetRateSchemeWorkflowStepReference(BaseModel):
@@ -30,14 +30,10 @@ class NetRateSchemeWorkflowStepReference(BaseModel):
workflow_step: Optional[WorkflowStepReference] = Field(None, alias="workflowStep")
__properties = ["id", "workflowStep"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> NetRateSchemeWorkflowStepReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> NetRateSchemeWorkflowStepReference:
return None
if not isinstance(obj, dict):
- return NetRateSchemeWorkflowStepReference.parse_obj(obj)
+ return NetRateSchemeWorkflowStepReference.model_validate(obj)
- _obj = NetRateSchemeWorkflowStepReference.parse_obj({
+ _obj = NetRateSchemeWorkflowStepReference.model_validate({
"id": obj.get("id"),
"workflow_step": WorkflowStepReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None
})
diff --git a/phrasetms_client/models/newer_at_lower_level_warning_dto.py b/phrasetms_client/models/newer_at_lower_level_warning_dto.py
index 8736987b..c83b9919 100644
--- a/phrasetms_client/models/newer_at_lower_level_warning_dto.py
+++ b/phrasetms_client/models/newer_at_lower_level_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class NewerAtLowerLevelWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class NewerAtLowerLevelWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> NewerAtLowerLevelWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> NewerAtLowerLevelWarningDto:
return None
if not isinstance(obj, dict):
- return NewerAtLowerLevelWarningDto.parse_obj(obj)
+ return NewerAtLowerLevelWarningDto.model_validate(obj)
- _obj = NewerAtLowerLevelWarningDto.parse_obj({
+ _obj = NewerAtLowerLevelWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/non_conforming_term_warning_dto.py b/phrasetms_client/models/non_conforming_term_warning_dto.py
index 2b5b4b16..8630ebb1 100644
--- a/phrasetms_client/models/non_conforming_term_warning_dto.py
+++ b/phrasetms_client/models/non_conforming_term_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
from phrasetms_client.models.term import Term
@@ -29,18 +29,14 @@ class NonConformingTermWarningDto(SegmentWarning):
NonConformingTermWarningDto
"""
term: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
- suggested_target_terms: Optional[conlist(Term)] = Field(None, alias="suggestedTargetTerms")
+ positions: Optional[List[Position]] = None
+ suggested_target_terms: Optional[List[Term]] = Field(None, alias="suggestedTargetTerms")
__properties = ["id", "ignored", "type", "repetitionGroupId", "term", "positions", "suggestedTargetTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> NonConformingTermWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +76,9 @@ def from_dict(cls, obj: dict) -> NonConformingTermWarningDto:
return None
if not isinstance(obj, dict):
- return NonConformingTermWarningDto.parse_obj(obj)
+ return NonConformingTermWarningDto.model_validate(obj)
- _obj = NonConformingTermWarningDto.parse_obj({
+ _obj = NonConformingTermWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/non_conforming_term_warning_dto_all_of.py b/phrasetms_client/models/non_conforming_term_warning_dto_all_of.py
index 97b85a8e..f6f92e04 100644
--- a/phrasetms_client/models/non_conforming_term_warning_dto_all_of.py
+++ b/phrasetms_client/models/non_conforming_term_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.term import Term
@@ -28,18 +28,14 @@ class NonConformingTermWarningDtoAllOf(BaseModel):
NonConformingTermWarningDtoAllOf
"""
term: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
- suggested_target_terms: Optional[conlist(Term)] = Field(None, alias="suggestedTargetTerms")
+ positions: Optional[List[Position]] = None
+ suggested_target_terms: Optional[List[Term]] = Field(None, alias="suggestedTargetTerms")
__properties = ["term", "positions", "suggestedTargetTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> NonConformingTermWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> NonConformingTermWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return NonConformingTermWarningDtoAllOf.parse_obj(obj)
+ return NonConformingTermWarningDtoAllOf.model_validate(obj)
- _obj = NonConformingTermWarningDtoAllOf.parse_obj({
+ _obj = NonConformingTermWarningDtoAllOf.model_validate({
"term": obj.get("term"),
"positions": [Position.from_dict(_item) for _item in obj.get("positions")] if obj.get("positions") is not None else None,
"suggested_target_terms": [Term.from_dict(_item) for _item in obj.get("suggestedTargetTerms")] if obj.get("suggestedTargetTerms") is not None else None
diff --git a/phrasetms_client/models/non_translatable_settings_dto.py b/phrasetms_client/models/non_translatable_settings_dto.py
index 59764cc0..9fd7ccc2 100644
--- a/phrasetms_client/models/non_translatable_settings_dto.py
+++ b/phrasetms_client/models/non_translatable_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class NonTranslatableSettingsDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class NonTranslatableSettingsDto(BaseModel):
non_translatables_in_editors: Optional[StrictBool] = Field(None, alias="nonTranslatablesInEditors", description="If non-translatables are enabled in Editors.")
__properties = ["preTranslateNonTranslatables", "confirm100PercentMatches", "lock100PercentMatches", "nonTranslatablesInEditors"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> NonTranslatableSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> NonTranslatableSettingsDto:
return None
if not isinstance(obj, dict):
- return NonTranslatableSettingsDto.parse_obj(obj)
+ return NonTranslatableSettingsDto.model_validate(obj)
- _obj = NonTranslatableSettingsDto.parse_obj({
+ _obj = NonTranslatableSettingsDto.model_validate({
"pre_translate_non_translatables": obj.get("preTranslateNonTranslatables"),
"confirm100_percent_matches": obj.get("confirm100PercentMatches"),
"lock100_percent_matches": obj.get("lock100PercentMatches"),
diff --git a/phrasetms_client/models/not_confirmed_warning_dto.py b/phrasetms_client/models/not_confirmed_warning_dto.py
index d58ccb48..e8891be2 100644
--- a/phrasetms_client/models/not_confirmed_warning_dto.py
+++ b/phrasetms_client/models/not_confirmed_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class NotConfirmedWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class NotConfirmedWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> NotConfirmedWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> NotConfirmedWarningDto:
return None
if not isinstance(obj, dict):
- return NotConfirmedWarningDto.parse_obj(obj)
+ return NotConfirmedWarningDto.model_validate(obj)
- _obj = NotConfirmedWarningDto.parse_obj({
+ _obj = NotConfirmedWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/notify_job_parts_request_dto.py b/phrasetms_client/models/notify_job_parts_request_dto.py
index ca071b8d..bc6f9c31 100644
--- a/phrasetms_client/models/notify_job_parts_request_dto.py
+++ b/phrasetms_client/models/notify_job_parts_request_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.uid_reference import UidReference
@@ -27,20 +27,16 @@ class NotifyJobPartsRequestDto(BaseModel):
"""
NotifyJobPartsRequestDto
"""
- jobs: conlist(UidReference) = Field(...)
+ jobs: List[UidReference] = Field(...)
email_template: IdReference = Field(..., alias="emailTemplate")
- cc: Optional[conlist(StrictStr)] = None
- bcc: Optional[conlist(StrictStr)] = None
+ cc: Optional[List[StrictStr]] = None
+ bcc: Optional[List[StrictStr]] = None
__properties = ["jobs", "emailTemplate", "cc", "bcc"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> NotifyJobPartsRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> NotifyJobPartsRequestDto:
return None
if not isinstance(obj, dict):
- return NotifyJobPartsRequestDto.parse_obj(obj)
+ return NotifyJobPartsRequestDto.model_validate(obj)
- _obj = NotifyJobPartsRequestDto.parse_obj({
+ _obj = NotifyJobPartsRequestDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"email_template": IdReference.from_dict(obj.get("emailTemplate")) if obj.get("emailTemplate") is not None else None,
"cc": obj.get("cc"),
diff --git a/phrasetms_client/models/notify_provider_dto.py b/phrasetms_client/models/notify_provider_dto.py
index 631b526d..7bbb9129 100644
--- a/phrasetms_client/models/notify_provider_dto.py
+++ b/phrasetms_client/models/notify_provider_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, conint
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class NotifyProviderDto(BaseModel):
@@ -27,17 +28,13 @@ class NotifyProviderDto(BaseModel):
NotifyProviderDto
"""
organization_email_template: IdReference = Field(..., alias="organizationEmailTemplate")
- notification_interval_in_minutes: Optional[conint(strict=True, le=1440, ge=0)] = Field(None, alias="notificationIntervalInMinutes")
+ notification_interval_in_minutes: Optional[Annotated[int, Field(strict=True, le=1440, ge=0)]] = Field(None, alias="notificationIntervalInMinutes")
__properties = ["organizationEmailTemplate", "notificationIntervalInMinutes"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +47,7 @@ def from_json(cls, json_str: str) -> NotifyProviderDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +63,9 @@ def from_dict(cls, obj: dict) -> NotifyProviderDto:
return None
if not isinstance(obj, dict):
- return NotifyProviderDto.parse_obj(obj)
+ return NotifyProviderDto.model_validate(obj)
- _obj = NotifyProviderDto.parse_obj({
+ _obj = NotifyProviderDto.model_validate({
"organization_email_template": IdReference.from_dict(obj.get("organizationEmailTemplate")) if obj.get("organizationEmailTemplate") is not None else None,
"notification_interval_in_minutes": obj.get("notificationIntervalInMinutes")
})
diff --git a/phrasetms_client/models/number.py b/phrasetms_client/models/number.py
index f893d396..16db03af 100644
--- a/phrasetms_client/models/number.py
+++ b/phrasetms_client/models/number.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, StrictBool
+from pydantic import BaseModel, ConfigDict, StrictBool
from phrasetms_client.models.qa_check_dto_v2 import QACheckDtoV2
class NUMBER(QACheckDtoV2):
@@ -32,14 +32,10 @@ class NUMBER(QACheckDtoV2):
instant: Optional[StrictBool] = None
__properties = ["type", "name", "ignorable", "enabled", "value", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> NUMBER:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> NUMBER:
return None
if not isinstance(obj, dict):
- return NUMBER.parse_obj(obj)
+ return NUMBER.model_validate(obj)
- _obj = NUMBER.parse_obj({
+ _obj = NUMBER.model_validate({
"type": obj.get("type"),
"name": obj.get("name"),
"ignorable": obj.get("ignorable"),
diff --git a/phrasetms_client/models/number_all_of.py b/phrasetms_client/models/number_all_of.py
index 546bed3f..bb32c45d 100644
--- a/phrasetms_client/models/number_all_of.py
+++ b/phrasetms_client/models/number_all_of.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, StrictBool
+from pydantic import BaseModel, ConfigDict, StrictBool
class NUMBERAllOf(BaseModel):
"""
@@ -31,14 +31,10 @@ class NUMBERAllOf(BaseModel):
instant: Optional[StrictBool] = None
__properties = ["ignorable", "enabled", "value", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> NUMBERAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> NUMBERAllOf:
return None
if not isinstance(obj, dict):
- return NUMBERAllOf.parse_obj(obj)
+ return NUMBERAllOf.model_validate(obj)
- _obj = NUMBERAllOf.parse_obj({
+ _obj = NUMBERAllOf.model_validate({
"ignorable": obj.get("ignorable"),
"enabled": obj.get("enabled"),
"value": obj.get("value"),
diff --git a/phrasetms_client/models/organization_email_template_dto.py b/phrasetms_client/models/organization_email_template_dto.py
index b59b6a6f..8854e0d3 100644
--- a/phrasetms_client/models/organization_email_template_dto.py
+++ b/phrasetms_client/models/organization_email_template_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class OrganizationEmailTemplateDto(BaseModel):
"""
@@ -35,7 +35,8 @@ class OrganizationEmailTemplateDto(BaseModel):
bcc_address: Optional[StrictStr] = Field(None, alias="bccAddress")
__properties = ["id", "uid", "type", "name", "subject", "body", "ccAddress", "bccAddress"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -45,14 +46,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('JobAssigned', 'JobStatusChanged', 'NextWorkflowStep', 'JobRejected', 'LoginInfo', 'ProjectTransferredToBuyer', 'SharedProjectAssigned', 'SharedProjectStatusChanged', 'AutomatedProjectCreated', 'AutomatedProjectSourceUpdated', 'AutomatedProjectStatusChanged', 'JobWidgetProjectQuotePrepared', 'JobWidgetProjectQuotePreparationFailure', 'JobWidgetProjectCreated', 'JobWidgetProjectCompleted', 'CmsQuoteReady', 'CmsWorkCompleted', 'CmsJobRejected', 'QUOTE_UPDATED', 'QUOTE_STATUS_CHANGED', 'LQA_SHARE_REPORT')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +62,7 @@ def from_json(cls, json_str: str) -> OrganizationEmailTemplateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +75,9 @@ def from_dict(cls, obj: dict) -> OrganizationEmailTemplateDto:
return None
if not isinstance(obj, dict):
- return OrganizationEmailTemplateDto.parse_obj(obj)
+ return OrganizationEmailTemplateDto.model_validate(obj)
- _obj = OrganizationEmailTemplateDto.parse_obj({
+ _obj = OrganizationEmailTemplateDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/organization_reference.py b/phrasetms_client/models/organization_reference.py
index 656e9467..13f25e4c 100644
--- a/phrasetms_client/models/organization_reference.py
+++ b/phrasetms_client/models/organization_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class OrganizationReference(BaseModel):
"""
@@ -29,14 +29,10 @@ class OrganizationReference(BaseModel):
name: Optional[StrictStr] = None
__properties = ["uid", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> OrganizationReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> OrganizationReference:
return None
if not isinstance(obj, dict):
- return OrganizationReference.parse_obj(obj)
+ return OrganizationReference.model_validate(obj)
- _obj = OrganizationReference.parse_obj({
+ _obj = OrganizationReference.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/other_weights_dto.py b/phrasetms_client/models/other_weights_dto.py
index ca65c832..b03e3e88 100644
--- a/phrasetms_client/models/other_weights_dto.py
+++ b/phrasetms_client/models/other_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class OtherWeightsDto(BaseModel):
@@ -29,14 +29,10 @@ class OtherWeightsDto(BaseModel):
other: Optional[ToggleableWeightDto] = None
__properties = ["other"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> OtherWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> OtherWeightsDto:
return None
if not isinstance(obj, dict):
- return OtherWeightsDto.parse_obj(obj)
+ return OtherWeightsDto.model_validate(obj)
- _obj = OtherWeightsDto.parse_obj({
+ _obj = OtherWeightsDto.model_validate({
"other": ToggleableWeightDto.from_dict(obj.get("other")) if obj.get("other") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/page_dto_abstract_project_dto.py b/phrasetms_client/models/page_dto_abstract_project_dto.py
index a28455f9..f959ce03 100644
--- a/phrasetms_client/models/page_dto_abstract_project_dto.py
+++ b/phrasetms_client/models/page_dto_abstract_project_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.abstract_project_dto import AbstractProjectDto
class PageDtoAbstractProjectDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoAbstractProjectDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(AbstractProjectDto)] = None
+ content: Optional[List[AbstractProjectDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoAbstractProjectDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoAbstractProjectDto:
return None
if not isinstance(obj, dict):
- return PageDtoAbstractProjectDto.parse_obj(obj)
+ return PageDtoAbstractProjectDto.model_validate(obj)
- _obj = PageDtoAbstractProjectDto.parse_obj({
+ _obj = PageDtoAbstractProjectDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_additional_workflow_step_dto.py b/phrasetms_client/models/page_dto_additional_workflow_step_dto.py
index 32d816c2..9683b29c 100644
--- a/phrasetms_client/models/page_dto_additional_workflow_step_dto.py
+++ b/phrasetms_client/models/page_dto_additional_workflow_step_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.additional_workflow_step_dto import AdditionalWorkflowStepDto
class PageDtoAdditionalWorkflowStepDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoAdditionalWorkflowStepDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(AdditionalWorkflowStepDto)] = None
+ content: Optional[List[AdditionalWorkflowStepDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoAdditionalWorkflowStepDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoAdditionalWorkflowStepDto:
return None
if not isinstance(obj, dict):
- return PageDtoAdditionalWorkflowStepDto.parse_obj(obj)
+ return PageDtoAdditionalWorkflowStepDto.model_validate(obj)
- _obj = PageDtoAdditionalWorkflowStepDto.parse_obj({
+ _obj = PageDtoAdditionalWorkflowStepDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_analyse_job_dto.py b/phrasetms_client/models/page_dto_analyse_job_dto.py
index 42ddc89b..26acf97a 100644
--- a/phrasetms_client/models/page_dto_analyse_job_dto.py
+++ b/phrasetms_client/models/page_dto_analyse_job_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.analyse_job_dto import AnalyseJobDto
class PageDtoAnalyseJobDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoAnalyseJobDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(AnalyseJobDto)] = None
+ content: Optional[List[AnalyseJobDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoAnalyseJobDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoAnalyseJobDto:
return None
if not isinstance(obj, dict):
- return PageDtoAnalyseJobDto.parse_obj(obj)
+ return PageDtoAnalyseJobDto.model_validate(obj)
- _obj = PageDtoAnalyseJobDto.parse_obj({
+ _obj = PageDtoAnalyseJobDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_analyse_reference.py b/phrasetms_client/models/page_dto_analyse_reference.py
index 356d2c07..75f919f1 100644
--- a/phrasetms_client/models/page_dto_analyse_reference.py
+++ b/phrasetms_client/models/page_dto_analyse_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.analyse_reference import AnalyseReference
class PageDtoAnalyseReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoAnalyseReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(AnalyseReference)] = None
+ content: Optional[List[AnalyseReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoAnalyseReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoAnalyseReference:
return None
if not isinstance(obj, dict):
- return PageDtoAnalyseReference.parse_obj(obj)
+ return PageDtoAnalyseReference.model_validate(obj)
- _obj = PageDtoAnalyseReference.parse_obj({
+ _obj = PageDtoAnalyseReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_assigned_job_dto.py b/phrasetms_client/models/page_dto_assigned_job_dto.py
index 5178bab7..0f373c62 100644
--- a/phrasetms_client/models/page_dto_assigned_job_dto.py
+++ b/phrasetms_client/models/page_dto_assigned_job_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.assigned_job_dto import AssignedJobDto
class PageDtoAssignedJobDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoAssignedJobDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(AssignedJobDto)] = None
+ content: Optional[List[AssignedJobDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoAssignedJobDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoAssignedJobDto:
return None
if not isinstance(obj, dict):
- return PageDtoAssignedJobDto.parse_obj(obj)
+ return PageDtoAssignedJobDto.model_validate(obj)
- _obj = PageDtoAssignedJobDto.parse_obj({
+ _obj = PageDtoAssignedJobDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_async_request_dto.py b/phrasetms_client/models/page_dto_async_request_dto.py
index d4448dbb..0b5410e7 100644
--- a/phrasetms_client/models/page_dto_async_request_dto.py
+++ b/phrasetms_client/models/page_dto_async_request_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.async_request_dto import AsyncRequestDto
class PageDtoAsyncRequestDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoAsyncRequestDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(AsyncRequestDto)] = None
+ content: Optional[List[AsyncRequestDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoAsyncRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoAsyncRequestDto:
return None
if not isinstance(obj, dict):
- return PageDtoAsyncRequestDto.parse_obj(obj)
+ return PageDtoAsyncRequestDto.model_validate(obj)
- _obj = PageDtoAsyncRequestDto.parse_obj({
+ _obj = PageDtoAsyncRequestDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_business_unit_dto.py b/phrasetms_client/models/page_dto_business_unit_dto.py
index 38609072..ca9731d9 100644
--- a/phrasetms_client/models/page_dto_business_unit_dto.py
+++ b/phrasetms_client/models/page_dto_business_unit_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.business_unit_dto import BusinessUnitDto
class PageDtoBusinessUnitDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoBusinessUnitDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(BusinessUnitDto)] = None
+ content: Optional[List[BusinessUnitDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoBusinessUnitDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoBusinessUnitDto:
return None
if not isinstance(obj, dict):
- return PageDtoBusinessUnitDto.parse_obj(obj)
+ return PageDtoBusinessUnitDto.model_validate(obj)
- _obj = PageDtoBusinessUnitDto.parse_obj({
+ _obj = PageDtoBusinessUnitDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_client_dto.py b/phrasetms_client/models/page_dto_client_dto.py
index b3a7426d..de168bc0 100644
--- a/phrasetms_client/models/page_dto_client_dto.py
+++ b/phrasetms_client/models/page_dto_client_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.client_dto import ClientDto
class PageDtoClientDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoClientDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(ClientDto)] = None
+ content: Optional[List[ClientDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoClientDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoClientDto:
return None
if not isinstance(obj, dict):
- return PageDtoClientDto.parse_obj(obj)
+ return PageDtoClientDto.model_validate(obj)
- _obj = PageDtoClientDto.parse_obj({
+ _obj = PageDtoClientDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_cost_center_dto.py b/phrasetms_client/models/page_dto_cost_center_dto.py
index e1549e11..7900e088 100644
--- a/phrasetms_client/models/page_dto_cost_center_dto.py
+++ b/phrasetms_client/models/page_dto_cost_center_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.cost_center_dto import CostCenterDto
class PageDtoCostCenterDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoCostCenterDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(CostCenterDto)] = None
+ content: Optional[List[CostCenterDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoCostCenterDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoCostCenterDto:
return None
if not isinstance(obj, dict):
- return PageDtoCostCenterDto.parse_obj(obj)
+ return PageDtoCostCenterDto.model_validate(obj)
- _obj = PageDtoCostCenterDto.parse_obj({
+ _obj = PageDtoCostCenterDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_custom_field_dto.py b/phrasetms_client/models/page_dto_custom_field_dto.py
index b3c0fef2..3e8b9cbe 100644
--- a/phrasetms_client/models/page_dto_custom_field_dto.py
+++ b/phrasetms_client/models/page_dto_custom_field_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.custom_field_dto import CustomFieldDto
class PageDtoCustomFieldDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoCustomFieldDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(CustomFieldDto)] = None
+ content: Optional[List[CustomFieldDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoCustomFieldDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoCustomFieldDto:
return None
if not isinstance(obj, dict):
- return PageDtoCustomFieldDto.parse_obj(obj)
+ return PageDtoCustomFieldDto.model_validate(obj)
- _obj = PageDtoCustomFieldDto.parse_obj({
+ _obj = PageDtoCustomFieldDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_custom_field_instance_dto.py b/phrasetms_client/models/page_dto_custom_field_instance_dto.py
index 917cdc11..01325e30 100644
--- a/phrasetms_client/models/page_dto_custom_field_instance_dto.py
+++ b/phrasetms_client/models/page_dto_custom_field_instance_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.custom_field_instance_dto import CustomFieldInstanceDto
class PageDtoCustomFieldInstanceDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoCustomFieldInstanceDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(CustomFieldInstanceDto)] = None
+ content: Optional[List[CustomFieldInstanceDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoCustomFieldInstanceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoCustomFieldInstanceDto:
return None
if not isinstance(obj, dict):
- return PageDtoCustomFieldInstanceDto.parse_obj(obj)
+ return PageDtoCustomFieldInstanceDto.model_validate(obj)
- _obj = PageDtoCustomFieldInstanceDto.parse_obj({
+ _obj = PageDtoCustomFieldInstanceDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_custom_field_option_dto.py b/phrasetms_client/models/page_dto_custom_field_option_dto.py
index 26a161e1..733aa607 100644
--- a/phrasetms_client/models/page_dto_custom_field_option_dto.py
+++ b/phrasetms_client/models/page_dto_custom_field_option_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.custom_field_option_dto import CustomFieldOptionDto
class PageDtoCustomFieldOptionDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoCustomFieldOptionDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(CustomFieldOptionDto)] = None
+ content: Optional[List[CustomFieldOptionDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoCustomFieldOptionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoCustomFieldOptionDto:
return None
if not isinstance(obj, dict):
- return PageDtoCustomFieldOptionDto.parse_obj(obj)
+ return PageDtoCustomFieldOptionDto.model_validate(obj)
- _obj = PageDtoCustomFieldOptionDto.parse_obj({
+ _obj = PageDtoCustomFieldOptionDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_custom_file_type_dto.py b/phrasetms_client/models/page_dto_custom_file_type_dto.py
index e7d255a1..aeb6bb19 100644
--- a/phrasetms_client/models/page_dto_custom_file_type_dto.py
+++ b/phrasetms_client/models/page_dto_custom_file_type_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.custom_file_type_dto import CustomFileTypeDto
class PageDtoCustomFileTypeDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoCustomFileTypeDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(CustomFileTypeDto)] = None
+ content: Optional[List[CustomFileTypeDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoCustomFileTypeDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoCustomFileTypeDto:
return None
if not isinstance(obj, dict):
- return PageDtoCustomFileTypeDto.parse_obj(obj)
+ return PageDtoCustomFileTypeDto.model_validate(obj)
- _obj = PageDtoCustomFileTypeDto.parse_obj({
+ _obj = PageDtoCustomFileTypeDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_domain_dto.py b/phrasetms_client/models/page_dto_domain_dto.py
index 1143135c..4e634853 100644
--- a/phrasetms_client/models/page_dto_domain_dto.py
+++ b/phrasetms_client/models/page_dto_domain_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.domain_dto import DomainDto
class PageDtoDomainDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoDomainDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(DomainDto)] = None
+ content: Optional[List[DomainDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoDomainDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoDomainDto:
return None
if not isinstance(obj, dict):
- return PageDtoDomainDto.parse_obj(obj)
+ return PageDtoDomainDto.model_validate(obj)
- _obj = PageDtoDomainDto.parse_obj({
+ _obj = PageDtoDomainDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_glossary_dto.py b/phrasetms_client/models/page_dto_glossary_dto.py
index 335fa08e..3a982e81 100644
--- a/phrasetms_client/models/page_dto_glossary_dto.py
+++ b/phrasetms_client/models/page_dto_glossary_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.glossary_dto import GlossaryDto
class PageDtoGlossaryDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoGlossaryDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(GlossaryDto)] = None
+ content: Optional[List[GlossaryDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoGlossaryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoGlossaryDto:
return None
if not isinstance(obj, dict):
- return PageDtoGlossaryDto.parse_obj(obj)
+ return PageDtoGlossaryDto.model_validate(obj)
- _obj = PageDtoGlossaryDto.parse_obj({
+ _obj = PageDtoGlossaryDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_import_settings_reference.py b/phrasetms_client/models/page_dto_import_settings_reference.py
index 7eb568ba..73ee5066 100644
--- a/phrasetms_client/models/page_dto_import_settings_reference.py
+++ b/phrasetms_client/models/page_dto_import_settings_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.import_settings_reference import ImportSettingsReference
class PageDtoImportSettingsReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoImportSettingsReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(ImportSettingsReference)] = None
+ content: Optional[List[ImportSettingsReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoImportSettingsReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoImportSettingsReference:
return None
if not isinstance(obj, dict):
- return PageDtoImportSettingsReference.parse_obj(obj)
+ return PageDtoImportSettingsReference.model_validate(obj)
- _obj = PageDtoImportSettingsReference.parse_obj({
+ _obj = PageDtoImportSettingsReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_job_part_reference_v2.py b/phrasetms_client/models/page_dto_job_part_reference_v2.py
index 076054d9..e8c0ec3a 100644
--- a/phrasetms_client/models/page_dto_job_part_reference_v2.py
+++ b/phrasetms_client/models/page_dto_job_part_reference_v2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.job_part_reference_v2 import JobPartReferenceV2
class PageDtoJobPartReferenceV2(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoJobPartReferenceV2(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(JobPartReferenceV2)] = None
+ content: Optional[List[JobPartReferenceV2]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoJobPartReferenceV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoJobPartReferenceV2:
return None
if not isinstance(obj, dict):
- return PageDtoJobPartReferenceV2.parse_obj(obj)
+ return PageDtoJobPartReferenceV2.model_validate(obj)
- _obj = PageDtoJobPartReferenceV2.parse_obj({
+ _obj = PageDtoJobPartReferenceV2.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_last_login_dto.py b/phrasetms_client/models/page_dto_last_login_dto.py
index 8e6bfdcd..47c08852 100644
--- a/phrasetms_client/models/page_dto_last_login_dto.py
+++ b/phrasetms_client/models/page_dto_last_login_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.last_login_dto import LastLoginDto
class PageDtoLastLoginDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoLastLoginDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(LastLoginDto)] = None
+ content: Optional[List[LastLoginDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoLastLoginDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoLastLoginDto:
return None
if not isinstance(obj, dict):
- return PageDtoLastLoginDto.parse_obj(obj)
+ return PageDtoLastLoginDto.model_validate(obj)
- _obj = PageDtoLastLoginDto.parse_obj({
+ _obj = PageDtoLastLoginDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_lqa_profile_reference_dto.py b/phrasetms_client/models/page_dto_lqa_profile_reference_dto.py
index b37f1bc5..9caea14b 100644
--- a/phrasetms_client/models/page_dto_lqa_profile_reference_dto.py
+++ b/phrasetms_client/models/page_dto_lqa_profile_reference_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.lqa_profile_reference_dto import LqaProfileReferenceDto
class PageDtoLqaProfileReferenceDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoLqaProfileReferenceDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(LqaProfileReferenceDto)] = None
+ content: Optional[List[LqaProfileReferenceDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoLqaProfileReferenceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoLqaProfileReferenceDto:
return None
if not isinstance(obj, dict):
- return PageDtoLqaProfileReferenceDto.parse_obj(obj)
+ return PageDtoLqaProfileReferenceDto.model_validate(obj)
- _obj = PageDtoLqaProfileReferenceDto.parse_obj({
+ _obj = PageDtoLqaProfileReferenceDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_machine_translate_settings_pbm_dto.py b/phrasetms_client/models/page_dto_machine_translate_settings_pbm_dto.py
index 65b28e6f..1415389a 100644
--- a/phrasetms_client/models/page_dto_machine_translate_settings_pbm_dto.py
+++ b/phrasetms_client/models/page_dto_machine_translate_settings_pbm_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.machine_translate_settings_pbm_dto import MachineTranslateSettingsPbmDto
class PageDtoMachineTranslateSettingsPbmDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoMachineTranslateSettingsPbmDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(MachineTranslateSettingsPbmDto)] = None
+ content: Optional[List[MachineTranslateSettingsPbmDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoMachineTranslateSettingsPbmDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoMachineTranslateSettingsPbmDto:
return None
if not isinstance(obj, dict):
- return PageDtoMachineTranslateSettingsPbmDto.parse_obj(obj)
+ return PageDtoMachineTranslateSettingsPbmDto.model_validate(obj)
- _obj = PageDtoMachineTranslateSettingsPbmDto.parse_obj({
+ _obj = PageDtoMachineTranslateSettingsPbmDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_net_rate_scheme_reference.py b/phrasetms_client/models/page_dto_net_rate_scheme_reference.py
index 53515b29..b9f63553 100644
--- a/phrasetms_client/models/page_dto_net_rate_scheme_reference.py
+++ b/phrasetms_client/models/page_dto_net_rate_scheme_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.net_rate_scheme_reference import NetRateSchemeReference
class PageDtoNetRateSchemeReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoNetRateSchemeReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(NetRateSchemeReference)] = None
+ content: Optional[List[NetRateSchemeReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoNetRateSchemeReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoNetRateSchemeReference:
return None
if not isinstance(obj, dict):
- return PageDtoNetRateSchemeReference.parse_obj(obj)
+ return PageDtoNetRateSchemeReference.model_validate(obj)
- _obj = PageDtoNetRateSchemeReference.parse_obj({
+ _obj = PageDtoNetRateSchemeReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_net_rate_scheme_workflow_step_reference.py b/phrasetms_client/models/page_dto_net_rate_scheme_workflow_step_reference.py
index d6801820..7e8d84bf 100644
--- a/phrasetms_client/models/page_dto_net_rate_scheme_workflow_step_reference.py
+++ b/phrasetms_client/models/page_dto_net_rate_scheme_workflow_step_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.net_rate_scheme_workflow_step_reference import NetRateSchemeWorkflowStepReference
class PageDtoNetRateSchemeWorkflowStepReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoNetRateSchemeWorkflowStepReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(NetRateSchemeWorkflowStepReference)] = None
+ content: Optional[List[NetRateSchemeWorkflowStepReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoNetRateSchemeWorkflowStepReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoNetRateSchemeWorkflowStepReference:
return None
if not isinstance(obj, dict):
- return PageDtoNetRateSchemeWorkflowStepReference.parse_obj(obj)
+ return PageDtoNetRateSchemeWorkflowStepReference.model_validate(obj)
- _obj = PageDtoNetRateSchemeWorkflowStepReference.parse_obj({
+ _obj = PageDtoNetRateSchemeWorkflowStepReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_organization_email_template_dto.py b/phrasetms_client/models/page_dto_organization_email_template_dto.py
index 1a133d1f..be95ae0e 100644
--- a/phrasetms_client/models/page_dto_organization_email_template_dto.py
+++ b/phrasetms_client/models/page_dto_organization_email_template_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.organization_email_template_dto import OrganizationEmailTemplateDto
class PageDtoOrganizationEmailTemplateDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoOrganizationEmailTemplateDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(OrganizationEmailTemplateDto)] = None
+ content: Optional[List[OrganizationEmailTemplateDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoOrganizationEmailTemplateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoOrganizationEmailTemplateDto:
return None
if not isinstance(obj, dict):
- return PageDtoOrganizationEmailTemplateDto.parse_obj(obj)
+ return PageDtoOrganizationEmailTemplateDto.model_validate(obj)
- _obj = PageDtoOrganizationEmailTemplateDto.parse_obj({
+ _obj = PageDtoOrganizationEmailTemplateDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_project_reference.py b/phrasetms_client/models/page_dto_project_reference.py
index b5cfc346..1b1230cb 100644
--- a/phrasetms_client/models/page_dto_project_reference.py
+++ b/phrasetms_client/models/page_dto_project_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.project_reference import ProjectReference
class PageDtoProjectReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoProjectReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(ProjectReference)] = None
+ content: Optional[List[ProjectReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoProjectReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoProjectReference:
return None
if not isinstance(obj, dict):
- return PageDtoProjectReference.parse_obj(obj)
+ return PageDtoProjectReference.model_validate(obj)
- _obj = PageDtoProjectReference.parse_obj({
+ _obj = PageDtoProjectReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_project_template_reference.py b/phrasetms_client/models/page_dto_project_template_reference.py
index b0f66168..48377150 100644
--- a/phrasetms_client/models/page_dto_project_template_reference.py
+++ b/phrasetms_client/models/page_dto_project_template_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.project_template_reference import ProjectTemplateReference
class PageDtoProjectTemplateReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoProjectTemplateReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(ProjectTemplateReference)] = None
+ content: Optional[List[ProjectTemplateReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoProjectTemplateReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoProjectTemplateReference:
return None
if not isinstance(obj, dict):
- return PageDtoProjectTemplateReference.parse_obj(obj)
+ return PageDtoProjectTemplateReference.model_validate(obj)
- _obj = PageDtoProjectTemplateReference.parse_obj({
+ _obj = PageDtoProjectTemplateReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_provider_reference.py b/phrasetms_client/models/page_dto_provider_reference.py
index 859fe9b5..d867dd4f 100644
--- a/phrasetms_client/models/page_dto_provider_reference.py
+++ b/phrasetms_client/models/page_dto_provider_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.provider_reference import ProviderReference
class PageDtoProviderReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoProviderReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(ProviderReference)] = None
+ content: Optional[List[ProviderReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoProviderReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoProviderReference:
return None
if not isinstance(obj, dict):
- return PageDtoProviderReference.parse_obj(obj)
+ return PageDtoProviderReference.model_validate(obj)
- _obj = PageDtoProviderReference.parse_obj({
+ _obj = PageDtoProviderReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_quote_dto.py b/phrasetms_client/models/page_dto_quote_dto.py
index 056dce1a..b95e0cb6 100644
--- a/phrasetms_client/models/page_dto_quote_dto.py
+++ b/phrasetms_client/models/page_dto_quote_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.quote_dto import QuoteDto
class PageDtoQuoteDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoQuoteDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(QuoteDto)] = None
+ content: Optional[List[QuoteDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoQuoteDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoQuoteDto:
return None
if not isinstance(obj, dict):
- return PageDtoQuoteDto.parse_obj(obj)
+ return PageDtoQuoteDto.model_validate(obj)
- _obj = PageDtoQuoteDto.parse_obj({
+ _obj = PageDtoQuoteDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_segmentation_rule_reference.py b/phrasetms_client/models/page_dto_segmentation_rule_reference.py
index 0a596b15..4cfdea15 100644
--- a/phrasetms_client/models/page_dto_segmentation_rule_reference.py
+++ b/phrasetms_client/models/page_dto_segmentation_rule_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.segmentation_rule_reference import SegmentationRuleReference
class PageDtoSegmentationRuleReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoSegmentationRuleReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(SegmentationRuleReference)] = None
+ content: Optional[List[SegmentationRuleReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoSegmentationRuleReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoSegmentationRuleReference:
return None
if not isinstance(obj, dict):
- return PageDtoSegmentationRuleReference.parse_obj(obj)
+ return PageDtoSegmentationRuleReference.model_validate(obj)
- _obj = PageDtoSegmentationRuleReference.parse_obj({
+ _obj = PageDtoSegmentationRuleReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_string.py b/phrasetms_client/models/page_dto_string.py
index 7c9bb79e..df1d5c5e 100644
--- a/phrasetms_client/models/page_dto_string.py
+++ b/phrasetms_client/models/page_dto_string.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class PageDtoString(BaseModel):
"""
@@ -30,17 +30,13 @@ class PageDtoString(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(StrictStr)] = None
+ content: Optional[List[StrictStr]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> PageDtoString:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> PageDtoString:
return None
if not isinstance(obj, dict):
- return PageDtoString.parse_obj(obj)
+ return PageDtoString.model_validate(obj)
- _obj = PageDtoString.parse_obj({
+ _obj = PageDtoString.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_sub_domain_dto.py b/phrasetms_client/models/page_dto_sub_domain_dto.py
index 0e33dc72..71ca85c9 100644
--- a/phrasetms_client/models/page_dto_sub_domain_dto.py
+++ b/phrasetms_client/models/page_dto_sub_domain_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.sub_domain_dto import SubDomainDto
class PageDtoSubDomainDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoSubDomainDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(SubDomainDto)] = None
+ content: Optional[List[SubDomainDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoSubDomainDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoSubDomainDto:
return None
if not isinstance(obj, dict):
- return PageDtoSubDomainDto.parse_obj(obj)
+ return PageDtoSubDomainDto.model_validate(obj)
- _obj = PageDtoSubDomainDto.parse_obj({
+ _obj = PageDtoSubDomainDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_term_base_dto.py b/phrasetms_client/models/page_dto_term_base_dto.py
index 73d7af41..ef7df14d 100644
--- a/phrasetms_client/models/page_dto_term_base_dto.py
+++ b/phrasetms_client/models/page_dto_term_base_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.term_base_dto import TermBaseDto
class PageDtoTermBaseDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoTermBaseDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(TermBaseDto)] = None
+ content: Optional[List[TermBaseDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoTermBaseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoTermBaseDto:
return None
if not isinstance(obj, dict):
- return PageDtoTermBaseDto.parse_obj(obj)
+ return PageDtoTermBaseDto.model_validate(obj)
- _obj = PageDtoTermBaseDto.parse_obj({
+ _obj = PageDtoTermBaseDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_trans_memory_dto.py b/phrasetms_client/models/page_dto_trans_memory_dto.py
index cf3d443f..87461410 100644
--- a/phrasetms_client/models/page_dto_trans_memory_dto.py
+++ b/phrasetms_client/models/page_dto_trans_memory_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.trans_memory_dto import TransMemoryDto
class PageDtoTransMemoryDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoTransMemoryDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(TransMemoryDto)] = None
+ content: Optional[List[TransMemoryDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoTransMemoryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoTransMemoryDto:
return None
if not isinstance(obj, dict):
- return PageDtoTransMemoryDto.parse_obj(obj)
+ return PageDtoTransMemoryDto.model_validate(obj)
- _obj = PageDtoTransMemoryDto.parse_obj({
+ _obj = PageDtoTransMemoryDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_translation_price_list_dto.py b/phrasetms_client/models/page_dto_translation_price_list_dto.py
index b9584c2b..4f84b41e 100644
--- a/phrasetms_client/models/page_dto_translation_price_list_dto.py
+++ b/phrasetms_client/models/page_dto_translation_price_list_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.translation_price_list_dto import TranslationPriceListDto
class PageDtoTranslationPriceListDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoTranslationPriceListDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(TranslationPriceListDto)] = None
+ content: Optional[List[TranslationPriceListDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoTranslationPriceListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoTranslationPriceListDto:
return None
if not isinstance(obj, dict):
- return PageDtoTranslationPriceListDto.parse_obj(obj)
+ return PageDtoTranslationPriceListDto.model_validate(obj)
- _obj = PageDtoTranslationPriceListDto.parse_obj({
+ _obj = PageDtoTranslationPriceListDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_translation_price_set_dto.py b/phrasetms_client/models/page_dto_translation_price_set_dto.py
index d628744c..4eb82dd7 100644
--- a/phrasetms_client/models/page_dto_translation_price_set_dto.py
+++ b/phrasetms_client/models/page_dto_translation_price_set_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.translation_price_set_dto import TranslationPriceSetDto
class PageDtoTranslationPriceSetDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoTranslationPriceSetDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(TranslationPriceSetDto)] = None
+ content: Optional[List[TranslationPriceSetDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoTranslationPriceSetDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoTranslationPriceSetDto:
return None
if not isinstance(obj, dict):
- return PageDtoTranslationPriceSetDto.parse_obj(obj)
+ return PageDtoTranslationPriceSetDto.model_validate(obj)
- _obj = PageDtoTranslationPriceSetDto.parse_obj({
+ _obj = PageDtoTranslationPriceSetDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_uploaded_file_dto.py b/phrasetms_client/models/page_dto_uploaded_file_dto.py
index 8c5af5ff..1ca33858 100644
--- a/phrasetms_client/models/page_dto_uploaded_file_dto.py
+++ b/phrasetms_client/models/page_dto_uploaded_file_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.uploaded_file_dto import UploadedFileDto
class PageDtoUploadedFileDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoUploadedFileDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(UploadedFileDto)] = None
+ content: Optional[List[UploadedFileDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoUploadedFileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoUploadedFileDto:
return None
if not isinstance(obj, dict):
- return PageDtoUploadedFileDto.parse_obj(obj)
+ return PageDtoUploadedFileDto.model_validate(obj)
- _obj = PageDtoUploadedFileDto.parse_obj({
+ _obj = PageDtoUploadedFileDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_user_dto.py b/phrasetms_client/models/page_dto_user_dto.py
index e8e794ca..e4e04596 100644
--- a/phrasetms_client/models/page_dto_user_dto.py
+++ b/phrasetms_client/models/page_dto_user_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.user_dto import UserDto
class PageDtoUserDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoUserDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(UserDto)] = None
+ content: Optional[List[UserDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoUserDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoUserDto:
return None
if not isinstance(obj, dict):
- return PageDtoUserDto.parse_obj(obj)
+ return PageDtoUserDto.model_validate(obj)
- _obj = PageDtoUserDto.parse_obj({
+ _obj = PageDtoUserDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_vendor_dto.py b/phrasetms_client/models/page_dto_vendor_dto.py
index 2c363af1..aaef3137 100644
--- a/phrasetms_client/models/page_dto_vendor_dto.py
+++ b/phrasetms_client/models/page_dto_vendor_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.vendor_dto import VendorDto
class PageDtoVendorDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoVendorDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(VendorDto)] = None
+ content: Optional[List[VendorDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoVendorDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoVendorDto:
return None
if not isinstance(obj, dict):
- return PageDtoVendorDto.parse_obj(obj)
+ return PageDtoVendorDto.model_validate(obj)
- _obj = PageDtoVendorDto.parse_obj({
+ _obj = PageDtoVendorDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_web_hook_dto_v2.py b/phrasetms_client/models/page_dto_web_hook_dto_v2.py
index a0428deb..22d13779 100644
--- a/phrasetms_client/models/page_dto_web_hook_dto_v2.py
+++ b/phrasetms_client/models/page_dto_web_hook_dto_v2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.web_hook_dto_v2 import WebHookDtoV2
class PageDtoWebHookDtoV2(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoWebHookDtoV2(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(WebHookDtoV2)] = None
+ content: Optional[List[WebHookDtoV2]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoWebHookDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoWebHookDtoV2:
return None
if not isinstance(obj, dict):
- return PageDtoWebHookDtoV2.parse_obj(obj)
+ return PageDtoWebHookDtoV2.model_validate(obj)
- _obj = PageDtoWebHookDtoV2.parse_obj({
+ _obj = PageDtoWebHookDtoV2.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_webhook_call_dto.py b/phrasetms_client/models/page_dto_webhook_call_dto.py
index f59c74cb..66fbe888 100644
--- a/phrasetms_client/models/page_dto_webhook_call_dto.py
+++ b/phrasetms_client/models/page_dto_webhook_call_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.webhook_call_dto import WebhookCallDto
class PageDtoWebhookCallDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoWebhookCallDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(WebhookCallDto)] = None
+ content: Optional[List[WebhookCallDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoWebhookCallDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoWebhookCallDto:
return None
if not isinstance(obj, dict):
- return PageDtoWebhookCallDto.parse_obj(obj)
+ return PageDtoWebhookCallDto.model_validate(obj)
- _obj = PageDtoWebhookCallDto.parse_obj({
+ _obj = PageDtoWebhookCallDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_workflow_step_dto.py b/phrasetms_client/models/page_dto_workflow_step_dto.py
index 756169a6..ccace1a2 100644
--- a/phrasetms_client/models/page_dto_workflow_step_dto.py
+++ b/phrasetms_client/models/page_dto_workflow_step_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.workflow_step_dto import WorkflowStepDto
class PageDtoWorkflowStepDto(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoWorkflowStepDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(WorkflowStepDto)] = None
+ content: Optional[List[WorkflowStepDto]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoWorkflowStepDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoWorkflowStepDto:
return None
if not isinstance(obj, dict):
- return PageDtoWorkflowStepDto.parse_obj(obj)
+ return PageDtoWorkflowStepDto.model_validate(obj)
- _obj = PageDtoWorkflowStepDto.parse_obj({
+ _obj = PageDtoWorkflowStepDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/page_dto_workflow_step_reference.py b/phrasetms_client/models/page_dto_workflow_step_reference.py
index 44fdbe1d..3d152b27 100644
--- a/phrasetms_client/models/page_dto_workflow_step_reference.py
+++ b/phrasetms_client/models/page_dto_workflow_step_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.workflow_step_reference import WorkflowStepReference
class PageDtoWorkflowStepReference(BaseModel):
@@ -31,17 +31,13 @@ class PageDtoWorkflowStepReference(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(WorkflowStepReference)] = None
+ content: Optional[List[WorkflowStepReference]] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PageDtoWorkflowStepReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> PageDtoWorkflowStepReference:
return None
if not isinstance(obj, dict):
- return PageDtoWorkflowStepReference.parse_obj(obj)
+ return PageDtoWorkflowStepReference.model_validate(obj)
- _obj = PageDtoWorkflowStepReference.parse_obj({
+ _obj = PageDtoWorkflowStepReference.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/pass_fail_threshold_dto.py b/phrasetms_client/models/pass_fail_threshold_dto.py
index b840a746..ef0d59db 100644
--- a/phrasetms_client/models/pass_fail_threshold_dto.py
+++ b/phrasetms_client/models/pass_fail_threshold_dto.py
@@ -19,7 +19,7 @@
from typing import Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt
class PassFailThresholdDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class PassFailThresholdDto(BaseModel):
min_score_percentage: Union[StrictFloat, StrictInt] = Field(..., alias="minScorePercentage", description="Minimum allowed LQA score in percentage in line with MQM scoring (1 - penalties/word-count)")
__properties = ["minScorePercentage"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> PassFailThresholdDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> PassFailThresholdDto:
return None
if not isinstance(obj, dict):
- return PassFailThresholdDto.parse_obj(obj)
+ return PassFailThresholdDto.model_validate(obj)
- _obj = PassFailThresholdDto.parse_obj({
+ _obj = PassFailThresholdDto.model_validate({
"min_score_percentage": obj.get("minScorePercentage")
})
return _obj
diff --git a/phrasetms_client/models/patch_project_dto.py b/phrasetms_client/models/patch_project_dto.py
index 10123d67..e4364364 100644
--- a/phrasetms_client/models/patch_project_dto.py
+++ b/phrasetms_client/models/patch_project_dto.py
@@ -18,8 +18,17 @@
import json
from datetime import datetime
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.project_mt_settings_per_lang_dto import ProjectMTSettingsPerLangDto
from phrasetms_client.models.uid_reference import UidReference
@@ -28,22 +37,23 @@ class PatchProjectDto(BaseModel):
"""
PatchProjectDto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
status: Optional[StrictStr] = None
client: Optional[IdReference] = None
business_unit: Optional[IdReference] = Field(None, alias="businessUnit")
domain: Optional[IdReference] = None
sub_domain: Optional[IdReference] = Field(None, alias="subDomain")
owner: Optional[IdReference] = None
- purchase_order: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="purchaseOrder")
+ purchase_order: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="purchaseOrder")
date_due: Optional[datetime] = Field(None, alias="dateDue")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
machine_translate_settings: Optional[UidReference] = Field(None, alias="machineTranslateSettings")
- machine_translate_settings_per_langs: Optional[conlist(ProjectMTSettingsPerLangDto)] = Field(None, alias="machineTranslateSettingsPerLangs")
+ machine_translate_settings_per_langs: Optional[List[ProjectMTSettingsPerLangDto]] = Field(None, alias="machineTranslateSettingsPerLangs")
archived: Optional[StrictBool] = None
__properties = ["name", "status", "client", "businessUnit", "domain", "subDomain", "owner", "purchaseOrder", "dateDue", "note", "machineTranslateSettings", "machineTranslateSettingsPerLangs", "archived"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -53,14 +63,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('NEW', 'ASSIGNED', 'COMPLETED', 'ACCEPTED_BY_VENDOR', 'DECLINED_BY_VENDOR', 'COMPLETED_BY_VENDOR', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -73,7 +79,7 @@ def from_json(cls, json_str: str) -> PatchProjectDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -111,9 +117,9 @@ def from_dict(cls, obj: dict) -> PatchProjectDto:
return None
if not isinstance(obj, dict):
- return PatchProjectDto.parse_obj(obj)
+ return PatchProjectDto.model_validate(obj)
- _obj = PatchProjectDto.parse_obj({
+ _obj = PatchProjectDto.model_validate({
"name": obj.get("name"),
"status": obj.get("status"),
"client": IdReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
diff --git a/phrasetms_client/models/pdf_settings_dto.py b/phrasetms_client/models/pdf_settings_dto.py
index 471f3d6d..1f276846 100644
--- a/phrasetms_client/models/pdf_settings_dto.py
+++ b/phrasetms_client/models/pdf_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class PdfSettingsDto(BaseModel):
"""
@@ -28,7 +28,8 @@ class PdfSettingsDto(BaseModel):
filter: Optional[StrictStr] = Field(None, description="Default: TRANS_PDF")
__properties = ["filter"]
- @validator('filter')
+ @field_validator('filter')
+ @classmethod
def filter_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -38,14 +39,10 @@ def filter_validate_enum(cls, value):
raise ValueError("must be one of enum values ('TRANS_PDF', 'DEFAULT')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +55,7 @@ def from_json(cls, json_str: str) -> PdfSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +68,9 @@ def from_dict(cls, obj: dict) -> PdfSettingsDto:
return None
if not isinstance(obj, dict):
- return PdfSettingsDto.parse_obj(obj)
+ return PdfSettingsDto.model_validate(obj)
- _obj = PdfSettingsDto.parse_obj({
+ _obj = PdfSettingsDto.model_validate({
"filter": obj.get("filter")
})
return _obj
diff --git a/phrasetms_client/models/penalty_points_dto.py b/phrasetms_client/models/penalty_points_dto.py
index 1029ce1d..5de04f26 100644
--- a/phrasetms_client/models/penalty_points_dto.py
+++ b/phrasetms_client/models/penalty_points_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.severity_dto import SeverityDto
class PenaltyPointsDto(BaseModel):
@@ -32,14 +32,10 @@ class PenaltyPointsDto(BaseModel):
critical: Optional[SeverityDto] = None
__properties = ["neutral", "minor", "major", "critical"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> PenaltyPointsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +73,9 @@ def from_dict(cls, obj: dict) -> PenaltyPointsDto:
return None
if not isinstance(obj, dict):
- return PenaltyPointsDto.parse_obj(obj)
+ return PenaltyPointsDto.model_validate(obj)
- _obj = PenaltyPointsDto.parse_obj({
+ _obj = PenaltyPointsDto.model_validate({
"neutral": SeverityDto.from_dict(obj.get("neutral")) if obj.get("neutral") is not None else None,
"minor": SeverityDto.from_dict(obj.get("minor")) if obj.get("minor") is not None else None,
"major": SeverityDto.from_dict(obj.get("major")) if obj.get("major") is not None else None,
diff --git a/phrasetms_client/models/php_settings_dto.py b/phrasetms_client/models/php_settings_dto.py
index 743dd16c..4473e71a 100644
--- a/phrasetms_client/models/php_settings_dto.py
+++ b/phrasetms_client/models/php_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class PhpSettingsDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class PhpSettingsDto(BaseModel):
html_sub_filter: Optional[StrictBool] = Field(None, alias="htmlSubFilter", description="Default: false")
__properties = ["tagRegexp", "htmlSubFilter"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> PhpSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> PhpSettingsDto:
return None
if not isinstance(obj, dict):
- return PhpSettingsDto.parse_obj(obj)
+ return PhpSettingsDto.model_validate(obj)
- _obj = PhpSettingsDto.parse_obj({
+ _obj = PhpSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp"),
"html_sub_filter": obj.get("htmlSubFilter")
})
diff --git a/phrasetms_client/models/plain_conversation_dto.py b/phrasetms_client/models/plain_conversation_dto.py
index dae2a0b6..36fcb94f 100644
--- a/phrasetms_client/models/plain_conversation_dto.py
+++ b/phrasetms_client/models/plain_conversation_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.comment_dto import CommentDto
from phrasetms_client.models.mentionable_user_dto import MentionableUserDto
from phrasetms_client.models.plain_references import PlainReferences
@@ -35,20 +35,16 @@ class PlainConversationDto(BaseModel):
date_modified: Optional[datetime] = Field(None, alias="dateModified")
date_edited: Optional[datetime] = Field(None, alias="dateEdited")
created_by: Optional[MentionableUserDto] = Field(None, alias="createdBy")
- comments: Optional[conlist(CommentDto)] = None
+ comments: Optional[List[CommentDto]] = None
status: Optional[StatusDto] = None
deleted: Optional[StrictBool] = None
references: Optional[PlainReferences] = None
__properties = ["id", "type", "dateCreated", "dateModified", "dateEdited", "createdBy", "comments", "status", "deleted", "references"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +57,7 @@ def from_json(cls, json_str: str) -> PlainConversationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -90,9 +86,9 @@ def from_dict(cls, obj: dict) -> PlainConversationDto:
return None
if not isinstance(obj, dict):
- return PlainConversationDto.parse_obj(obj)
+ return PlainConversationDto.model_validate(obj)
- _obj = PlainConversationDto.parse_obj({
+ _obj = PlainConversationDto.model_validate({
"id": obj.get("id"),
"type": obj.get("type"),
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/plain_conversations_list_dto.py b/phrasetms_client/models/plain_conversations_list_dto.py
index 78902ab2..0bc9524e 100644
--- a/phrasetms_client/models/plain_conversations_list_dto.py
+++ b/phrasetms_client/models/plain_conversations_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.plain_conversation_dto import PlainConversationDto
class PlainConversationsListDto(BaseModel):
"""
PlainConversationsListDto
"""
- conversations: Optional[conlist(PlainConversationDto)] = None
+ conversations: Optional[List[PlainConversationDto]] = None
__properties = ["conversations"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> PlainConversationsListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> PlainConversationsListDto:
return None
if not isinstance(obj, dict):
- return PlainConversationsListDto.parse_obj(obj)
+ return PlainConversationsListDto.model_validate(obj)
- _obj = PlainConversationsListDto.parse_obj({
+ _obj = PlainConversationsListDto.model_validate({
"conversations": [PlainConversationDto.from_dict(_item) for _item in obj.get("conversations")] if obj.get("conversations") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/plain_references.py b/phrasetms_client/models/plain_references.py
index 9786596d..23e53905 100644
--- a/phrasetms_client/models/plain_references.py
+++ b/phrasetms_client/models/plain_references.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.reference_correlation import ReferenceCorrelation
class PlainReferences(BaseModel):
@@ -28,22 +29,18 @@ class PlainReferences(BaseModel):
"""
task_id: Optional[StrictStr] = Field(None, alias="taskId")
job_part_uid: Optional[StrictStr] = Field(None, alias="jobPartUid")
- trans_group_id: conint(strict=True, ge=0) = Field(..., alias="transGroupId")
+ trans_group_id: Annotated[int, Field(strict=True, ge=0)] = Field(..., alias="transGroupId")
segment_id: StrictStr = Field(..., alias="segmentId")
conversation_title: Optional[StrictStr] = Field(None, alias="conversationTitle")
- conversation_title_offset: Optional[conint(strict=True, ge=0)] = Field(None, alias="conversationTitleOffset")
+ conversation_title_offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(None, alias="conversationTitleOffset")
commented_text: Optional[StrictStr] = Field(None, alias="commentedText")
correlation: Optional[ReferenceCorrelation] = None
__properties = ["taskId", "jobPartUid", "transGroupId", "segmentId", "conversationTitle", "conversationTitleOffset", "commentedText", "correlation"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +53,7 @@ def from_json(cls, json_str: str) -> PlainReferences:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"task_id",
"job_part_uid",
@@ -74,9 +71,9 @@ def from_dict(cls, obj: dict) -> PlainReferences:
return None
if not isinstance(obj, dict):
- return PlainReferences.parse_obj(obj)
+ return PlainReferences.model_validate(obj)
- _obj = PlainReferences.parse_obj({
+ _obj = PlainReferences.model_validate({
"task_id": obj.get("taskId"),
"job_part_uid": obj.get("jobPartUid"),
"trans_group_id": obj.get("transGroupId"),
diff --git a/phrasetms_client/models/po_settings_dto.py b/phrasetms_client/models/po_settings_dto.py
index 08f4cdbd..e4fbabce 100644
--- a/phrasetms_client/models/po_settings_dto.py
+++ b/phrasetms_client/models/po_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class PoSettingsDto(BaseModel):
"""
@@ -41,7 +41,8 @@ class PoSettingsDto(BaseModel):
icu_sub_filter: Optional[StrictBool] = Field(None, alias="icuSubFilter", description="Default: `false`")
__properties = ["tagRegexp", "exportMultiline", "htmlSubFilter", "segment", "markupSubFilterTranslatable", "markupSubFilterNonTranslatable", "saveConfirmedSegments", "importSetSegmentConfirmedWhen", "importSetSegmentLockedWhen", "exportConfirmedLocked", "exportConfirmedNotLocked", "exportNotConfirmedLocked", "exportNotConfirmedNotLocked", "icuSubFilter"]
- @validator('import_set_segment_confirmed_when')
+ @field_validator('import_set_segment_confirmed_when')
+ @classmethod
def import_set_segment_confirmed_when_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -51,7 +52,8 @@ def import_set_segment_confirmed_when_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FUZZY', 'NONFUZZY')")
return value
- @validator('import_set_segment_locked_when')
+ @field_validator('import_set_segment_locked_when')
+ @classmethod
def import_set_segment_locked_when_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -61,7 +63,8 @@ def import_set_segment_locked_when_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FUZZY', 'NONFUZZY')")
return value
- @validator('export_confirmed_locked')
+ @field_validator('export_confirmed_locked')
+ @classmethod
def export_confirmed_locked_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -71,7 +74,8 @@ def export_confirmed_locked_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FUZZY', 'NONFUZZY')")
return value
- @validator('export_confirmed_not_locked')
+ @field_validator('export_confirmed_not_locked')
+ @classmethod
def export_confirmed_not_locked_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -81,7 +85,8 @@ def export_confirmed_not_locked_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FUZZY', 'NONFUZZY')")
return value
- @validator('export_not_confirmed_locked')
+ @field_validator('export_not_confirmed_locked')
+ @classmethod
def export_not_confirmed_locked_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -91,7 +96,8 @@ def export_not_confirmed_locked_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FUZZY', 'NONFUZZY')")
return value
- @validator('export_not_confirmed_not_locked')
+ @field_validator('export_not_confirmed_not_locked')
+ @classmethod
def export_not_confirmed_not_locked_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -101,14 +107,10 @@ def export_not_confirmed_not_locked_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FUZZY', 'NONFUZZY')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -121,7 +123,7 @@ def from_json(cls, json_str: str) -> PoSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -134,9 +136,9 @@ def from_dict(cls, obj: dict) -> PoSettingsDto:
return None
if not isinstance(obj, dict):
- return PoSettingsDto.parse_obj(obj)
+ return PoSettingsDto.model_validate(obj)
- _obj = PoSettingsDto.parse_obj({
+ _obj = PoSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp"),
"export_multiline": obj.get("exportMultiline"),
"html_sub_filter": obj.get("htmlSubFilter"),
diff --git a/phrasetms_client/models/position.py b/phrasetms_client/models/position.py
index 607541db..0f867ce1 100644
--- a/phrasetms_client/models/position.py
+++ b/phrasetms_client/models/position.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class Position(BaseModel):
"""
@@ -29,14 +29,10 @@ class Position(BaseModel):
end_index: Optional[StrictInt] = Field(None, alias="endIndex")
__properties = ["beginIndex", "endIndex"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> Position:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> Position:
return None
if not isinstance(obj, dict):
- return Position.parse_obj(obj)
+ return Position.model_validate(obj)
- _obj = Position.parse_obj({
+ _obj = Position.model_validate({
"begin_index": obj.get("beginIndex"),
"end_index": obj.get("endIndex")
})
diff --git a/phrasetms_client/models/post_analyse.py b/phrasetms_client/models/post_analyse.py
index a1e73bc1..c9e786ff 100644
--- a/phrasetms_client/models/post_analyse.py
+++ b/phrasetms_client/models/post_analyse.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.abstract_analyse_settings_dto import AbstractAnalyseSettingsDto
class PostAnalyse(AbstractAnalyseSettingsDto):
@@ -31,14 +31,10 @@ class PostAnalyse(AbstractAnalyseSettingsDto):
machine_translate_post_editing: Optional[StrictBool] = Field(None, alias="machineTranslatePostEditing", description="Default: false")
__properties = ["type", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "countSourceUnits", "includeTransMemory", "namingPattern", "analyzeByLanguage", "analyzeByProvider", "allowAutomaticPostAnalysis", "transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> PostAnalyse:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> PostAnalyse:
return None
if not isinstance(obj, dict):
- return PostAnalyse.parse_obj(obj)
+ return PostAnalyse.model_validate(obj)
- _obj = PostAnalyse.parse_obj({
+ _obj = PostAnalyse.model_validate({
"type": obj.get("type"),
"include_confirmed_segments": obj.get("includeConfirmedSegments"),
"include_numbers": obj.get("includeNumbers"),
diff --git a/phrasetms_client/models/post_analyse_all_of.py b/phrasetms_client/models/post_analyse_all_of.py
index 2c326cd1..2765ea9b 100644
--- a/phrasetms_client/models/post_analyse_all_of.py
+++ b/phrasetms_client/models/post_analyse_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class PostAnalyseAllOf(BaseModel):
"""
@@ -30,14 +30,10 @@ class PostAnalyseAllOf(BaseModel):
machine_translate_post_editing: Optional[StrictBool] = Field(None, alias="machineTranslatePostEditing", description="Default: false")
__properties = ["transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> PostAnalyseAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> PostAnalyseAllOf:
return None
if not isinstance(obj, dict):
- return PostAnalyseAllOf.parse_obj(obj)
+ return PostAnalyseAllOf.model_validate(obj)
- _obj = PostAnalyseAllOf.parse_obj({
+ _obj = PostAnalyseAllOf.model_validate({
"trans_memory_post_editing": obj.get("transMemoryPostEditing"),
"non_translatable_post_editing": obj.get("nonTranslatablePostEditing"),
"machine_translate_post_editing": obj.get("machineTranslatePostEditing")
diff --git a/phrasetms_client/models/ppt_settings_dto.py b/phrasetms_client/models/ppt_settings_dto.py
index a54677ea..b0bcb588 100644
--- a/phrasetms_client/models/ppt_settings_dto.py
+++ b/phrasetms_client/models/ppt_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class PptSettingsDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class PptSettingsDto(BaseModel):
master_slides: Optional[StrictBool] = Field(None, alias="masterSlides", description="Default: false")
__properties = ["hiddenSlides", "other", "notes", "masterSlides"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> PptSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> PptSettingsDto:
return None
if not isinstance(obj, dict):
- return PptSettingsDto.parse_obj(obj)
+ return PptSettingsDto.model_validate(obj)
- _obj = PptSettingsDto.parse_obj({
+ _obj = PptSettingsDto.model_validate({
"hidden_slides": obj.get("hiddenSlides"),
"other": obj.get("other"),
"notes": obj.get("notes"),
diff --git a/phrasetms_client/models/pre_analyse.py b/phrasetms_client/models/pre_analyse.py
index d476c0e3..effcb91a 100644
--- a/phrasetms_client/models/pre_analyse.py
+++ b/phrasetms_client/models/pre_analyse.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.abstract_analyse_settings_dto import AbstractAnalyseSettingsDto
class PreAnalyse(AbstractAnalyseSettingsDto):
@@ -32,14 +32,10 @@ class PreAnalyse(AbstractAnalyseSettingsDto):
include_machine_translation_matches: Optional[StrictBool] = Field(None, alias="includeMachineTranslationMatches", description="Default: false")
__properties = ["type", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "countSourceUnits", "includeTransMemory", "namingPattern", "analyzeByLanguage", "analyzeByProvider", "allowAutomaticPostAnalysis", "includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeNonTranslatables", "includeMachineTranslationMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> PreAnalyse:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> PreAnalyse:
return None
if not isinstance(obj, dict):
- return PreAnalyse.parse_obj(obj)
+ return PreAnalyse.model_validate(obj)
- _obj = PreAnalyse.parse_obj({
+ _obj = PreAnalyse.model_validate({
"type": obj.get("type"),
"include_confirmed_segments": obj.get("includeConfirmedSegments"),
"include_numbers": obj.get("includeNumbers"),
diff --git a/phrasetms_client/models/pre_analyse_all_of.py b/phrasetms_client/models/pre_analyse_all_of.py
index 825dc9c6..615b34ab 100644
--- a/phrasetms_client/models/pre_analyse_all_of.py
+++ b/phrasetms_client/models/pre_analyse_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class PreAnalyseAllOf(BaseModel):
"""
@@ -31,14 +31,10 @@ class PreAnalyseAllOf(BaseModel):
include_machine_translation_matches: Optional[StrictBool] = Field(None, alias="includeMachineTranslationMatches", description="Default: false")
__properties = ["includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeNonTranslatables", "includeMachineTranslationMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> PreAnalyseAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> PreAnalyseAllOf:
return None
if not isinstance(obj, dict):
- return PreAnalyseAllOf.parse_obj(obj)
+ return PreAnalyseAllOf.model_validate(obj)
- _obj = PreAnalyseAllOf.parse_obj({
+ _obj = PreAnalyseAllOf.model_validate({
"include_fuzzy_repetitions": obj.get("includeFuzzyRepetitions"),
"separate_fuzzy_repetitions": obj.get("separateFuzzyRepetitions"),
"include_non_translatables": obj.get("includeNonTranslatables"),
diff --git a/phrasetms_client/models/pre_analyse_target_compare.py b/phrasetms_client/models/pre_analyse_target_compare.py
index e06e73a0..69ef8a39 100644
--- a/phrasetms_client/models/pre_analyse_target_compare.py
+++ b/phrasetms_client/models/pre_analyse_target_compare.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.abstract_analyse_settings_dto import AbstractAnalyseSettingsDto
class PreAnalyseTargetCompare(AbstractAnalyseSettingsDto):
@@ -35,14 +35,10 @@ class PreAnalyseTargetCompare(AbstractAnalyseSettingsDto):
include_machine_translation_matches: Optional[StrictBool] = Field(None, alias="includeMachineTranslationMatches", description="Default: false")
__properties = ["type", "includeConfirmedSegments", "includeNumbers", "includeLockedSegments", "countSourceUnits", "includeTransMemory", "namingPattern", "analyzeByLanguage", "analyzeByProvider", "allowAutomaticPostAnalysis", "transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing", "includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeNonTranslatables", "includeMachineTranslationMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> PreAnalyseTargetCompare:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> PreAnalyseTargetCompare:
return None
if not isinstance(obj, dict):
- return PreAnalyseTargetCompare.parse_obj(obj)
+ return PreAnalyseTargetCompare.model_validate(obj)
- _obj = PreAnalyseTargetCompare.parse_obj({
+ _obj = PreAnalyseTargetCompare.model_validate({
"type": obj.get("type"),
"include_confirmed_segments": obj.get("includeConfirmedSegments"),
"include_numbers": obj.get("includeNumbers"),
diff --git a/phrasetms_client/models/pre_analyse_target_compare_all_of.py b/phrasetms_client/models/pre_analyse_target_compare_all_of.py
index cdacf9b6..68d009e6 100644
--- a/phrasetms_client/models/pre_analyse_target_compare_all_of.py
+++ b/phrasetms_client/models/pre_analyse_target_compare_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class PreAnalyseTargetCompareAllOf(BaseModel):
"""
@@ -34,14 +34,10 @@ class PreAnalyseTargetCompareAllOf(BaseModel):
include_machine_translation_matches: Optional[StrictBool] = Field(None, alias="includeMachineTranslationMatches", description="Default: false")
__properties = ["transMemoryPostEditing", "nonTranslatablePostEditing", "machineTranslatePostEditing", "includeFuzzyRepetitions", "separateFuzzyRepetitions", "includeNonTranslatables", "includeMachineTranslationMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> PreAnalyseTargetCompareAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> PreAnalyseTargetCompareAllOf:
return None
if not isinstance(obj, dict):
- return PreAnalyseTargetCompareAllOf.parse_obj(obj)
+ return PreAnalyseTargetCompareAllOf.model_validate(obj)
- _obj = PreAnalyseTargetCompareAllOf.parse_obj({
+ _obj = PreAnalyseTargetCompareAllOf.model_validate({
"trans_memory_post_editing": obj.get("transMemoryPostEditing"),
"non_translatable_post_editing": obj.get("nonTranslatablePostEditing"),
"machine_translate_post_editing": obj.get("machineTranslatePostEditing"),
diff --git a/phrasetms_client/models/pre_translate_job_settings_dto.py b/phrasetms_client/models/pre_translate_job_settings_dto.py
index 74f433a9..c25deb58 100644
--- a/phrasetms_client/models/pre_translate_job_settings_dto.py
+++ b/phrasetms_client/models/pre_translate_job_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.job_machine_translation_settings_dto import JobMachineTranslationSettingsDto
from phrasetms_client.models.job_non_translatable_settings_dto import JobNonTranslatableSettingsDto
from phrasetms_client.models.job_translation_memory_settings_dto import JobTranslationMemorySettingsDto
@@ -39,14 +39,10 @@ class PreTranslateJobSettingsDto(BaseModel):
non_translatable_settings: Optional[JobNonTranslatableSettingsDto] = Field(None, alias="nonTranslatableSettings")
__properties = ["autoPropagateRepetitions", "confirmRepetitions", "setJobStatusCompleted", "setJobStatusCompletedWhenConfirmed", "setProjectStatusCompleted", "overwriteExistingTranslations", "translationMemorySettings", "machineTranslationSettings", "nonTranslatableSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +55,7 @@ def from_json(cls, json_str: str) -> PreTranslateJobSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +77,9 @@ def from_dict(cls, obj: dict) -> PreTranslateJobSettingsDto:
return None
if not isinstance(obj, dict):
- return PreTranslateJobSettingsDto.parse_obj(obj)
+ return PreTranslateJobSettingsDto.model_validate(obj)
- _obj = PreTranslateJobSettingsDto.parse_obj({
+ _obj = PreTranslateJobSettingsDto.model_validate({
"auto_propagate_repetitions": obj.get("autoPropagateRepetitions"),
"confirm_repetitions": obj.get("confirmRepetitions"),
"set_job_status_completed": obj.get("setJobStatusCompleted"),
diff --git a/phrasetms_client/models/pre_translate_jobs_v2_dto.py b/phrasetms_client/models/pre_translate_jobs_v2_dto.py
index 4aa6f72e..f94e096d 100644
--- a/phrasetms_client/models/pre_translate_jobs_v2_dto.py
+++ b/phrasetms_client/models/pre_translate_jobs_v2_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.pre_translate_job_settings_dto import PreTranslateJobSettingsDto
from phrasetms_client.models.uid_reference import UidReference
@@ -27,14 +27,15 @@ class PreTranslateJobsV2Dto(BaseModel):
"""
PreTranslateJobsV2Dto
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(..., description="Jobs to be pre-translated")
- segment_filters: Optional[conlist(StrictStr)] = Field(None, alias="segmentFilters")
+ jobs: List[UidReference] = Field(..., description="Jobs to be pre-translated")
+ segment_filters: Optional[List[StrictStr]] = Field(None, alias="segmentFilters")
use_project_pre_translate_settings: Optional[StrictBool] = Field(None, alias="useProjectPreTranslateSettings", description="If pre-translate settings from project should be used. If true, preTranslateSettings values are ignored. Default: false")
callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl")
pre_translate_settings: Optional[PreTranslateJobSettingsDto] = Field(None, alias="preTranslateSettings")
__properties = ["jobs", "segmentFilters", "useProjectPreTranslateSettings", "callbackUrl", "preTranslateSettings"]
- @validator('segment_filters')
+ @field_validator('segment_filters')
+ @classmethod
def segment_filters_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -45,14 +46,10 @@ def segment_filters_validate_enum(cls, value):
raise ValueError("each list item must be one of ('LOCKED', 'NOT_LOCKED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +62,7 @@ def from_json(cls, json_str: str) -> PreTranslateJobsV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -88,9 +85,9 @@ def from_dict(cls, obj: dict) -> PreTranslateJobsV2Dto:
return None
if not isinstance(obj, dict):
- return PreTranslateJobsV2Dto.parse_obj(obj)
+ return PreTranslateJobsV2Dto.model_validate(obj)
- _obj = PreTranslateJobsV2Dto.parse_obj({
+ _obj = PreTranslateJobsV2Dto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"segment_filters": obj.get("segmentFilters"),
"use_project_pre_translate_settings": obj.get("useProjectPreTranslateSettings"),
diff --git a/phrasetms_client/models/pre_translate_settings_v3_dto.py b/phrasetms_client/models/pre_translate_settings_v3_dto.py
index 06a42d6f..3d5d757c 100644
--- a/phrasetms_client/models/pre_translate_settings_v3_dto.py
+++ b/phrasetms_client/models/pre_translate_settings_v3_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.machine_translation_settings_dto import MachineTranslationSettingsDto
from phrasetms_client.models.non_translatable_settings_dto import NonTranslatableSettingsDto
from phrasetms_client.models.repetitions_settings_dto import RepetitionsSettingsDto
@@ -40,14 +40,10 @@ class PreTranslateSettingsV3Dto(BaseModel):
repetitions_settings: Optional[RepetitionsSettingsDto] = Field(None, alias="repetitionsSettings")
__properties = ["preTranslateOnJobCreation", "setJobStatusCompleted", "setJobStatusCompletedWhenConfirmed", "setProjectStatusCompleted", "overwriteExistingTranslations", "translationMemorySettings", "machineTranslationSettings", "nonTranslatableSettings", "repetitionsSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +56,7 @@ def from_json(cls, json_str: str) -> PreTranslateSettingsV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -85,9 +81,9 @@ def from_dict(cls, obj: dict) -> PreTranslateSettingsV3Dto:
return None
if not isinstance(obj, dict):
- return PreTranslateSettingsV3Dto.parse_obj(obj)
+ return PreTranslateSettingsV3Dto.model_validate(obj)
- _obj = PreTranslateSettingsV3Dto.parse_obj({
+ _obj = PreTranslateSettingsV3Dto.model_validate({
"pre_translate_on_job_creation": obj.get("preTranslateOnJobCreation"),
"set_job_status_completed": obj.get("setJobStatusCompleted"),
"set_job_status_completed_when_confirmed": obj.get("setJobStatusCompletedWhenConfirmed"),
diff --git a/phrasetms_client/models/preview_url_dto.py b/phrasetms_client/models/preview_url_dto.py
index e3b2b72c..bfe2d14e 100644
--- a/phrasetms_client/models/preview_url_dto.py
+++ b/phrasetms_client/models/preview_url_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr, validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
class PreviewUrlDto(BaseModel):
"""
@@ -29,7 +29,8 @@ class PreviewUrlDto(BaseModel):
url: Optional[StrictStr] = None
__properties = ["type", "url"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -39,14 +40,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ORIGINAL', 'PDF')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> PreviewUrlDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +69,9 @@ def from_dict(cls, obj: dict) -> PreviewUrlDto:
return None
if not isinstance(obj, dict):
- return PreviewUrlDto.parse_obj(obj)
+ return PreviewUrlDto.model_validate(obj)
- _obj = PreviewUrlDto.parse_obj({
+ _obj = PreviewUrlDto.model_validate({
"type": obj.get("type"),
"url": obj.get("url")
})
diff --git a/phrasetms_client/models/preview_urls_dto.py b/phrasetms_client/models/preview_urls_dto.py
index 7a23563b..d7c2b823 100644
--- a/phrasetms_client/models/preview_urls_dto.py
+++ b/phrasetms_client/models/preview_urls_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.preview_url_dto import PreviewUrlDto
class PreviewUrlsDto(BaseModel):
"""
PreviewUrlsDto
"""
- previews: Optional[conlist(PreviewUrlDto)] = None
+ previews: Optional[List[PreviewUrlDto]] = None
__properties = ["previews"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> PreviewUrlsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> PreviewUrlsDto:
return None
if not isinstance(obj, dict):
- return PreviewUrlsDto.parse_obj(obj)
+ return PreviewUrlsDto.model_validate(obj)
- _obj = PreviewUrlsDto.parse_obj({
+ _obj = PreviewUrlsDto.model_validate({
"previews": [PreviewUrlDto.from_dict(_item) for _item in obj.get("previews")] if obj.get("previews") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/previous_workflow_dto.py b/phrasetms_client/models/previous_workflow_dto.py
index 444b19fa..d5ddb952 100644
--- a/phrasetms_client/models/previous_workflow_dto.py
+++ b/phrasetms_client/models/previous_workflow_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool
+from pydantic import BaseModel, ConfigDict, StrictBool
from phrasetms_client.models.segments_counts_dto import SegmentsCountsDto
class PreviousWorkflowDto(BaseModel):
@@ -30,14 +30,10 @@ class PreviousWorkflowDto(BaseModel):
counts: Optional[SegmentsCountsDto] = None
__properties = ["completed", "counts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> PreviousWorkflowDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> PreviousWorkflowDto:
return None
if not isinstance(obj, dict):
- return PreviousWorkflowDto.parse_obj(obj)
+ return PreviousWorkflowDto.model_validate(obj)
- _obj = PreviousWorkflowDto.parse_obj({
+ _obj = PreviousWorkflowDto.model_validate({
"completed": obj.get("completed"),
"counts": SegmentsCountsDto.from_dict(obj.get("counts")) if obj.get("counts") is not None else None
})
diff --git a/phrasetms_client/models/price_list_reference.py b/phrasetms_client/models/price_list_reference.py
index fa285807..bc957fba 100644
--- a/phrasetms_client/models/price_list_reference.py
+++ b/phrasetms_client/models/price_list_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class PriceListReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class PriceListReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["id", "name", "uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> PriceListReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> PriceListReference:
return None
if not isinstance(obj, dict):
- return PriceListReference.parse_obj(obj)
+ return PriceListReference.model_validate(obj)
- _obj = PriceListReference.parse_obj({
+ _obj = PriceListReference.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"uid": obj.get("uid")
diff --git a/phrasetms_client/models/progress_dto.py b/phrasetms_client/models/progress_dto.py
index 78b07f27..0cbe9126 100644
--- a/phrasetms_client/models/progress_dto.py
+++ b/phrasetms_client/models/progress_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class ProgressDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class ProgressDto(BaseModel):
overdue_count: Optional[StrictInt] = Field(None, alias="overdueCount")
__properties = ["totalCount", "finishedCount", "overdueCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ProgressDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ProgressDto:
return None
if not isinstance(obj, dict):
- return ProgressDto.parse_obj(obj)
+ return ProgressDto.model_validate(obj)
- _obj = ProgressDto.parse_obj({
+ _obj = ProgressDto.model_validate({
"total_count": obj.get("totalCount"),
"finished_count": obj.get("finishedCount"),
"overdue_count": obj.get("overdueCount")
diff --git a/phrasetms_client/models/progress_dto_v2.py b/phrasetms_client/models/progress_dto_v2.py
index 15632dc6..a13d8a33 100644
--- a/phrasetms_client/models/progress_dto_v2.py
+++ b/phrasetms_client/models/progress_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class ProgressDtoV2(BaseModel):
"""
@@ -30,14 +30,10 @@ class ProgressDtoV2(BaseModel):
overdue_count: Optional[StrictInt] = Field(None, alias="overdueCount")
__properties = ["totalCount", "finishedCount", "overdueCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ProgressDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ProgressDtoV2:
return None
if not isinstance(obj, dict):
- return ProgressDtoV2.parse_obj(obj)
+ return ProgressDtoV2.model_validate(obj)
- _obj = ProgressDtoV2.parse_obj({
+ _obj = ProgressDtoV2.model_validate({
"total_count": obj.get("totalCount"),
"finished_count": obj.get("finishedCount"),
"overdue_count": obj.get("overdueCount")
diff --git a/phrasetms_client/models/progress_reference.py b/phrasetms_client/models/progress_reference.py
index 680c1971..309fbd9b 100644
--- a/phrasetms_client/models/progress_reference.py
+++ b/phrasetms_client/models/progress_reference.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt
class ProgressReference(BaseModel):
"""
@@ -32,14 +32,10 @@ class ProgressReference(BaseModel):
overdue_ratio: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="overdueRatio")
__properties = ["totalCount", "finishedCount", "overdueCount", "finishedRatio", "overdueRatio"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> ProgressReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> ProgressReference:
return None
if not isinstance(obj, dict):
- return ProgressReference.parse_obj(obj)
+ return ProgressReference.model_validate(obj)
- _obj = ProgressReference.parse_obj({
+ _obj = ProgressReference.model_validate({
"total_count": obj.get("totalCount"),
"finished_count": obj.get("finishedCount"),
"overdue_count": obj.get("overdueCount"),
diff --git a/phrasetms_client/models/project_job_parts_dto.py b/phrasetms_client/models/project_job_parts_dto.py
index c797db75..ea5fca9c 100644
--- a/phrasetms_client/models/project_job_parts_dto.py
+++ b/phrasetms_client/models/project_job_parts_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.job_part_reference import JobPartReference
from phrasetms_client.models.project_reference import ProjectReference
@@ -27,18 +27,14 @@ class ProjectJobPartsDto(BaseModel):
"""
ProjectJobPartsDto
"""
- jobs: Optional[conlist(JobPartReference)] = None
+ jobs: Optional[List[JobPartReference]] = None
project: Optional[ProjectReference] = None
__properties = ["jobs", "project"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> ProjectJobPartsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> ProjectJobPartsDto:
return None
if not isinstance(obj, dict):
- return ProjectJobPartsDto.parse_obj(obj)
+ return ProjectJobPartsDto.model_validate(obj)
- _obj = ProjectJobPartsDto.parse_obj({
+ _obj = ProjectJobPartsDto.model_validate({
"jobs": [JobPartReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"project": ProjectReference.from_dict(obj.get("project")) if obj.get("project") is not None else None
})
diff --git a/phrasetms_client/models/project_mt_settings_per_lang_dto.py b/phrasetms_client/models/project_mt_settings_per_lang_dto.py
index ef0ac38b..2424b0b9 100644
--- a/phrasetms_client/models/project_mt_settings_per_lang_dto.py
+++ b/phrasetms_client/models/project_mt_settings_per_lang_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.uid_reference import UidReference
class ProjectMTSettingsPerLangDto(BaseModel):
@@ -30,14 +30,10 @@ class ProjectMTSettingsPerLangDto(BaseModel):
machine_translate_settings: Optional[UidReference] = Field(None, alias="machineTranslateSettings")
__properties = ["targetLang", "machineTranslateSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ProjectMTSettingsPerLangDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> ProjectMTSettingsPerLangDto:
return None
if not isinstance(obj, dict):
- return ProjectMTSettingsPerLangDto.parse_obj(obj)
+ return ProjectMTSettingsPerLangDto.model_validate(obj)
- _obj = ProjectMTSettingsPerLangDto.parse_obj({
+ _obj = ProjectMTSettingsPerLangDto.model_validate({
"target_lang": obj.get("targetLang"),
"machine_translate_settings": UidReference.from_dict(obj.get("machineTranslateSettings")) if obj.get("machineTranslateSettings") is not None else None
})
diff --git a/phrasetms_client/models/project_reference.py b/phrasetms_client/models/project_reference.py
index 9d9dccc4..33f3198a 100644
--- a/phrasetms_client/models/project_reference.py
+++ b/phrasetms_client/models/project_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.cost_center_reference import CostCenterReference
@@ -49,23 +49,19 @@ class ProjectReference(BaseModel):
vendor: Optional[VendorUserReference] = None
purchase_order: Optional[StrictStr] = Field(None, alias="purchaseOrder")
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
status: Optional[StrictStr] = None
progress: Optional[ProgressReference] = None
- metadata: Optional[conlist(MetadataReference)] = None
+ metadata: Optional[List[MetadataReference]] = None
note: Optional[StrictStr] = None
deleted: Optional[StrictBool] = None
archived: Optional[StrictBool] = None
__properties = ["uid", "innerId", "name", "businessUnit", "domain", "subDomain", "client", "costCenter", "dueDate", "createdDate", "createdBy", "owner", "vendor", "purchaseOrder", "sourceLang", "targetLangs", "status", "progress", "metadata", "note", "deleted", "archived"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -78,7 +74,7 @@ def from_json(cls, json_str: str) -> ProjectReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -125,9 +121,9 @@ def from_dict(cls, obj: dict) -> ProjectReference:
return None
if not isinstance(obj, dict):
- return ProjectReference.parse_obj(obj)
+ return ProjectReference.model_validate(obj)
- _obj = ProjectReference.parse_obj({
+ _obj = ProjectReference.model_validate({
"uid": obj.get("uid"),
"inner_id": obj.get("innerId"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/project_reference_files_request_dto.py b/phrasetms_client/models/project_reference_files_request_dto.py
index 072ec083..4e7509ca 100644
--- a/phrasetms_client/models/project_reference_files_request_dto.py
+++ b/phrasetms_client/models/project_reference_files_request_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class ProjectReferenceFilesRequestDto(BaseModel):
"""
ProjectReferenceFilesRequestDto
"""
- reference_files: conlist(IdReference) = Field(..., alias="referenceFiles")
+ reference_files: List[IdReference] = Field(..., alias="referenceFiles")
__properties = ["referenceFiles"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProjectReferenceFilesRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectReferenceFilesRequestDto:
return None
if not isinstance(obj, dict):
- return ProjectReferenceFilesRequestDto.parse_obj(obj)
+ return ProjectReferenceFilesRequestDto.model_validate(obj)
- _obj = ProjectReferenceFilesRequestDto.parse_obj({
+ _obj = ProjectReferenceFilesRequestDto.model_validate({
"reference_files": [IdReference.from_dict(_item) for _item in obj.get("referenceFiles")] if obj.get("referenceFiles") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/project_security_settings_dto_v2.py b/phrasetms_client/models/project_security_settings_dto_v2.py
index 0746fdfe..5a09c633 100644
--- a/phrasetms_client/models/project_security_settings_dto_v2.py
+++ b/phrasetms_client/models/project_security_settings_dto_v2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.vendor_security_settings_dto import VendorSecuritySettingsDto
class ProjectSecuritySettingsDtoV2(BaseModel):
@@ -43,17 +43,13 @@ class ProjectSecuritySettingsDtoV2(BaseModel):
user_may_set_instant_qa: Optional[StrictBool] = Field(None, alias="userMaySetInstantQA")
trigger_webhooks: Optional[StrictBool] = Field(None, alias="triggerWebhooks")
vendors: Optional[VendorSecuritySettingsDto] = None
- allowed_domains: Optional[conlist(StrictStr)] = Field(None, alias="allowedDomains")
+ allowed_domains: Optional[List[StrictStr]] = Field(None, alias="allowedDomains")
__properties = ["downloadEnabled", "webEditorEnabledForLinguists", "showUserDataToLinguists", "emailNotifications", "strictWorkflowFinish", "useVendors", "linguistsMayEditLockedSegments", "usersMaySetAutoPropagation", "allowLoadingExternalContentInEditors", "allowLoadingIframes", "linguistsMayEditSource", "linguistsMayEditTagContent", "linguistsMayDownloadLqaReport", "usernamesDisplayedInLqaReport", "userMaySetInstantQA", "triggerWebhooks", "vendors", "allowedDomains"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -66,7 +62,7 @@ def from_json(cls, json_str: str) -> ProjectSecuritySettingsDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> ProjectSecuritySettingsDtoV2:
return None
if not isinstance(obj, dict):
- return ProjectSecuritySettingsDtoV2.parse_obj(obj)
+ return ProjectSecuritySettingsDtoV2.model_validate(obj)
- _obj = ProjectSecuritySettingsDtoV2.parse_obj({
+ _obj = ProjectSecuritySettingsDtoV2.model_validate({
"download_enabled": obj.get("downloadEnabled"),
"web_editor_enabled_for_linguists": obj.get("webEditorEnabledForLinguists"),
"show_user_data_to_linguists": obj.get("showUserDataToLinguists"),
diff --git a/phrasetms_client/models/project_template_create_action_dto.py b/phrasetms_client/models/project_template_create_action_dto.py
index 001b6a54..5be019c7 100644
--- a/phrasetms_client/models/project_template_create_action_dto.py
+++ b/phrasetms_client/models/project_template_create_action_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StringConstraints
from phrasetms_client.models.uid_reference import UidReference
class ProjectTemplateCreateActionDto(BaseModel):
@@ -27,20 +28,16 @@ class ProjectTemplateCreateActionDto(BaseModel):
ProjectTemplateCreateActionDto
"""
project: UidReference = Field(...)
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
import_settings: Optional[UidReference] = Field(None, alias="importSettings")
use_dynamic_title: Optional[StrictBool] = Field(None, alias="useDynamicTitle")
- dynamic_title: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="dynamicTitle")
+ dynamic_title: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="dynamicTitle")
__properties = ["project", "name", "importSettings", "useDynamicTitle", "dynamicTitle"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +50,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateCreateActionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +69,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateCreateActionDto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateCreateActionDto.parse_obj(obj)
+ return ProjectTemplateCreateActionDto.model_validate(obj)
- _obj = ProjectTemplateCreateActionDto.parse_obj({
+ _obj = ProjectTemplateCreateActionDto.model_validate({
"project": UidReference.from_dict(obj.get("project")) if obj.get("project") is not None else None,
"name": obj.get("name"),
"import_settings": UidReference.from_dict(obj.get("importSettings")) if obj.get("importSettings") is not None else None,
diff --git a/phrasetms_client/models/project_template_dto.py b/phrasetms_client/models/project_template_dto.py
index 828d3eee..70274f5e 100644
--- a/phrasetms_client/models/project_template_dto.py
+++ b/phrasetms_client/models/project_template_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.assignment_per_target_lang_dto import AssignmentPerTargetLangDto
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
@@ -41,7 +41,7 @@ class ProjectTemplateDto(BaseModel):
template_name: Optional[StrictStr] = Field(None, alias="templateName")
name: Optional[StrictStr] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
note: Optional[StrictStr] = None
use_dynamic_title: Optional[StrictBool] = Field(None, alias="useDynamicTitle")
dynamic_title: Optional[StrictStr] = Field(None, alias="dynamicTitle")
@@ -55,22 +55,18 @@ class ProjectTemplateDto(BaseModel):
modified_by: Optional[UserReference] = Field(None, alias="modifiedBy")
date_modified: Optional[datetime] = Field(None, alias="dateModified", description="Deprecated - use dateTimeModified field instead")
date_time_modified: Optional[datetime] = Field(None, alias="dateTimeModified")
- workflow_steps: Optional[conlist(WorkflowStepDto)] = Field(None, alias="workflowSteps")
- workflow_settings: Optional[conlist(WorkflowStepSettingsDto)] = Field(None, alias="workflowSettings")
+ workflow_steps: Optional[List[WorkflowStepDto]] = Field(None, alias="workflowSteps")
+ workflow_settings: Optional[List[WorkflowStepSettingsDto]] = Field(None, alias="workflowSettings")
business_unit: Optional[BusinessUnitReference] = Field(None, alias="businessUnit")
notify_providers: Optional[ProjectTemplateNotifyProviderDto] = Field(None, alias="notifyProviders")
- assigned_to: Optional[conlist(AssignmentPerTargetLangDto)] = Field(None, alias="assignedTo")
+ assigned_to: Optional[List[AssignmentPerTargetLangDto]] = Field(None, alias="assignedTo")
import_settings: Optional[UidReference] = Field(None, alias="importSettings")
__properties = ["id", "uid", "templateName", "name", "sourceLang", "targetLangs", "note", "useDynamicTitle", "dynamicTitle", "owner", "client", "domain", "subDomain", "vendor", "createdBy", "dateCreated", "modifiedBy", "dateModified", "dateTimeModified", "workflowSteps", "workflowSettings", "businessUnit", "notifyProviders", "assignedTo", "importSettings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -83,7 +79,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -147,9 +143,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateDto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateDto.parse_obj(obj)
+ return ProjectTemplateDto.model_validate(obj)
- _obj = ProjectTemplateDto.parse_obj({
+ _obj = ProjectTemplateDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"template_name": obj.get("templateName"),
diff --git a/phrasetms_client/models/project_template_edit_dto.py b/phrasetms_client/models/project_template_edit_dto.py
index e1ad02d5..675e6cc8 100644
--- a/phrasetms_client/models/project_template_edit_dto.py
+++ b/phrasetms_client/models/project_template_edit_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.project_template_notify_provider_dto import ProjectTemplateNotifyProviderDto
from phrasetms_client.models.project_template_workflow_settings_assigned_to_dto import ProjectTemplateWorkflowSettingsAssignedToDto
@@ -30,14 +31,14 @@ class ProjectTemplateEditDto(BaseModel):
"""
ProjectTemplateEditDto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
- template_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="templateName")
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
+ template_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="templateName")
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
use_dynamic_title: Optional[StrictBool] = Field(None, alias="useDynamicTitle")
- dynamic_title: Optional[constr(strict=True, max_length=255, min_length=0)] = Field(None, alias="dynamicTitle")
+ dynamic_title: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = Field(None, alias="dynamicTitle")
notify_provider: Optional[ProjectTemplateNotifyProviderDto] = Field(None, alias="notifyProvider")
- work_flow_settings: Optional[conlist(WorkflowStepSettingsEditDto)] = Field(None, alias="workFlowSettings")
+ work_flow_settings: Optional[List[WorkflowStepSettingsEditDto]] = Field(None, alias="workFlowSettings")
client: Optional[IdReference] = None
cost_center: Optional[IdReference] = Field(None, alias="costCenter")
business_unit: Optional[IdReference] = Field(None, alias="businessUnit")
@@ -45,19 +46,15 @@ class ProjectTemplateEditDto(BaseModel):
sub_domain: Optional[IdReference] = Field(None, alias="subDomain")
vendor: Optional[IdReference] = None
import_settings: Optional[UidReference] = Field(None, alias="importSettings")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
file_handover: Optional[StrictBool] = Field(None, alias="fileHandover", description="Default: false")
- assigned_to: Optional[conlist(ProjectTemplateWorkflowSettingsAssignedToDto)] = Field(None, alias="assignedTo", description="only use for projects without workflows; otherwise specify in the workflowSettings object")
+ assigned_to: Optional[List[ProjectTemplateWorkflowSettingsAssignedToDto]] = Field(None, alias="assignedTo", description="only use for projects without workflows; otherwise specify in the workflowSettings object")
__properties = ["name", "templateName", "sourceLang", "targetLangs", "useDynamicTitle", "dynamicTitle", "notifyProvider", "workFlowSettings", "client", "costCenter", "businessUnit", "domain", "subDomain", "vendor", "importSettings", "note", "fileHandover", "assignedTo"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -70,7 +67,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -121,9 +118,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateEditDto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateEditDto.parse_obj(obj)
+ return ProjectTemplateEditDto.model_validate(obj)
- _obj = ProjectTemplateEditDto.parse_obj({
+ _obj = ProjectTemplateEditDto.model_validate({
"name": obj.get("name"),
"template_name": obj.get("templateName"),
"source_lang": obj.get("sourceLang"),
diff --git a/phrasetms_client/models/project_template_notify_provider_dto.py b/phrasetms_client/models/project_template_notify_provider_dto.py
index 490c507f..0c467de1 100644
--- a/phrasetms_client/models/project_template_notify_provider_dto.py
+++ b/phrasetms_client/models/project_template_notify_provider_dto.py
@@ -18,25 +18,22 @@
import json
+from typing_extensions import Annotated
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, conint
+from pydantic import BaseModel, Field, ConfigDict
class ProjectTemplateNotifyProviderDto(BaseModel):
"""
ProjectTemplateNotifyProviderDto
"""
organization_email_template: Dict[str, Any] = Field(..., alias="organizationEmailTemplate")
- notification_interval_in_minutes: Optional[conint(strict=True, le=1440, ge=0)] = Field(None, alias="notificationIntervalInMinutes")
+ notification_interval_in_minutes: Optional[Annotated[int, Field(strict=True, le=1440, ge=0)]] = Field(None, alias="notificationIntervalInMinutes")
__properties = ["organizationEmailTemplate", "notificationIntervalInMinutes"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +46,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateNotifyProviderDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +59,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateNotifyProviderDto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateNotifyProviderDto.parse_obj(obj)
+ return ProjectTemplateNotifyProviderDto.model_validate(obj)
- _obj = ProjectTemplateNotifyProviderDto.parse_obj({
+ _obj = ProjectTemplateNotifyProviderDto.model_validate({
"organization_email_template": obj.get("organizationEmailTemplate"),
"notification_interval_in_minutes": obj.get("notificationIntervalInMinutes")
})
diff --git a/phrasetms_client/models/project_template_reference.py b/phrasetms_client/models/project_template_reference.py
index 08f7f2a8..5b247513 100644
--- a/phrasetms_client/models/project_template_reference.py
+++ b/phrasetms_client/models/project_template_reference.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.cost_center_reference import CostCenterReference
@@ -33,7 +33,7 @@ class ProjectTemplateReference(BaseModel):
"""
template_name: Optional[StrictStr] = Field(None, alias="templateName")
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
id: Optional[StrictStr] = None
uid: Optional[StrictStr] = None
owner: Optional[UserReference] = None
@@ -45,14 +45,10 @@ class ProjectTemplateReference(BaseModel):
client: Optional[ClientReference] = None
__properties = ["templateName", "sourceLang", "targetLangs", "id", "uid", "owner", "domain", "subDomain", "costCenter", "businessUnit", "note", "client"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +61,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -96,9 +92,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateReference:
return None
if not isinstance(obj, dict):
- return ProjectTemplateReference.parse_obj(obj)
+ return ProjectTemplateReference.model_validate(obj)
- _obj = ProjectTemplateReference.parse_obj({
+ _obj = ProjectTemplateReference.model_validate({
"template_name": obj.get("templateName"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs"),
diff --git a/phrasetms_client/models/project_template_term_base_dto.py b/phrasetms_client/models/project_template_term_base_dto.py
index ab8aa785..36021727 100644
--- a/phrasetms_client/models/project_template_term_base_dto.py
+++ b/phrasetms_client/models/project_template_term_base_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.term_base_dto import TermBaseDto
from phrasetms_client.models.workflow_step_reference import WorkflowStepReference
@@ -35,14 +35,10 @@ class ProjectTemplateTermBaseDto(BaseModel):
quality_assurance: Optional[StrictBool] = Field(None, alias="qualityAssurance")
__properties = ["targetLocale", "workflowStep", "readMode", "writeMode", "termBase", "qualityAssurance"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateTermBaseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateTermBaseDto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateTermBaseDto.parse_obj(obj)
+ return ProjectTemplateTermBaseDto.model_validate(obj)
- _obj = ProjectTemplateTermBaseDto.parse_obj({
+ _obj = ProjectTemplateTermBaseDto.model_validate({
"target_locale": obj.get("targetLocale"),
"workflow_step": WorkflowStepReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"read_mode": obj.get("readMode"),
diff --git a/phrasetms_client/models/project_template_term_base_list_dto.py b/phrasetms_client/models/project_template_term_base_list_dto.py
index d3c9ba85..6822696e 100644
--- a/phrasetms_client/models/project_template_term_base_list_dto.py
+++ b/phrasetms_client/models/project_template_term_base_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_template_term_base_dto import ProjectTemplateTermBaseDto
class ProjectTemplateTermBaseListDto(BaseModel):
"""
ProjectTemplateTermBaseListDto
"""
- term_bases: Optional[conlist(ProjectTemplateTermBaseDto)] = Field(None, alias="termBases")
+ term_bases: Optional[List[ProjectTemplateTermBaseDto]] = Field(None, alias="termBases")
__properties = ["termBases"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateTermBaseListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateTermBaseListDto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateTermBaseListDto.parse_obj(obj)
+ return ProjectTemplateTermBaseListDto.model_validate(obj)
- _obj = ProjectTemplateTermBaseListDto.parse_obj({
+ _obj = ProjectTemplateTermBaseListDto.model_validate({
"term_bases": [ProjectTemplateTermBaseDto.from_dict(_item) for _item in obj.get("termBases")] if obj.get("termBases") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/project_template_trans_memory_dto_v3.py b/phrasetms_client/models/project_template_trans_memory_dto_v3.py
index 9dba4b7f..eeddff5f 100644
--- a/phrasetms_client/models/project_template_trans_memory_dto_v3.py
+++ b/phrasetms_client/models/project_template_trans_memory_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.trans_memory_dto_v3 import TransMemoryDtoV3
from phrasetms_client.models.workflow_step_reference_v3 import WorkflowStepReferenceV3
@@ -36,14 +36,10 @@ class ProjectTemplateTransMemoryDtoV3(BaseModel):
apply_penalty_to101_only: Optional[StrictBool] = Field(None, alias="applyPenaltyTo101Only")
__properties = ["targetLocale", "workflowStep", "readMode", "writeMode", "transMemory", "penalty", "applyPenaltyTo101Only"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateTransMemoryDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateTransMemoryDtoV3:
return None
if not isinstance(obj, dict):
- return ProjectTemplateTransMemoryDtoV3.parse_obj(obj)
+ return ProjectTemplateTransMemoryDtoV3.model_validate(obj)
- _obj = ProjectTemplateTransMemoryDtoV3.parse_obj({
+ _obj = ProjectTemplateTransMemoryDtoV3.model_validate({
"target_locale": obj.get("targetLocale"),
"workflow_step": WorkflowStepReferenceV3.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"read_mode": obj.get("readMode"),
diff --git a/phrasetms_client/models/project_template_trans_memory_list_dto_v3.py b/phrasetms_client/models/project_template_trans_memory_list_dto_v3.py
index 26b8c71f..f8893648 100644
--- a/phrasetms_client/models/project_template_trans_memory_list_dto_v3.py
+++ b/phrasetms_client/models/project_template_trans_memory_list_dto_v3.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_template_trans_memory_dto_v3 import ProjectTemplateTransMemoryDtoV3
class ProjectTemplateTransMemoryListDtoV3(BaseModel):
"""
ProjectTemplateTransMemoryListDtoV3
"""
- trans_memories: Optional[conlist(ProjectTemplateTransMemoryDtoV3)] = Field(None, alias="transMemories")
+ trans_memories: Optional[List[ProjectTemplateTransMemoryDtoV3]] = Field(None, alias="transMemories")
__properties = ["transMemories"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateTransMemoryListDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateTransMemoryListDtoV3:
return None
if not isinstance(obj, dict):
- return ProjectTemplateTransMemoryListDtoV3.parse_obj(obj)
+ return ProjectTemplateTransMemoryListDtoV3.model_validate(obj)
- _obj = ProjectTemplateTransMemoryListDtoV3.parse_obj({
+ _obj = ProjectTemplateTransMemoryListDtoV3.model_validate({
"trans_memories": [ProjectTemplateTransMemoryDtoV3.from_dict(_item) for _item in obj.get("transMemories")] if obj.get("transMemories") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/project_template_trans_memory_list_v2_dto.py b/phrasetms_client/models/project_template_trans_memory_list_v2_dto.py
index eee04b6e..ef8ba67d 100644
--- a/phrasetms_client/models/project_template_trans_memory_list_v2_dto.py
+++ b/phrasetms_client/models/project_template_trans_memory_list_v2_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_template_trans_memory_v2_dto import ProjectTemplateTransMemoryV2Dto
class ProjectTemplateTransMemoryListV2Dto(BaseModel):
"""
ProjectTemplateTransMemoryListV2Dto
"""
- trans_memories: Optional[conlist(ProjectTemplateTransMemoryV2Dto)] = Field(None, alias="transMemories")
+ trans_memories: Optional[List[ProjectTemplateTransMemoryV2Dto]] = Field(None, alias="transMemories")
__properties = ["transMemories"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateTransMemoryListV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateTransMemoryListV2Dto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateTransMemoryListV2Dto.parse_obj(obj)
+ return ProjectTemplateTransMemoryListV2Dto.model_validate(obj)
- _obj = ProjectTemplateTransMemoryListV2Dto.parse_obj({
+ _obj = ProjectTemplateTransMemoryListV2Dto.model_validate({
"trans_memories": [ProjectTemplateTransMemoryV2Dto.from_dict(_item) for _item in obj.get("transMemories")] if obj.get("transMemories") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/project_template_trans_memory_v2_dto.py b/phrasetms_client/models/project_template_trans_memory_v2_dto.py
index 5489e9c1..3d81bb79 100644
--- a/phrasetms_client/models/project_template_trans_memory_v2_dto.py
+++ b/phrasetms_client/models/project_template_trans_memory_v2_dto.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.trans_memory_dto_v2 import TransMemoryDtoV2
from phrasetms_client.models.workflow_step_reference_v2 import WorkflowStepReferenceV2
@@ -37,14 +37,10 @@ class ProjectTemplateTransMemoryV2Dto(BaseModel):
order: Optional[StrictInt] = None
__properties = ["targetLocale", "workflowStep", "readMode", "writeMode", "transMemory", "penalty", "applyPenaltyTo101Only", "order"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateTransMemoryV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateTransMemoryV2Dto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateTransMemoryV2Dto.parse_obj(obj)
+ return ProjectTemplateTransMemoryV2Dto.model_validate(obj)
- _obj = ProjectTemplateTransMemoryV2Dto.parse_obj({
+ _obj = ProjectTemplateTransMemoryV2Dto.model_validate({
"target_locale": obj.get("targetLocale"),
"workflow_step": WorkflowStepReferenceV2.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"read_mode": obj.get("readMode"),
diff --git a/phrasetms_client/models/project_template_workflow_settings_assigned_to_dto.py b/phrasetms_client/models/project_template_workflow_settings_assigned_to_dto.py
index 881a9023..2ce5effe 100644
--- a/phrasetms_client/models/project_template_workflow_settings_assigned_to_dto.py
+++ b/phrasetms_client/models/project_template_workflow_settings_assigned_to_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.provider_reference import ProviderReference
class ProjectTemplateWorkflowSettingsAssignedToDto(BaseModel):
@@ -27,17 +27,13 @@ class ProjectTemplateWorkflowSettingsAssignedToDto(BaseModel):
ProjectTemplateWorkflowSettingsAssignedToDto
"""
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
- providers: Optional[conlist(ProviderReference)] = None
+ providers: Optional[List[ProviderReference]] = None
__properties = ["targetLang", "providers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ProjectTemplateWorkflowSettingsAssignedToDt
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> ProjectTemplateWorkflowSettingsAssignedToDto:
return None
if not isinstance(obj, dict):
- return ProjectTemplateWorkflowSettingsAssignedToDto.parse_obj(obj)
+ return ProjectTemplateWorkflowSettingsAssignedToDto.model_validate(obj)
- _obj = ProjectTemplateWorkflowSettingsAssignedToDto.parse_obj({
+ _obj = ProjectTemplateWorkflowSettingsAssignedToDto.model_validate({
"target_lang": obj.get("targetLang"),
"providers": [ProviderReference.from_dict(_item) for _item in obj.get("providers")] if obj.get("providers") is not None else None
})
diff --git a/phrasetms_client/models/project_term_base_dto.py b/phrasetms_client/models/project_term_base_dto.py
index 3e212eaa..62041783 100644
--- a/phrasetms_client/models/project_term_base_dto.py
+++ b/phrasetms_client/models/project_term_base_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.term_base_dto import TermBaseDto
from phrasetms_client.models.workflow_step_reference import WorkflowStepReference
@@ -35,14 +35,10 @@ class ProjectTermBaseDto(BaseModel):
quality_assurance: Optional[StrictBool] = Field(None, alias="qualityAssurance")
__properties = ["targetLocale", "workflowStep", "readMode", "writeMode", "termBase", "qualityAssurance"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> ProjectTermBaseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> ProjectTermBaseDto:
return None
if not isinstance(obj, dict):
- return ProjectTermBaseDto.parse_obj(obj)
+ return ProjectTermBaseDto.model_validate(obj)
- _obj = ProjectTermBaseDto.parse_obj({
+ _obj = ProjectTermBaseDto.model_validate({
"target_locale": obj.get("targetLocale"),
"workflow_step": WorkflowStepReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"read_mode": obj.get("readMode"),
diff --git a/phrasetms_client/models/project_term_base_list_dto.py b/phrasetms_client/models/project_term_base_list_dto.py
index 3e37b025..ad4b2428 100644
--- a/phrasetms_client/models/project_term_base_list_dto.py
+++ b/phrasetms_client/models/project_term_base_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_term_base_dto import ProjectTermBaseDto
class ProjectTermBaseListDto(BaseModel):
"""
ProjectTermBaseListDto
"""
- term_bases: Optional[conlist(ProjectTermBaseDto)] = Field(None, alias="termBases")
+ term_bases: Optional[List[ProjectTermBaseDto]] = Field(None, alias="termBases")
__properties = ["termBases"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProjectTermBaseListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectTermBaseListDto:
return None
if not isinstance(obj, dict):
- return ProjectTermBaseListDto.parse_obj(obj)
+ return ProjectTermBaseListDto.model_validate(obj)
- _obj = ProjectTermBaseListDto.parse_obj({
+ _obj = ProjectTermBaseListDto.model_validate({
"term_bases": [ProjectTermBaseDto.from_dict(_item) for _item in obj.get("termBases")] if obj.get("termBases") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/project_term_base_reference.py b/phrasetms_client/models/project_term_base_reference.py
index f6ef2697..6cbb37cb 100644
--- a/phrasetms_client/models/project_term_base_reference.py
+++ b/phrasetms_client/models/project_term_base_reference.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class ProjectTermBaseReference(BaseModel):
"""
@@ -34,14 +34,10 @@ class ProjectTermBaseReference(BaseModel):
workflow_step: Optional[Dict[str, Any]] = Field(None, alias="workflowStep")
__properties = ["id", "termBase", "name", "writeMode", "targetLang", "readMode", "workflowStep"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> ProjectTermBaseReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> ProjectTermBaseReference:
return None
if not isinstance(obj, dict):
- return ProjectTermBaseReference.parse_obj(obj)
+ return ProjectTermBaseReference.model_validate(obj)
- _obj = ProjectTermBaseReference.parse_obj({
+ _obj = ProjectTermBaseReference.model_validate({
"id": obj.get("id"),
"term_base": obj.get("termBase"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/project_trans_memory_dto_v3.py b/phrasetms_client/models/project_trans_memory_dto_v3.py
index 1fb36803..805279ea 100644
--- a/phrasetms_client/models/project_trans_memory_dto_v3.py
+++ b/phrasetms_client/models/project_trans_memory_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.trans_memory_dto_v3 import TransMemoryDtoV3
from phrasetms_client.models.workflow_step_reference_v3 import WorkflowStepReferenceV3
@@ -37,14 +37,10 @@ class ProjectTransMemoryDtoV3(BaseModel):
order: Optional[StrictInt] = None
__properties = ["transMemory", "penalty", "applyPenaltyTo101Only", "targetLocale", "workflowStep", "readMode", "writeMode", "order"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> ProjectTransMemoryDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> ProjectTransMemoryDtoV3:
return None
if not isinstance(obj, dict):
- return ProjectTransMemoryDtoV3.parse_obj(obj)
+ return ProjectTransMemoryDtoV3.model_validate(obj)
- _obj = ProjectTransMemoryDtoV3.parse_obj({
+ _obj = ProjectTransMemoryDtoV3.model_validate({
"trans_memory": TransMemoryDtoV3.from_dict(obj.get("transMemory")) if obj.get("transMemory") is not None else None,
"penalty": obj.get("penalty"),
"apply_penalty_to101_only": obj.get("applyPenaltyTo101Only"),
diff --git a/phrasetms_client/models/project_trans_memory_list_dto_v3.py b/phrasetms_client/models/project_trans_memory_list_dto_v3.py
index fa57e815..a92837e9 100644
--- a/phrasetms_client/models/project_trans_memory_list_dto_v3.py
+++ b/phrasetms_client/models/project_trans_memory_list_dto_v3.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_trans_memory_dto_v3 import ProjectTransMemoryDtoV3
class ProjectTransMemoryListDtoV3(BaseModel):
"""
ProjectTransMemoryListDtoV3
"""
- trans_memories: Optional[conlist(ProjectTransMemoryDtoV3)] = Field(None, alias="transMemories")
+ trans_memories: Optional[List[ProjectTransMemoryDtoV3]] = Field(None, alias="transMemories")
__properties = ["transMemories"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProjectTransMemoryListDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectTransMemoryListDtoV3:
return None
if not isinstance(obj, dict):
- return ProjectTransMemoryListDtoV3.parse_obj(obj)
+ return ProjectTransMemoryListDtoV3.model_validate(obj)
- _obj = ProjectTransMemoryListDtoV3.parse_obj({
+ _obj = ProjectTransMemoryListDtoV3.model_validate({
"trans_memories": [ProjectTransMemoryDtoV3.from_dict(_item) for _item in obj.get("transMemories")] if obj.get("transMemories") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/project_translation_memory_reference.py b/phrasetms_client/models/project_translation_memory_reference.py
index 24f78068..39da3201 100644
--- a/phrasetms_client/models/project_translation_memory_reference.py
+++ b/phrasetms_client/models/project_translation_memory_reference.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
class ProjectTranslationMemoryReference(BaseModel):
"""
@@ -34,14 +34,10 @@ class ProjectTranslationMemoryReference(BaseModel):
read_mode: Optional[StrictBool] = Field(None, alias="readMode")
__properties = ["id", "transMem", "name", "workflowStep", "targetLang", "penalty", "readMode"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> ProjectTranslationMemoryReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> ProjectTranslationMemoryReference:
return None
if not isinstance(obj, dict):
- return ProjectTranslationMemoryReference.parse_obj(obj)
+ return ProjectTranslationMemoryReference.model_validate(obj)
- _obj = ProjectTranslationMemoryReference.parse_obj({
+ _obj = ProjectTranslationMemoryReference.model_validate({
"id": obj.get("id"),
"trans_mem": obj.get("transMem"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/project_workflow_step_dto.py b/phrasetms_client/models/project_workflow_step_dto.py
index c250e503..696132ec 100644
--- a/phrasetms_client/models/project_workflow_step_dto.py
+++ b/phrasetms_client/models/project_workflow_step_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class ProjectWorkflowStepDto(BaseModel):
"""
@@ -33,14 +33,10 @@ class ProjectWorkflowStepDto(BaseModel):
lqa_profile_uid: Optional[StrictStr] = Field(None, alias="lqaProfileUid")
__properties = ["id", "abbreviation", "name", "workflowLevel", "workflowStep", "lqaProfileUid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> ProjectWorkflowStepDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> ProjectWorkflowStepDto:
return None
if not isinstance(obj, dict):
- return ProjectWorkflowStepDto.parse_obj(obj)
+ return ProjectWorkflowStepDto.model_validate(obj)
- _obj = ProjectWorkflowStepDto.parse_obj({
+ _obj = ProjectWorkflowStepDto.model_validate({
"id": obj.get("id"),
"abbreviation": obj.get("abbreviation"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/project_workflow_step_dto_v2.py b/phrasetms_client/models/project_workflow_step_dto_v2.py
index abdf9d64..d66826d2 100644
--- a/phrasetms_client/models/project_workflow_step_dto_v2.py
+++ b/phrasetms_client/models/project_workflow_step_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.workflow_step_reference_v2 import WorkflowStepReferenceV2
class ProjectWorkflowStepDtoV2(BaseModel):
@@ -33,14 +33,10 @@ class ProjectWorkflowStepDtoV2(BaseModel):
workflow_step: Optional[WorkflowStepReferenceV2] = Field(None, alias="workflowStep")
__properties = ["id", "abbreviation", "name", "workflowLevel", "workflowStep"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> ProjectWorkflowStepDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectWorkflowStepDtoV2:
return None
if not isinstance(obj, dict):
- return ProjectWorkflowStepDtoV2.parse_obj(obj)
+ return ProjectWorkflowStepDtoV2.model_validate(obj)
- _obj = ProjectWorkflowStepDtoV2.parse_obj({
+ _obj = ProjectWorkflowStepDtoV2.model_validate({
"id": obj.get("id"),
"abbreviation": obj.get("abbreviation"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/project_workflow_step_list_dto_v2.py b/phrasetms_client/models/project_workflow_step_list_dto_v2.py
index 2ec80738..58fd47af 100644
--- a/phrasetms_client/models/project_workflow_step_list_dto_v2.py
+++ b/phrasetms_client/models/project_workflow_step_list_dto_v2.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_workflow_step_dto_v2 import ProjectWorkflowStepDtoV2
class ProjectWorkflowStepListDtoV2(BaseModel):
"""
ProjectWorkflowStepListDtoV2
"""
- project_workflow_steps: Optional[conlist(ProjectWorkflowStepDtoV2)] = Field(None, alias="projectWorkflowSteps")
+ project_workflow_steps: Optional[List[ProjectWorkflowStepDtoV2]] = Field(None, alias="projectWorkflowSteps")
__properties = ["projectWorkflowSteps"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProjectWorkflowStepListDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ProjectWorkflowStepListDtoV2:
return None
if not isinstance(obj, dict):
- return ProjectWorkflowStepListDtoV2.parse_obj(obj)
+ return ProjectWorkflowStepListDtoV2.model_validate(obj)
- _obj = ProjectWorkflowStepListDtoV2.parse_obj({
+ _obj = ProjectWorkflowStepListDtoV2.model_validate({
"project_workflow_steps": [ProjectWorkflowStepDtoV2.from_dict(_item) for _item in obj.get("projectWorkflowSteps")] if obj.get("projectWorkflowSteps") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/project_workflow_step_reference.py b/phrasetms_client/models/project_workflow_step_reference.py
index f24c9e8a..0d094568 100644
--- a/phrasetms_client/models/project_workflow_step_reference.py
+++ b/phrasetms_client/models/project_workflow_step_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class ProjectWorkflowStepReference(BaseModel):
"""
@@ -31,14 +31,10 @@ class ProjectWorkflowStepReference(BaseModel):
workflow_level: Optional[StrictInt] = Field(None, alias="workflowLevel")
__properties = ["name", "id", "order", "workflowLevel"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> ProjectWorkflowStepReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> ProjectWorkflowStepReference:
return None
if not isinstance(obj, dict):
- return ProjectWorkflowStepReference.parse_obj(obj)
+ return ProjectWorkflowStepReference.model_validate(obj)
- _obj = ProjectWorkflowStepReference.parse_obj({
+ _obj = ProjectWorkflowStepReference.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"order": obj.get("order"),
diff --git a/phrasetms_client/models/projectmanager.py b/phrasetms_client/models/projectmanager.py
index 312dee30..02ea8497 100644
--- a/phrasetms_client/models/projectmanager.py
+++ b/phrasetms_client/models/projectmanager.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.abstract_user_create_dto import AbstractUserCreateDto
from phrasetms_client.models.uid_reference import UidReference
@@ -27,32 +27,32 @@ class PROJECTMANAGER(AbstractUserCreateDto):
"""
PROJECTMANAGER
"""
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(UidReference)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(UidReference)] = None
- domains: Optional[conlist(UidReference)] = None
- sub_domains: Optional[conlist(UidReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[UidReference]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[UidReference]] = None
+ domains: Optional[List[UidReference]] = None
+ sub_domains: Optional[List[UidReference]] = Field(None, alias="subDomains")
project_create: Optional[StrictBool] = Field(None, alias="projectCreate", description="Enable project creation. Default: true")
project_view_other: Optional[StrictBool] = Field(None, alias="projectViewOther", description="View projects created by other users. Default: true")
project_edit_other: Optional[StrictBool] = Field(None, alias="projectEditOther", description="Modify projects created by other users. Default: true")
project_delete_other: Optional[StrictBool] = Field(None, alias="projectDeleteOther", description="Delete projects created by other users. Default: true")
- project_clients: Optional[conlist(UidReference)] = Field(None, alias="projectClients", description="Access projects of a selected clients only")
- project_business_units: Optional[conlist(UidReference)] = Field(None, alias="projectBusinessUnits", description="Access projects of selected business units only")
+ project_clients: Optional[List[UidReference]] = Field(None, alias="projectClients", description="Access projects of a selected clients only")
+ project_business_units: Optional[List[UidReference]] = Field(None, alias="projectBusinessUnits", description="Access projects of selected business units only")
project_template_create: Optional[StrictBool] = Field(None, alias="projectTemplateCreate", description="Enable project templates creation. Default: true")
project_template_view_other: Optional[StrictBool] = Field(None, alias="projectTemplateViewOther", description="View project templates created by other users. Default: true")
project_template_edit_other: Optional[StrictBool] = Field(None, alias="projectTemplateEditOther", description="Modify project templates created by other users. Default: true")
project_template_delete_other: Optional[StrictBool] = Field(None, alias="projectTemplateDeleteOther", description="Delete project templates created by other users. Default: true")
- project_template_clients: Optional[conlist(UidReference)] = Field(None, alias="projectTemplateClients", description="Access project templates of a selected clients only")
- project_template_business_units: Optional[conlist(UidReference)] = Field(None, alias="projectTemplateBusinessUnits", description="Access project templates of selected business units only")
+ project_template_clients: Optional[List[UidReference]] = Field(None, alias="projectTemplateClients", description="Access project templates of a selected clients only")
+ project_template_business_units: Optional[List[UidReference]] = Field(None, alias="projectTemplateBusinessUnits", description="Access project templates of selected business units only")
trans_memory_create: Optional[StrictBool] = Field(None, alias="transMemoryCreate", description="Enable TMs creation. Default: true")
trans_memory_view_other: Optional[StrictBool] = Field(None, alias="transMemoryViewOther", description="View TMs created by other users. Default: true")
trans_memory_edit_other: Optional[StrictBool] = Field(None, alias="transMemoryEditOther", description="Modify TMs created by other users. Default: true")
trans_memory_delete_other: Optional[StrictBool] = Field(None, alias="transMemoryDeleteOther", description="Delete TMs created by other users. Default: true")
trans_memory_export_other: Optional[StrictBool] = Field(None, alias="transMemoryExportOther", description="Export TMs created by other users. Default: true")
trans_memory_import_other: Optional[StrictBool] = Field(None, alias="transMemoryImportOther", description="Import into TMs created by other users. Default: true")
- trans_memory_clients: Optional[conlist(UidReference)] = Field(None, alias="transMemoryClients", description="Access TMs of a selected clients only")
- trans_memory_business_units: Optional[conlist(UidReference)] = Field(None, alias="transMemoryBusinessUnits", description="Access TMs of selected business units only")
+ trans_memory_clients: Optional[List[UidReference]] = Field(None, alias="transMemoryClients", description="Access TMs of a selected clients only")
+ trans_memory_business_units: Optional[List[UidReference]] = Field(None, alias="transMemoryBusinessUnits", description="Access TMs of selected business units only")
term_base_create: Optional[StrictBool] = Field(None, alias="termBaseCreate", description="Enable TBs creation. Default: true")
term_base_view_other: Optional[StrictBool] = Field(None, alias="termBaseViewOther", description="View TBs created by other users. Default: true")
term_base_edit_other: Optional[StrictBool] = Field(None, alias="termBaseEditOther", description="Modify TBs created by other users. Default: true")
@@ -60,8 +60,8 @@ class PROJECTMANAGER(AbstractUserCreateDto):
term_base_export_other: Optional[StrictBool] = Field(None, alias="termBaseExportOther", description="Export TBs created by other users. Default: true")
term_base_import_other: Optional[StrictBool] = Field(None, alias="termBaseImportOther", description="Import into TBs created by other users. Default: true")
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther", description="Approve terms in TBs created by other users. Default: true")
- term_base_clients: Optional[conlist(UidReference)] = Field(None, alias="termBaseClients", description="Access TBs of a selected clients only")
- term_base_business_units: Optional[conlist(UidReference)] = Field(None, alias="termBaseBusinessUnits", description="Access TBs of selected business units only")
+ term_base_clients: Optional[List[UidReference]] = Field(None, alias="termBaseClients", description="Access TBs of a selected clients only")
+ term_base_business_units: Optional[List[UidReference]] = Field(None, alias="termBaseBusinessUnits", description="Access TBs of selected business units only")
user_create: Optional[StrictBool] = Field(None, alias="userCreate", description="Enable users creation. Default: true")
user_view_other: Optional[StrictBool] = Field(None, alias="userViewOther", description="View users created by other users. Default: true")
user_edit_other: Optional[StrictBool] = Field(None, alias="userEditOther", description="Modify users created by other users. Default: true")
@@ -78,7 +78,8 @@ class PROJECTMANAGER(AbstractUserCreateDto):
setup_server: Optional[StrictBool] = Field(None, alias="setupServer", description="Modify setup's server settings. Default: true")
__properties = ["userName", "firstName", "lastName", "email", "password", "role", "timezone", "receiveNewsletter", "note", "active", "sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "projectCreate", "projectViewOther", "projectEditOther", "projectDeleteOther", "projectClients", "projectBusinessUnits", "projectTemplateCreate", "projectTemplateViewOther", "projectTemplateEditOther", "projectTemplateDeleteOther", "projectTemplateClients", "projectTemplateBusinessUnits", "transMemoryCreate", "transMemoryViewOther", "transMemoryEditOther", "transMemoryDeleteOther", "transMemoryExportOther", "transMemoryImportOther", "transMemoryClients", "transMemoryBusinessUnits", "termBaseCreate", "termBaseViewOther", "termBaseEditOther", "termBaseDeleteOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther", "termBaseClients", "termBaseBusinessUnits", "userCreate", "userViewOther", "userEditOther", "userDeleteOther", "clientDomainSubDomainCreate", "clientDomainSubDomainViewOther", "clientDomainSubDomainEditOther", "clientDomainSubDomainDeleteOther", "vendorCreate", "vendorViewOther", "vendorEditOther", "vendorDeleteOther", "dashboardSetting", "setupServer"]
- @validator('dashboard_setting')
+ @field_validator('dashboard_setting')
+ @classmethod
def dashboard_setting_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -88,14 +89,10 @@ def dashboard_setting_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ALL_DATA', 'OWN_DATA', 'NO_DASHBOARD')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -108,7 +105,7 @@ def from_json(cls, json_str: str) -> PROJECTMANAGER:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -205,9 +202,9 @@ def from_dict(cls, obj: dict) -> PROJECTMANAGER:
return None
if not isinstance(obj, dict):
- return PROJECTMANAGER.parse_obj(obj)
+ return PROJECTMANAGER.model_validate(obj)
- _obj = PROJECTMANAGER.parse_obj({
+ _obj = PROJECTMANAGER.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/projectmanageredit.py b/phrasetms_client/models/projectmanageredit.py
index 9e9fc8f6..9dcfc657 100644
--- a/phrasetms_client/models/projectmanageredit.py
+++ b/phrasetms_client/models/projectmanageredit.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.abstract_user_edit_dto import AbstractUserEditDto
from phrasetms_client.models.uid_reference import UidReference
@@ -27,32 +27,32 @@ class PROJECTMANAGEREDIT(AbstractUserEditDto):
"""
PROJECTMANAGEREDIT
"""
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(UidReference)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(UidReference)] = None
- domains: Optional[conlist(UidReference)] = None
- sub_domains: Optional[conlist(UidReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[UidReference]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[UidReference]] = None
+ domains: Optional[List[UidReference]] = None
+ sub_domains: Optional[List[UidReference]] = Field(None, alias="subDomains")
project_create: Optional[StrictBool] = Field(None, alias="projectCreate", description="Enable project creation. Default: true")
project_view_other: Optional[StrictBool] = Field(None, alias="projectViewOther", description="View projects created by other users. Default: true")
project_edit_other: Optional[StrictBool] = Field(None, alias="projectEditOther", description="Modify projects created by other users. Default: true")
project_delete_other: Optional[StrictBool] = Field(None, alias="projectDeleteOther", description="Delete projects created by other users. Default: true")
- project_clients: Optional[conlist(UidReference)] = Field(None, alias="projectClients", description="Access projects of a selected clients only")
- project_business_units: Optional[conlist(UidReference)] = Field(None, alias="projectBusinessUnits", description="Access projects of selected business units only")
+ project_clients: Optional[List[UidReference]] = Field(None, alias="projectClients", description="Access projects of a selected clients only")
+ project_business_units: Optional[List[UidReference]] = Field(None, alias="projectBusinessUnits", description="Access projects of selected business units only")
project_template_create: Optional[StrictBool] = Field(None, alias="projectTemplateCreate", description="Enable project templates creation. Default: true")
project_template_view_other: Optional[StrictBool] = Field(None, alias="projectTemplateViewOther", description="View project templates created by other users. Default: true")
project_template_edit_other: Optional[StrictBool] = Field(None, alias="projectTemplateEditOther", description="Modify project templates created by other users. Default: true")
project_template_delete_other: Optional[StrictBool] = Field(None, alias="projectTemplateDeleteOther", description="Delete project templates created by other users. Default: true")
- project_template_clients: Optional[conlist(UidReference)] = Field(None, alias="projectTemplateClients", description="Access project templates of a selected clients only")
- project_template_business_units: Optional[conlist(UidReference)] = Field(None, alias="projectTemplateBusinessUnits", description="Access project templates of selected business units only")
+ project_template_clients: Optional[List[UidReference]] = Field(None, alias="projectTemplateClients", description="Access project templates of a selected clients only")
+ project_template_business_units: Optional[List[UidReference]] = Field(None, alias="projectTemplateBusinessUnits", description="Access project templates of selected business units only")
trans_memory_create: Optional[StrictBool] = Field(None, alias="transMemoryCreate", description="Enable TMs creation. Default: true")
trans_memory_view_other: Optional[StrictBool] = Field(None, alias="transMemoryViewOther", description="View TMs created by other users. Default: true")
trans_memory_edit_other: Optional[StrictBool] = Field(None, alias="transMemoryEditOther", description="Modify TMs created by other users. Default: true")
trans_memory_delete_other: Optional[StrictBool] = Field(None, alias="transMemoryDeleteOther", description="Delete TMs created by other users. Default: true")
trans_memory_export_other: Optional[StrictBool] = Field(None, alias="transMemoryExportOther", description="Export TMs created by other users. Default: true")
trans_memory_import_other: Optional[StrictBool] = Field(None, alias="transMemoryImportOther", description="Import into TMs created by other users. Default: true")
- trans_memory_clients: Optional[conlist(UidReference)] = Field(None, alias="transMemoryClients", description="Access TMs of a selected clients only")
- trans_memory_business_units: Optional[conlist(UidReference)] = Field(None, alias="transMemoryBusinessUnits", description="Access TMs of selected business units only")
+ trans_memory_clients: Optional[List[UidReference]] = Field(None, alias="transMemoryClients", description="Access TMs of a selected clients only")
+ trans_memory_business_units: Optional[List[UidReference]] = Field(None, alias="transMemoryBusinessUnits", description="Access TMs of selected business units only")
term_base_create: Optional[StrictBool] = Field(None, alias="termBaseCreate", description="Enable TBs creation. Default: true")
term_base_view_other: Optional[StrictBool] = Field(None, alias="termBaseViewOther", description="View TBs created by other users. Default: true")
term_base_edit_other: Optional[StrictBool] = Field(None, alias="termBaseEditOther", description="Modify TBs created by other users. Default: true")
@@ -60,8 +60,8 @@ class PROJECTMANAGEREDIT(AbstractUserEditDto):
term_base_export_other: Optional[StrictBool] = Field(None, alias="termBaseExportOther", description="Export TBs created by other users. Default: true")
term_base_import_other: Optional[StrictBool] = Field(None, alias="termBaseImportOther", description="Import into TBs created by other users. Default: true")
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther", description="Approve terms in TBs created by other users. Default: true")
- term_base_clients: Optional[conlist(UidReference)] = Field(None, alias="termBaseClients", description="Access TBs of a selected clients only")
- term_base_business_units: Optional[conlist(UidReference)] = Field(None, alias="termBaseBusinessUnits", description="Access TBs of selected business units only")
+ term_base_clients: Optional[List[UidReference]] = Field(None, alias="termBaseClients", description="Access TBs of a selected clients only")
+ term_base_business_units: Optional[List[UidReference]] = Field(None, alias="termBaseBusinessUnits", description="Access TBs of selected business units only")
user_create: Optional[StrictBool] = Field(None, alias="userCreate", description="Enable users creation. Default: true")
user_view_other: Optional[StrictBool] = Field(None, alias="userViewOther", description="View users created by other users. Default: true")
user_edit_other: Optional[StrictBool] = Field(None, alias="userEditOther", description="Modify users created by other users. Default: true")
@@ -78,7 +78,8 @@ class PROJECTMANAGEREDIT(AbstractUserEditDto):
setup_server: Optional[StrictBool] = Field(None, alias="setupServer", description="Modify setup's server settings. Default: true")
__properties = ["userName", "firstName", "lastName", "email", "role", "timezone", "receiveNewsletter", "note", "active", "sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "projectCreate", "projectViewOther", "projectEditOther", "projectDeleteOther", "projectClients", "projectBusinessUnits", "projectTemplateCreate", "projectTemplateViewOther", "projectTemplateEditOther", "projectTemplateDeleteOther", "projectTemplateClients", "projectTemplateBusinessUnits", "transMemoryCreate", "transMemoryViewOther", "transMemoryEditOther", "transMemoryDeleteOther", "transMemoryExportOther", "transMemoryImportOther", "transMemoryClients", "transMemoryBusinessUnits", "termBaseCreate", "termBaseViewOther", "termBaseEditOther", "termBaseDeleteOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther", "termBaseClients", "termBaseBusinessUnits", "userCreate", "userViewOther", "userEditOther", "userDeleteOther", "clientDomainSubDomainCreate", "clientDomainSubDomainViewOther", "clientDomainSubDomainEditOther", "clientDomainSubDomainDeleteOther", "vendorCreate", "vendorViewOther", "vendorEditOther", "vendorDeleteOther", "dashboardSetting", "setupServer"]
- @validator('dashboard_setting')
+ @field_validator('dashboard_setting')
+ @classmethod
def dashboard_setting_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -88,14 +89,10 @@ def dashboard_setting_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ALL_DATA', 'OWN_DATA', 'NO_DASHBOARD')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -108,7 +105,7 @@ def from_json(cls, json_str: str) -> PROJECTMANAGEREDIT:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -205,9 +202,9 @@ def from_dict(cls, obj: dict) -> PROJECTMANAGEREDIT:
return None
if not isinstance(obj, dict):
- return PROJECTMANAGEREDIT.parse_obj(obj)
+ return PROJECTMANAGEREDIT.model_validate(obj)
- _obj = PROJECTMANAGEREDIT.parse_obj({
+ _obj = PROJECTMANAGEREDIT.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/projectmanageredit_all_of.py b/phrasetms_client/models/projectmanageredit_all_of.py
index b6b59e82..28ac8250 100644
--- a/phrasetms_client/models/projectmanageredit_all_of.py
+++ b/phrasetms_client/models/projectmanageredit_all_of.py
@@ -19,39 +19,39 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.uid_reference import UidReference
class PROJECTMANAGEREDITAllOf(BaseModel):
"""
PROJECTMANAGEREDITAllOf
"""
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(UidReference)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(UidReference)] = None
- domains: Optional[conlist(UidReference)] = None
- sub_domains: Optional[conlist(UidReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[UidReference]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[UidReference]] = None
+ domains: Optional[List[UidReference]] = None
+ sub_domains: Optional[List[UidReference]] = Field(None, alias="subDomains")
project_create: Optional[StrictBool] = Field(None, alias="projectCreate", description="Enable project creation. Default: true")
project_view_other: Optional[StrictBool] = Field(None, alias="projectViewOther", description="View projects created by other users. Default: true")
project_edit_other: Optional[StrictBool] = Field(None, alias="projectEditOther", description="Modify projects created by other users. Default: true")
project_delete_other: Optional[StrictBool] = Field(None, alias="projectDeleteOther", description="Delete projects created by other users. Default: true")
- project_clients: Optional[conlist(UidReference)] = Field(None, alias="projectClients", description="Access projects of a selected clients only")
- project_business_units: Optional[conlist(UidReference)] = Field(None, alias="projectBusinessUnits", description="Access projects of selected business units only")
+ project_clients: Optional[List[UidReference]] = Field(None, alias="projectClients", description="Access projects of a selected clients only")
+ project_business_units: Optional[List[UidReference]] = Field(None, alias="projectBusinessUnits", description="Access projects of selected business units only")
project_template_create: Optional[StrictBool] = Field(None, alias="projectTemplateCreate", description="Enable project templates creation. Default: true")
project_template_view_other: Optional[StrictBool] = Field(None, alias="projectTemplateViewOther", description="View project templates created by other users. Default: true")
project_template_edit_other: Optional[StrictBool] = Field(None, alias="projectTemplateEditOther", description="Modify project templates created by other users. Default: true")
project_template_delete_other: Optional[StrictBool] = Field(None, alias="projectTemplateDeleteOther", description="Delete project templates created by other users. Default: true")
- project_template_clients: Optional[conlist(UidReference)] = Field(None, alias="projectTemplateClients", description="Access project templates of a selected clients only")
- project_template_business_units: Optional[conlist(UidReference)] = Field(None, alias="projectTemplateBusinessUnits", description="Access project templates of selected business units only")
+ project_template_clients: Optional[List[UidReference]] = Field(None, alias="projectTemplateClients", description="Access project templates of a selected clients only")
+ project_template_business_units: Optional[List[UidReference]] = Field(None, alias="projectTemplateBusinessUnits", description="Access project templates of selected business units only")
trans_memory_create: Optional[StrictBool] = Field(None, alias="transMemoryCreate", description="Enable TMs creation. Default: true")
trans_memory_view_other: Optional[StrictBool] = Field(None, alias="transMemoryViewOther", description="View TMs created by other users. Default: true")
trans_memory_edit_other: Optional[StrictBool] = Field(None, alias="transMemoryEditOther", description="Modify TMs created by other users. Default: true")
trans_memory_delete_other: Optional[StrictBool] = Field(None, alias="transMemoryDeleteOther", description="Delete TMs created by other users. Default: true")
trans_memory_export_other: Optional[StrictBool] = Field(None, alias="transMemoryExportOther", description="Export TMs created by other users. Default: true")
trans_memory_import_other: Optional[StrictBool] = Field(None, alias="transMemoryImportOther", description="Import into TMs created by other users. Default: true")
- trans_memory_clients: Optional[conlist(UidReference)] = Field(None, alias="transMemoryClients", description="Access TMs of a selected clients only")
- trans_memory_business_units: Optional[conlist(UidReference)] = Field(None, alias="transMemoryBusinessUnits", description="Access TMs of selected business units only")
+ trans_memory_clients: Optional[List[UidReference]] = Field(None, alias="transMemoryClients", description="Access TMs of a selected clients only")
+ trans_memory_business_units: Optional[List[UidReference]] = Field(None, alias="transMemoryBusinessUnits", description="Access TMs of selected business units only")
term_base_create: Optional[StrictBool] = Field(None, alias="termBaseCreate", description="Enable TBs creation. Default: true")
term_base_view_other: Optional[StrictBool] = Field(None, alias="termBaseViewOther", description="View TBs created by other users. Default: true")
term_base_edit_other: Optional[StrictBool] = Field(None, alias="termBaseEditOther", description="Modify TBs created by other users. Default: true")
@@ -59,8 +59,8 @@ class PROJECTMANAGEREDITAllOf(BaseModel):
term_base_export_other: Optional[StrictBool] = Field(None, alias="termBaseExportOther", description="Export TBs created by other users. Default: true")
term_base_import_other: Optional[StrictBool] = Field(None, alias="termBaseImportOther", description="Import into TBs created by other users. Default: true")
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther", description="Approve terms in TBs created by other users. Default: true")
- term_base_clients: Optional[conlist(UidReference)] = Field(None, alias="termBaseClients", description="Access TBs of a selected clients only")
- term_base_business_units: Optional[conlist(UidReference)] = Field(None, alias="termBaseBusinessUnits", description="Access TBs of selected business units only")
+ term_base_clients: Optional[List[UidReference]] = Field(None, alias="termBaseClients", description="Access TBs of a selected clients only")
+ term_base_business_units: Optional[List[UidReference]] = Field(None, alias="termBaseBusinessUnits", description="Access TBs of selected business units only")
user_create: Optional[StrictBool] = Field(None, alias="userCreate", description="Enable users creation. Default: true")
user_view_other: Optional[StrictBool] = Field(None, alias="userViewOther", description="View users created by other users. Default: true")
user_edit_other: Optional[StrictBool] = Field(None, alias="userEditOther", description="Modify users created by other users. Default: true")
@@ -77,7 +77,8 @@ class PROJECTMANAGEREDITAllOf(BaseModel):
setup_server: Optional[StrictBool] = Field(None, alias="setupServer", description="Modify setup's server settings. Default: true")
__properties = ["sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "projectCreate", "projectViewOther", "projectEditOther", "projectDeleteOther", "projectClients", "projectBusinessUnits", "projectTemplateCreate", "projectTemplateViewOther", "projectTemplateEditOther", "projectTemplateDeleteOther", "projectTemplateClients", "projectTemplateBusinessUnits", "transMemoryCreate", "transMemoryViewOther", "transMemoryEditOther", "transMemoryDeleteOther", "transMemoryExportOther", "transMemoryImportOther", "transMemoryClients", "transMemoryBusinessUnits", "termBaseCreate", "termBaseViewOther", "termBaseEditOther", "termBaseDeleteOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther", "termBaseClients", "termBaseBusinessUnits", "userCreate", "userViewOther", "userEditOther", "userDeleteOther", "clientDomainSubDomainCreate", "clientDomainSubDomainViewOther", "clientDomainSubDomainEditOther", "clientDomainSubDomainDeleteOther", "vendorCreate", "vendorViewOther", "vendorEditOther", "vendorDeleteOther", "dashboardSetting", "setupServer"]
- @validator('dashboard_setting')
+ @field_validator('dashboard_setting')
+ @classmethod
def dashboard_setting_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -87,14 +88,10 @@ def dashboard_setting_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ALL_DATA', 'OWN_DATA', 'NO_DASHBOARD')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -107,7 +104,7 @@ def from_json(cls, json_str: str) -> PROJECTMANAGEREDITAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -204,9 +201,9 @@ def from_dict(cls, obj: dict) -> PROJECTMANAGEREDITAllOf:
return None
if not isinstance(obj, dict):
- return PROJECTMANAGEREDITAllOf.parse_obj(obj)
+ return PROJECTMANAGEREDITAllOf.model_validate(obj)
- _obj = PROJECTMANAGEREDITAllOf.parse_obj({
+ _obj = PROJECTMANAGEREDITAllOf.model_validate({
"source_locales": obj.get("sourceLocales"),
"target_locales": obj.get("targetLocales"),
"workflow_steps": [UidReference.from_dict(_item) for _item in obj.get("workflowSteps")] if obj.get("workflowSteps") is not None else None,
diff --git a/phrasetms_client/models/projectmanagerresponse.py b/phrasetms_client/models/projectmanagerresponse.py
index 608735a5..7fd5b0bd 100644
--- a/phrasetms_client/models/projectmanagerresponse.py
+++ b/phrasetms_client/models/projectmanagerresponse.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -32,32 +32,32 @@ class PROJECTMANAGERRESPONSE(UserDetailsDtoV3):
"""
PROJECTMANAGERRESPONSE
"""
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(WorkflowStepReferenceV3)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(ClientReference)] = None
- domains: Optional[conlist(DomainReference)] = None
- sub_domains: Optional[conlist(SubDomainReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[WorkflowStepReferenceV3]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[ClientReference]] = None
+ domains: Optional[List[DomainReference]] = None
+ sub_domains: Optional[List[SubDomainReference]] = Field(None, alias="subDomains")
project_create: Optional[StrictBool] = Field(None, alias="projectCreate")
project_view_other: Optional[StrictBool] = Field(None, alias="projectViewOther")
project_edit_other: Optional[StrictBool] = Field(None, alias="projectEditOther")
project_delete_other: Optional[StrictBool] = Field(None, alias="projectDeleteOther")
- project_clients: Optional[conlist(ClientReference)] = Field(None, alias="projectClients")
- project_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="projectBusinessUnits")
+ project_clients: Optional[List[ClientReference]] = Field(None, alias="projectClients")
+ project_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="projectBusinessUnits")
project_template_create: Optional[StrictBool] = Field(None, alias="projectTemplateCreate")
project_template_view_other: Optional[StrictBool] = Field(None, alias="projectTemplateViewOther")
project_template_edit_other: Optional[StrictBool] = Field(None, alias="projectTemplateEditOther")
project_template_delete_other: Optional[StrictBool] = Field(None, alias="projectTemplateDeleteOther")
- project_template_clients: Optional[conlist(ClientReference)] = Field(None, alias="projectTemplateClients")
- project_template_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="projectTemplateBusinessUnits")
+ project_template_clients: Optional[List[ClientReference]] = Field(None, alias="projectTemplateClients")
+ project_template_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="projectTemplateBusinessUnits")
trans_memory_create: Optional[StrictBool] = Field(None, alias="transMemoryCreate")
trans_memory_view_other: Optional[StrictBool] = Field(None, alias="transMemoryViewOther")
trans_memory_edit_other: Optional[StrictBool] = Field(None, alias="transMemoryEditOther")
trans_memory_delete_other: Optional[StrictBool] = Field(None, alias="transMemoryDeleteOther")
trans_memory_export_other: Optional[StrictBool] = Field(None, alias="transMemoryExportOther")
trans_memory_import_other: Optional[StrictBool] = Field(None, alias="transMemoryImportOther")
- trans_memory_clients: Optional[conlist(ClientReference)] = Field(None, alias="transMemoryClients")
- trans_memory_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="transMemoryBusinessUnits")
+ trans_memory_clients: Optional[List[ClientReference]] = Field(None, alias="transMemoryClients")
+ trans_memory_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="transMemoryBusinessUnits")
term_base_create: Optional[StrictBool] = Field(None, alias="termBaseCreate")
term_base_view_other: Optional[StrictBool] = Field(None, alias="termBaseViewOther")
term_base_edit_other: Optional[StrictBool] = Field(None, alias="termBaseEditOther")
@@ -65,8 +65,8 @@ class PROJECTMANAGERRESPONSE(UserDetailsDtoV3):
term_base_export_other: Optional[StrictBool] = Field(None, alias="termBaseExportOther")
term_base_import_other: Optional[StrictBool] = Field(None, alias="termBaseImportOther")
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther")
- term_base_clients: Optional[conlist(ClientReference)] = Field(None, alias="termBaseClients")
- term_base_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="termBaseBusinessUnits")
+ term_base_clients: Optional[List[ClientReference]] = Field(None, alias="termBaseClients")
+ term_base_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="termBaseBusinessUnits")
user_create: Optional[StrictBool] = Field(None, alias="userCreate")
user_view_other: Optional[StrictBool] = Field(None, alias="userViewOther")
user_edit_other: Optional[StrictBool] = Field(None, alias="userEditOther")
@@ -83,14 +83,10 @@ class PROJECTMANAGERRESPONSE(UserDetailsDtoV3):
setup_server: Optional[StrictBool] = Field(None, alias="setupServer")
__properties = ["uid", "userName", "firstName", "lastName", "email", "dateCreated", "dateDeleted", "createdBy", "role", "timezone", "note", "receiveNewsletter", "active", "pendingEmailChange", "sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "projectCreate", "projectViewOther", "projectEditOther", "projectDeleteOther", "projectClients", "projectBusinessUnits", "projectTemplateCreate", "projectTemplateViewOther", "projectTemplateEditOther", "projectTemplateDeleteOther", "projectTemplateClients", "projectTemplateBusinessUnits", "transMemoryCreate", "transMemoryViewOther", "transMemoryEditOther", "transMemoryDeleteOther", "transMemoryExportOther", "transMemoryImportOther", "transMemoryClients", "transMemoryBusinessUnits", "termBaseCreate", "termBaseViewOther", "termBaseEditOther", "termBaseDeleteOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther", "termBaseClients", "termBaseBusinessUnits", "userCreate", "userViewOther", "userEditOther", "userDeleteOther", "clientDomainSubDomainCreate", "clientDomainSubDomainViewOther", "clientDomainSubDomainEditOther", "clientDomainSubDomainDeleteOther", "vendorCreate", "vendorViewOther", "vendorEditOther", "vendorDeleteOther", "dashboardSetting", "setupServer"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -103,7 +99,7 @@ def from_json(cls, json_str: str) -> PROJECTMANAGERRESPONSE:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -203,9 +199,9 @@ def from_dict(cls, obj: dict) -> PROJECTMANAGERRESPONSE:
return None
if not isinstance(obj, dict):
- return PROJECTMANAGERRESPONSE.parse_obj(obj)
+ return PROJECTMANAGERRESPONSE.model_validate(obj)
- _obj = PROJECTMANAGERRESPONSE.parse_obj({
+ _obj = PROJECTMANAGERRESPONSE.model_validate({
"uid": obj.get("uid"),
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
diff --git a/phrasetms_client/models/projectmanagerresponse_all_of.py b/phrasetms_client/models/projectmanagerresponse_all_of.py
index 84de5ea5..f6b3e2e6 100644
--- a/phrasetms_client/models/projectmanagerresponse_all_of.py
+++ b/phrasetms_client/models/projectmanagerresponse_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -30,32 +30,32 @@ class PROJECTMANAGERRESPONSEAllOf(BaseModel):
"""
PROJECTMANAGERRESPONSEAllOf
"""
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- workflow_steps: Optional[conlist(WorkflowStepReferenceV3)] = Field(None, alias="workflowSteps")
- clients: Optional[conlist(ClientReference)] = None
- domains: Optional[conlist(DomainReference)] = None
- sub_domains: Optional[conlist(SubDomainReference)] = Field(None, alias="subDomains")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ workflow_steps: Optional[List[WorkflowStepReferenceV3]] = Field(None, alias="workflowSteps")
+ clients: Optional[List[ClientReference]] = None
+ domains: Optional[List[DomainReference]] = None
+ sub_domains: Optional[List[SubDomainReference]] = Field(None, alias="subDomains")
project_create: Optional[StrictBool] = Field(None, alias="projectCreate")
project_view_other: Optional[StrictBool] = Field(None, alias="projectViewOther")
project_edit_other: Optional[StrictBool] = Field(None, alias="projectEditOther")
project_delete_other: Optional[StrictBool] = Field(None, alias="projectDeleteOther")
- project_clients: Optional[conlist(ClientReference)] = Field(None, alias="projectClients")
- project_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="projectBusinessUnits")
+ project_clients: Optional[List[ClientReference]] = Field(None, alias="projectClients")
+ project_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="projectBusinessUnits")
project_template_create: Optional[StrictBool] = Field(None, alias="projectTemplateCreate")
project_template_view_other: Optional[StrictBool] = Field(None, alias="projectTemplateViewOther")
project_template_edit_other: Optional[StrictBool] = Field(None, alias="projectTemplateEditOther")
project_template_delete_other: Optional[StrictBool] = Field(None, alias="projectTemplateDeleteOther")
- project_template_clients: Optional[conlist(ClientReference)] = Field(None, alias="projectTemplateClients")
- project_template_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="projectTemplateBusinessUnits")
+ project_template_clients: Optional[List[ClientReference]] = Field(None, alias="projectTemplateClients")
+ project_template_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="projectTemplateBusinessUnits")
trans_memory_create: Optional[StrictBool] = Field(None, alias="transMemoryCreate")
trans_memory_view_other: Optional[StrictBool] = Field(None, alias="transMemoryViewOther")
trans_memory_edit_other: Optional[StrictBool] = Field(None, alias="transMemoryEditOther")
trans_memory_delete_other: Optional[StrictBool] = Field(None, alias="transMemoryDeleteOther")
trans_memory_export_other: Optional[StrictBool] = Field(None, alias="transMemoryExportOther")
trans_memory_import_other: Optional[StrictBool] = Field(None, alias="transMemoryImportOther")
- trans_memory_clients: Optional[conlist(ClientReference)] = Field(None, alias="transMemoryClients")
- trans_memory_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="transMemoryBusinessUnits")
+ trans_memory_clients: Optional[List[ClientReference]] = Field(None, alias="transMemoryClients")
+ trans_memory_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="transMemoryBusinessUnits")
term_base_create: Optional[StrictBool] = Field(None, alias="termBaseCreate")
term_base_view_other: Optional[StrictBool] = Field(None, alias="termBaseViewOther")
term_base_edit_other: Optional[StrictBool] = Field(None, alias="termBaseEditOther")
@@ -63,8 +63,8 @@ class PROJECTMANAGERRESPONSEAllOf(BaseModel):
term_base_export_other: Optional[StrictBool] = Field(None, alias="termBaseExportOther")
term_base_import_other: Optional[StrictBool] = Field(None, alias="termBaseImportOther")
term_base_approve_other: Optional[StrictBool] = Field(None, alias="termBaseApproveOther")
- term_base_clients: Optional[conlist(ClientReference)] = Field(None, alias="termBaseClients")
- term_base_business_units: Optional[conlist(BusinessUnitReference)] = Field(None, alias="termBaseBusinessUnits")
+ term_base_clients: Optional[List[ClientReference]] = Field(None, alias="termBaseClients")
+ term_base_business_units: Optional[List[BusinessUnitReference]] = Field(None, alias="termBaseBusinessUnits")
user_create: Optional[StrictBool] = Field(None, alias="userCreate")
user_view_other: Optional[StrictBool] = Field(None, alias="userViewOther")
user_edit_other: Optional[StrictBool] = Field(None, alias="userEditOther")
@@ -81,14 +81,10 @@ class PROJECTMANAGERRESPONSEAllOf(BaseModel):
setup_server: Optional[StrictBool] = Field(None, alias="setupServer")
__properties = ["sourceLocales", "targetLocales", "workflowSteps", "clients", "domains", "subDomains", "projectCreate", "projectViewOther", "projectEditOther", "projectDeleteOther", "projectClients", "projectBusinessUnits", "projectTemplateCreate", "projectTemplateViewOther", "projectTemplateEditOther", "projectTemplateDeleteOther", "projectTemplateClients", "projectTemplateBusinessUnits", "transMemoryCreate", "transMemoryViewOther", "transMemoryEditOther", "transMemoryDeleteOther", "transMemoryExportOther", "transMemoryImportOther", "transMemoryClients", "transMemoryBusinessUnits", "termBaseCreate", "termBaseViewOther", "termBaseEditOther", "termBaseDeleteOther", "termBaseExportOther", "termBaseImportOther", "termBaseApproveOther", "termBaseClients", "termBaseBusinessUnits", "userCreate", "userViewOther", "userEditOther", "userDeleteOther", "clientDomainSubDomainCreate", "clientDomainSubDomainViewOther", "clientDomainSubDomainEditOther", "clientDomainSubDomainDeleteOther", "vendorCreate", "vendorViewOther", "vendorEditOther", "vendorDeleteOther", "dashboardSetting", "setupServer"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -101,7 +97,7 @@ def from_json(cls, json_str: str) -> PROJECTMANAGERRESPONSEAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -198,9 +194,9 @@ def from_dict(cls, obj: dict) -> PROJECTMANAGERRESPONSEAllOf:
return None
if not isinstance(obj, dict):
- return PROJECTMANAGERRESPONSEAllOf.parse_obj(obj)
+ return PROJECTMANAGERRESPONSEAllOf.model_validate(obj)
- _obj = PROJECTMANAGERRESPONSEAllOf.parse_obj({
+ _obj = PROJECTMANAGERRESPONSEAllOf.model_validate({
"source_locales": obj.get("sourceLocales"),
"target_locales": obj.get("targetLocales"),
"workflow_steps": [WorkflowStepReferenceV3.from_dict(_item) for _item in obj.get("workflowSteps")] if obj.get("workflowSteps") is not None else None,
diff --git a/phrasetms_client/models/properties_settings_dto.py b/phrasetms_client/models/properties_settings_dto.py
index 67836255..9b686f32 100644
--- a/phrasetms_client/models/properties_settings_dto.py
+++ b/phrasetms_client/models/properties_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class PropertiesSettingsDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class PropertiesSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> PropertiesSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> PropertiesSettingsDto:
return None
if not isinstance(obj, dict):
- return PropertiesSettingsDto.parse_obj(obj)
+ return PropertiesSettingsDto.model_validate(obj)
- _obj = PropertiesSettingsDto.parse_obj({
+ _obj = PropertiesSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp")
})
return _obj
diff --git a/phrasetms_client/models/provider_list_dto_v2.py b/phrasetms_client/models/provider_list_dto_v2.py
index 0fc1f5b1..ee6feef0 100644
--- a/phrasetms_client/models/provider_list_dto_v2.py
+++ b/phrasetms_client/models/provider_list_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.providers import Providers
class ProviderListDtoV2(BaseModel):
@@ -29,14 +29,10 @@ class ProviderListDtoV2(BaseModel):
providers: Optional[Providers] = None
__properties = ["providers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ProviderListDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> ProviderListDtoV2:
return None
if not isinstance(obj, dict):
- return ProviderListDtoV2.parse_obj(obj)
+ return ProviderListDtoV2.model_validate(obj)
- _obj = ProviderListDtoV2.parse_obj({
+ _obj = ProviderListDtoV2.model_validate({
"providers": Providers.from_dict(obj.get("providers")) if obj.get("providers") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/provider_reference.py b/phrasetms_client/models/provider_reference.py
index 54357c7e..834ff046 100644
--- a/phrasetms_client/models/provider_reference.py
+++ b/phrasetms_client/models/provider_reference.py
@@ -20,7 +20,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class ProviderReference(BaseModel):
"""
@@ -31,11 +31,7 @@ class ProviderReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["type", "id", "uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'type'
@@ -56,7 +52,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -69,7 +65,7 @@ def from_json(cls, json_str: str) -> Union(USER, VENDOR): # noqa: F821
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"uid",
},
diff --git a/phrasetms_client/models/providers.py b/phrasetms_client/models/providers.py
index b28d7953..576722cc 100644
--- a/phrasetms_client/models/providers.py
+++ b/phrasetms_client/models/providers.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.provider_reference import ProviderReference
class Providers(BaseModel):
"""
Providers
"""
- all: Optional[conlist(ProviderReference)] = None
- relevant: Optional[conlist(ProviderReference)] = None
+ all: Optional[List[ProviderReference]] = None
+ relevant: Optional[List[ProviderReference]] = None
__properties = ["all", "relevant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> Providers:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +73,9 @@ def from_dict(cls, obj: dict) -> Providers:
return None
if not isinstance(obj, dict):
- return Providers.parse_obj(obj)
+ return Providers.model_validate(obj)
- _obj = Providers.parse_obj({
+ _obj = Providers.model_validate({
"all": [ProviderReference.from_dict(_item) for _item in obj.get("all")] if obj.get("all") is not None else None,
"relevant": [ProviderReference.from_dict(_item) for _item in obj.get("relevant")] if obj.get("relevant") is not None else None
})
diff --git a/phrasetms_client/models/providers_per_language.py b/phrasetms_client/models/providers_per_language.py
index e7b4dfef..5684862d 100644
--- a/phrasetms_client/models/providers_per_language.py
+++ b/phrasetms_client/models/providers_per_language.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.user import User
@@ -28,18 +28,14 @@ class ProvidersPerLanguage(BaseModel):
ProvidersPerLanguage
"""
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
- providers: Optional[conlist(ProviderReference)] = None
- assigned_users: Optional[conlist(User)] = Field(None, alias="assignedUsers")
+ providers: Optional[List[ProviderReference]] = None
+ assigned_users: Optional[List[User]] = Field(None, alias="assignedUsers")
__properties = ["targetLang", "providers", "assignedUsers"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> ProvidersPerLanguage:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> ProvidersPerLanguage:
return None
if not isinstance(obj, dict):
- return ProvidersPerLanguage.parse_obj(obj)
+ return ProvidersPerLanguage.model_validate(obj)
- _obj = ProvidersPerLanguage.parse_obj({
+ _obj = ProvidersPerLanguage.model_validate({
"target_lang": obj.get("targetLang"),
"providers": [ProviderReference.from_dict(_item) for _item in obj.get("providers")] if obj.get("providers") is not None else None,
"assigned_users": [User.from_dict(_item) for _item in obj.get("assignedUsers")] if obj.get("assignedUsers") is not None else None
diff --git a/phrasetms_client/models/psd_settings_dto.py b/phrasetms_client/models/psd_settings_dto.py
index ac093b6c..84c26274 100644
--- a/phrasetms_client/models/psd_settings_dto.py
+++ b/phrasetms_client/models/psd_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class PsdSettingsDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class PsdSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["extractHiddenLayers", "extractLockedLayers", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> PsdSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> PsdSettingsDto:
return None
if not isinstance(obj, dict):
- return PsdSettingsDto.parse_obj(obj)
+ return PsdSettingsDto.model_validate(obj)
- _obj = PsdSettingsDto.parse_obj({
+ _obj = PsdSettingsDto.model_validate({
"extract_hidden_layers": obj.get("extractHiddenLayers"),
"extract_locked_layers": obj.get("extractLockedLayers"),
"tag_regexp": obj.get("tagRegexp")
diff --git a/phrasetms_client/models/pseudo_translate_action_dto.py b/phrasetms_client/models/pseudo_translate_action_dto.py
index 182d4d98..73d2e16c 100644
--- a/phrasetms_client/models/pseudo_translate_action_dto.py
+++ b/phrasetms_client/models/pseudo_translate_action_dto.py
@@ -18,30 +18,35 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist, constr
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictFloat,
+ StrictInt,
+ StrictStr,
+ StringConstraints,
+)
from phrasetms_client.models.substitute_dto import SubstituteDto
class PseudoTranslateActionDto(BaseModel):
"""
PseudoTranslateActionDto
"""
- replacement: Optional[constr(strict=True, max_length=10, min_length=1)] = None
+ replacement: Optional[Annotated[str, StringConstraints(strict=True, max_length=10, min_length=1)]] = None
prefix: Optional[StrictStr] = None
suffix: Optional[StrictStr] = None
length: Optional[Union[StrictFloat, StrictInt]] = None
- key_hash_prefix_len: Optional[conint(strict=True, le=18, ge=0)] = Field(None, alias="keyHashPrefixLen")
- substitution: Optional[conlist(SubstituteDto, max_items=100, min_items=1)] = None
+ key_hash_prefix_len: Optional[Annotated[int, Field(strict=True, le=18, ge=0)]] = Field(None, alias="keyHashPrefixLen")
+ substitution: Optional[List[SubstituteDto]] = None
__properties = ["replacement", "prefix", "suffix", "length", "keyHashPrefixLen", "substitution"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +59,7 @@ def from_json(cls, json_str: str) -> PseudoTranslateActionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +79,9 @@ def from_dict(cls, obj: dict) -> PseudoTranslateActionDto:
return None
if not isinstance(obj, dict):
- return PseudoTranslateActionDto.parse_obj(obj)
+ return PseudoTranslateActionDto.model_validate(obj)
- _obj = PseudoTranslateActionDto.parse_obj({
+ _obj = PseudoTranslateActionDto.model_validate({
"replacement": obj.get("replacement"),
"prefix": obj.get("prefix"),
"suffix": obj.get("suffix"),
diff --git a/phrasetms_client/models/pseudo_translate_action_dto_v2.py b/phrasetms_client/models/pseudo_translate_action_dto_v2.py
index 6213dd78..34e47190 100644
--- a/phrasetms_client/models/pseudo_translate_action_dto_v2.py
+++ b/phrasetms_client/models/pseudo_translate_action_dto_v2.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.substitute_dto_v2 import SubstituteDtoV2
class PseudoTranslateActionDtoV2(BaseModel):
@@ -30,18 +31,14 @@ class PseudoTranslateActionDtoV2(BaseModel):
prefix: Optional[StrictStr] = None
suffix: Optional[StrictStr] = None
length: Optional[Union[StrictFloat, StrictInt]] = None
- key_hash_prefix_len: Optional[conint(strict=True, le=18, ge=0)] = Field(None, alias="keyHashPrefixLen")
- substitution: Optional[conlist(SubstituteDtoV2, max_items=2147483647, min_items=0)] = None
+ key_hash_prefix_len: Optional[Annotated[int, Field(strict=True, le=18, ge=0)]] = Field(None, alias="keyHashPrefixLen")
+ substitution: Optional[List[SubstituteDtoV2]] = None
__properties = ["replacement", "prefix", "suffix", "length", "keyHashPrefixLen", "substitution"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +51,7 @@ def from_json(cls, json_str: str) -> PseudoTranslateActionDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +71,9 @@ def from_dict(cls, obj: dict) -> PseudoTranslateActionDtoV2:
return None
if not isinstance(obj, dict):
- return PseudoTranslateActionDtoV2.parse_obj(obj)
+ return PseudoTranslateActionDtoV2.model_validate(obj)
- _obj = PseudoTranslateActionDtoV2.parse_obj({
+ _obj = PseudoTranslateActionDtoV2.model_validate({
"replacement": obj.get("replacement"),
"prefix": obj.get("prefix"),
"suffix": obj.get("suffix"),
diff --git a/phrasetms_client/models/pseudo_translate_wrapper_dto.py b/phrasetms_client/models/pseudo_translate_wrapper_dto.py
index cf24f114..23d4c4db 100644
--- a/phrasetms_client/models/pseudo_translate_wrapper_dto.py
+++ b/phrasetms_client/models/pseudo_translate_wrapper_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.job_part_ready_references import JobPartReadyReferences
from phrasetms_client.models.pseudo_translate_action_dto_v2 import PseudoTranslateActionDtoV2
@@ -31,14 +31,10 @@ class PseudoTranslateWrapperDto(BaseModel):
pseudo_translate: PseudoTranslateActionDtoV2 = Field(..., alias="pseudoTranslate")
__properties = ["jobParts", "pseudoTranslate"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> PseudoTranslateWrapperDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> PseudoTranslateWrapperDto:
return None
if not isinstance(obj, dict):
- return PseudoTranslateWrapperDto.parse_obj(obj)
+ return PseudoTranslateWrapperDto.model_validate(obj)
- _obj = PseudoTranslateWrapperDto.parse_obj({
+ _obj = PseudoTranslateWrapperDto.model_validate({
"job_parts": JobPartReadyReferences.from_dict(obj.get("jobParts")) if obj.get("jobParts") is not None else None,
"pseudo_translate": PseudoTranslateActionDtoV2.from_dict(obj.get("pseudoTranslate")) if obj.get("pseudoTranslate") is not None else None
})
diff --git a/phrasetms_client/models/qa_check_dto_v2.py b/phrasetms_client/models/qa_check_dto_v2.py
index c109a00e..7587fec2 100644
--- a/phrasetms_client/models/qa_check_dto_v2.py
+++ b/phrasetms_client/models/qa_check_dto_v2.py
@@ -21,7 +21,7 @@
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class QACheckDtoV2(BaseModel):
"""
@@ -31,25 +31,23 @@ class QACheckDtoV2(BaseModel):
name: StrictStr = Field(...)
__properties = ["type", "name"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('VOID', 'NUMBER', 'STRING', 'REGEX', 'MORAVIA'):
raise ValueError("must be one of enum values ('VOID', 'NUMBER', 'STRING', 'REGEX', 'MORAVIA')")
return value
- @validator('name')
+ @field_validator('name')
+ @classmethod
def name_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('emptyTarget', 'inconsistentTranslation', 'joinMarksInconsistency', 'missingNumber', 'segmentNotConfirmed', 'nonConformingTerms', 'multipleSpaces', 'endPunctuation', 'targetLength', 'absoluteTargetLength', 'relativeTargetLength', 'inconsistentFormatting', 'unresolvedComment', 'emptyPairTags', 'strictJobStatus', 'forbiddenStringsEnabled', 'excludeLockedSegments', 'ignoreNotApprovedTerms', 'spellCheck', 'repeatedWords', 'inconsistentTagContent', 'emptyTagContent', 'malformed', 'forbiddenTerms', 'targetLengthPercent', 'targetLengthPerSegment', 'newerAtLowerLevel', 'leadingAndTrailingSpaces', 'targetSourceIdentical', 'ignoreInAllWorkflowSteps', 'regexp', 'unmodifiedFuzzyTranslation', 'unmodifiedFuzzyTranslationTM', 'unmodifiedFuzzyTranslationMTNT', 'moravia', 'extraNumbers', 'nestedTags'):
raise ValueError("must be one of enum values ('emptyTarget', 'inconsistentTranslation', 'joinMarksInconsistency', 'missingNumber', 'segmentNotConfirmed', 'nonConformingTerms', 'multipleSpaces', 'endPunctuation', 'targetLength', 'absoluteTargetLength', 'relativeTargetLength', 'inconsistentFormatting', 'unresolvedComment', 'emptyPairTags', 'strictJobStatus', 'forbiddenStringsEnabled', 'excludeLockedSegments', 'ignoreNotApprovedTerms', 'spellCheck', 'repeatedWords', 'inconsistentTagContent', 'emptyTagContent', 'malformed', 'forbiddenTerms', 'targetLengthPercent', 'targetLengthPerSegment', 'newerAtLowerLevel', 'leadingAndTrailingSpaces', 'targetSourceIdentical', 'ignoreInAllWorkflowSteps', 'regexp', 'unmodifiedFuzzyTranslation', 'unmodifiedFuzzyTranslationTM', 'unmodifiedFuzzyTranslationMTNT', 'moravia', 'extraNumbers', 'nestedTags')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'type'
@@ -73,7 +71,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -86,7 +84,7 @@ def from_json(cls, json_str: str) -> Union(MORAVIA, NUMBER, REGEX, STRING, VOID)
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/qa_settings_dto_v2.py b/phrasetms_client/models/qa_settings_dto_v2.py
index 3760515a..7e05ea0f 100644
--- a/phrasetms_client/models/qa_settings_dto_v2.py
+++ b/phrasetms_client/models/qa_settings_dto_v2.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.qa_check_dto_v2 import QACheckDtoV2
class QASettingsDtoV2(BaseModel):
"""
QASettingsDtoV2
"""
- checks: Optional[conlist(QACheckDtoV2)] = None
+ checks: Optional[List[QACheckDtoV2]] = None
__properties = ["checks"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> QASettingsDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> QASettingsDtoV2:
return None
if not isinstance(obj, dict):
- return QASettingsDtoV2.parse_obj(obj)
+ return QASettingsDtoV2.model_validate(obj)
- _obj = QASettingsDtoV2.parse_obj({
+ _obj = QASettingsDtoV2.model_validate({
"checks": [QACheckDtoV2.from_dict(_item) for _item in obj.get("checks")] if obj.get("checks") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/quality_assurance_batch_run_dto_v3.py b/phrasetms_client/models/quality_assurance_batch_run_dto_v3.py
index b01ee173..0667a60b 100644
--- a/phrasetms_client/models/quality_assurance_batch_run_dto_v3.py
+++ b/phrasetms_client/models/quality_assurance_batch_run_dto_v3.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, conint, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.quality_assurance_run_dto_v3 import QualityAssuranceRunDtoV3
from phrasetms_client.models.uid_reference import UidReference
@@ -27,19 +28,15 @@ class QualityAssuranceBatchRunDtoV3(BaseModel):
"""
QualityAssuranceBatchRunDtoV3
"""
- jobs: conlist(UidReference, max_items=500, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
settings: Optional[QualityAssuranceRunDtoV3] = None
- max_qa_warnings_count: Optional[conint(strict=True, le=1000, ge=1)] = Field(None, alias="maxQaWarningsCount", description="Maximum number of QA warnings in result, default: 100. For efficiency reasons QA warnings are processed with minimum segments chunk size 10, therefore slightly more warnings are returned.")
+ max_qa_warnings_count: Optional[Annotated[int, Field(strict=True, le=1000, ge=1)]] = Field(None, alias="maxQaWarningsCount", description="Maximum number of QA warnings in result, default: 100. For efficiency reasons QA warnings are processed with minimum segments chunk size 10, therefore slightly more warnings are returned.")
__properties = ["jobs", "settings", "maxQaWarningsCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +49,7 @@ def from_json(cls, json_str: str) -> QualityAssuranceBatchRunDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +72,9 @@ def from_dict(cls, obj: dict) -> QualityAssuranceBatchRunDtoV3:
return None
if not isinstance(obj, dict):
- return QualityAssuranceBatchRunDtoV3.parse_obj(obj)
+ return QualityAssuranceBatchRunDtoV3.model_validate(obj)
- _obj = QualityAssuranceBatchRunDtoV3.parse_obj({
+ _obj = QualityAssuranceBatchRunDtoV3.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None,
"settings": QualityAssuranceRunDtoV3.from_dict(obj.get("settings")) if obj.get("settings") is not None else None,
"max_qa_warnings_count": obj.get("maxQaWarningsCount")
diff --git a/phrasetms_client/models/quality_assurance_checks_dto_v2.py b/phrasetms_client/models/quality_assurance_checks_dto_v2.py
index dc5d329c..f691f2b8 100644
--- a/phrasetms_client/models/quality_assurance_checks_dto_v2.py
+++ b/phrasetms_client/models/quality_assurance_checks_dto_v2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.enabled_check_dto_v2 import EnabledCheckDtoV2
from phrasetms_client.models.regexp_check_rule_dto_v2 import RegexpCheckRuleDtoV2
@@ -27,22 +27,18 @@ class QualityAssuranceChecksDtoV2(BaseModel):
"""
QualityAssuranceChecksDtoV2
"""
- forbidden_strings: Optional[conlist(StrictStr)] = Field(None, alias="forbiddenStrings")
- enabled_checks: Optional[conlist(EnabledCheckDtoV2)] = Field(None, alias="enabledChecks", description="enabledChecks")
+ forbidden_strings: Optional[List[StrictStr]] = Field(None, alias="forbiddenStrings")
+ enabled_checks: Optional[List[EnabledCheckDtoV2]] = Field(None, alias="enabledChecks", description="enabledChecks")
exclude_locked_segments: Optional[StrictBool] = Field(None, alias="excludeLockedSegments")
user_can_set_instant_qa: Optional[StrictBool] = Field(None, alias="userCanSetInstantQA")
strict_job_status: Optional[StrictBool] = Field(None, alias="strictJobStatus")
- regexp_rules: Optional[conlist(RegexpCheckRuleDtoV2)] = Field(None, alias="regexpRules")
+ regexp_rules: Optional[List[RegexpCheckRuleDtoV2]] = Field(None, alias="regexpRules")
__properties = ["forbiddenStrings", "enabledChecks", "excludeLockedSegments", "userCanSetInstantQA", "strictJobStatus", "regexpRules"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> QualityAssuranceChecksDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> QualityAssuranceChecksDtoV2:
return None
if not isinstance(obj, dict):
- return QualityAssuranceChecksDtoV2.parse_obj(obj)
+ return QualityAssuranceChecksDtoV2.model_validate(obj)
- _obj = QualityAssuranceChecksDtoV2.parse_obj({
+ _obj = QualityAssuranceChecksDtoV2.model_validate({
"forbidden_strings": obj.get("forbiddenStrings"),
"enabled_checks": [EnabledCheckDtoV2.from_dict(_item) for _item in obj.get("enabledChecks")] if obj.get("enabledChecks") is not None else None,
"exclude_locked_segments": obj.get("excludeLockedSegments"),
diff --git a/phrasetms_client/models/quality_assurance_dto.py b/phrasetms_client/models/quality_assurance_dto.py
index f378d754..140a3961 100644
--- a/phrasetms_client/models/quality_assurance_dto.py
+++ b/phrasetms_client/models/quality_assurance_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class QualityAssuranceDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class QualityAssuranceDto(BaseModel):
ignored_warnings_count: Optional[StrictInt] = Field(None, alias="ignoredWarningsCount")
__properties = ["segmentsCount", "warningsCount", "ignoredWarningsCount"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> QualityAssuranceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> QualityAssuranceDto:
return None
if not isinstance(obj, dict):
- return QualityAssuranceDto.parse_obj(obj)
+ return QualityAssuranceDto.model_validate(obj)
- _obj = QualityAssuranceDto.parse_obj({
+ _obj = QualityAssuranceDto.model_validate({
"segments_count": obj.get("segmentsCount"),
"warnings_count": obj.get("warningsCount"),
"ignored_warnings_count": obj.get("ignoredWarningsCount")
diff --git a/phrasetms_client/models/quality_assurance_response_dto.py b/phrasetms_client/models/quality_assurance_response_dto.py
index 9837e925..eaf2bddb 100644
--- a/phrasetms_client/models/quality_assurance_response_dto.py
+++ b/phrasetms_client/models/quality_assurance_response_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.segment_warnings_dto import SegmentWarningsDto
class QualityAssuranceResponseDto(BaseModel):
"""
QualityAssuranceResponseDto
"""
- segment_warnings: Optional[conlist(SegmentWarningsDto)] = Field(None, alias="segmentWarnings")
+ segment_warnings: Optional[List[SegmentWarningsDto]] = Field(None, alias="segmentWarnings")
finished: Optional[StrictBool] = None
__properties = ["segmentWarnings", "finished"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> QualityAssuranceResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> QualityAssuranceResponseDto:
return None
if not isinstance(obj, dict):
- return QualityAssuranceResponseDto.parse_obj(obj)
+ return QualityAssuranceResponseDto.model_validate(obj)
- _obj = QualityAssuranceResponseDto.parse_obj({
+ _obj = QualityAssuranceResponseDto.model_validate({
"segment_warnings": [SegmentWarningsDto.from_dict(_item) for _item in obj.get("segmentWarnings")] if obj.get("segmentWarnings") is not None else None,
"finished": obj.get("finished")
})
diff --git a/phrasetms_client/models/quality_assurance_run_dto_v3.py b/phrasetms_client/models/quality_assurance_run_dto_v3.py
index 45d4ae92..46f8a28c 100644
--- a/phrasetms_client/models/quality_assurance_run_dto_v3.py
+++ b/phrasetms_client/models/quality_assurance_run_dto_v3.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conint, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.segment_reference import SegmentReference
class QualityAssuranceRunDtoV3(BaseModel):
@@ -27,11 +28,12 @@ class QualityAssuranceRunDtoV3(BaseModel):
QualityAssuranceRunDtoV3
"""
initial_segment: Optional[SegmentReference] = Field(None, alias="initialSegment")
- max_qa_warnings_count: Optional[conint(strict=True, le=1000, ge=1)] = Field(None, alias="maxQaWarningsCount", description="Maximum number of QA warnings in result, default: 100. For efficiency reasons QA warnings are processed with minimum segments chunk size 10, therefore slightly more warnings are returned.")
- warning_types: Optional[conlist(StrictStr, max_items=100, min_items=0)] = Field(None, alias="warningTypes")
+ max_qa_warnings_count: Optional[Annotated[int, Field(strict=True, le=1000, ge=1)]] = Field(None, alias="maxQaWarningsCount", description="Maximum number of QA warnings in result, default: 100. For efficiency reasons QA warnings are processed with minimum segments chunk size 10, therefore slightly more warnings are returned.")
+ warning_types: Optional[List[StrictStr]] = Field(None, alias="warningTypes")
__properties = ["initialSegment", "maxQaWarningsCount", "warningTypes"]
- @validator('warning_types')
+ @field_validator('warning_types')
+ @classmethod
def warning_types_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -42,14 +44,10 @@ def warning_types_validate_enum(cls, value):
raise ValueError("each list item must be one of ('EmptyTranslation', 'TrailingPunctuation', 'Formatting', 'JoinTags', 'MissingNumbersV3', 'MultipleSpacesV3', 'NonConformingTerm', 'NotConfirmed', 'TranslationLength', 'AbsoluteLength', 'RelativeLength', 'UnresolvedComment', 'EmptyPairTags', 'InconsistentTranslationTargetSource', 'InconsistentTranslationSourceTarget', 'ForbiddenString', 'SpellCheck', 'RepeatedWord', 'InconsistentTagContent', 'EmptyTagContent', 'Malformed', 'ForbiddenTerm', 'NewerAtLowerLevel', 'LeadingAndTrailingSpaces', 'LeadingSpaces', 'TrailingSpaces', 'TargetSourceIdentical', 'SourceOrTargetRegexp', 'UnmodifiedFuzzyTranslation', 'UnmodifiedFuzzyTranslationTM', 'UnmodifiedFuzzyTranslationMTNT', 'Moravia', 'ExtraNumbersV3', 'UnresolvedConversation', 'NestedTags', 'FuzzyInconsistencyTargetSource', 'FuzzyInconsistencySourceTarget', 'CustomQA')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +60,7 @@ def from_json(cls, json_str: str) -> QualityAssuranceRunDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +76,9 @@ def from_dict(cls, obj: dict) -> QualityAssuranceRunDtoV3:
return None
if not isinstance(obj, dict):
- return QualityAssuranceRunDtoV3.parse_obj(obj)
+ return QualityAssuranceRunDtoV3.model_validate(obj)
- _obj = QualityAssuranceRunDtoV3.parse_obj({
+ _obj = QualityAssuranceRunDtoV3.model_validate({
"initial_segment": SegmentReference.from_dict(obj.get("initialSegment")) if obj.get("initialSegment") is not None else None,
"max_qa_warnings_count": obj.get("maxQaWarningsCount"),
"warning_types": obj.get("warningTypes")
diff --git a/phrasetms_client/models/quality_assurance_segments_run_dto_v3.py b/phrasetms_client/models/quality_assurance_segments_run_dto_v3.py
index 7b73dfb4..1e219575 100644
--- a/phrasetms_client/models/quality_assurance_segments_run_dto_v3.py
+++ b/phrasetms_client/models/quality_assurance_segments_run_dto_v3.py
@@ -18,20 +18,22 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conint, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.job_part_segments_dto_v3 import JobPartSegmentsDtoV3
class QualityAssuranceSegmentsRunDtoV3(BaseModel):
"""
QualityAssuranceSegmentsRunDtoV3
"""
- jobs_and_segments: conlist(JobPartSegmentsDtoV3, max_items=100, min_items=1) = Field(..., alias="jobsAndSegments")
- warning_types: Optional[conlist(StrictStr, max_items=100, min_items=0)] = Field(None, alias="warningTypes", description="When empty only fast checks run")
- max_qa_warnings_count: Optional[conint(strict=True, le=1000, ge=1)] = Field(None, alias="maxQaWarningsCount", description="Maximum number of QA warnings in result, default: 100. For efficiency reasons QA warnings are processed with minimum segments chunk size 10, therefore slightly more warnings are returned.")
+ jobs_and_segments: List[JobPartSegmentsDtoV3] = Field(..., alias="jobsAndSegments")
+ warning_types: Optional[List[StrictStr]] = Field(None, alias="warningTypes", description="When empty only fast checks run")
+ max_qa_warnings_count: Optional[Annotated[int, Field(strict=True, le=1000, ge=1)]] = Field(None, alias="maxQaWarningsCount", description="Maximum number of QA warnings in result, default: 100. For efficiency reasons QA warnings are processed with minimum segments chunk size 10, therefore slightly more warnings are returned.")
__properties = ["jobsAndSegments", "warningTypes", "maxQaWarningsCount"]
- @validator('warning_types')
+ @field_validator('warning_types')
+ @classmethod
def warning_types_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -42,14 +44,10 @@ def warning_types_validate_enum(cls, value):
raise ValueError("each list item must be one of ('EmptyTranslation', 'TrailingPunctuation', 'Formatting', 'JoinTags', 'MissingNumbersV3', 'MultipleSpacesV3', 'NonConformingTerm', 'NotConfirmed', 'TranslationLength', 'AbsoluteLength', 'RelativeLength', 'UnresolvedComment', 'EmptyPairTags', 'InconsistentTranslationTargetSource', 'InconsistentTranslationSourceTarget', 'ForbiddenString', 'SpellCheck', 'RepeatedWord', 'InconsistentTagContent', 'EmptyTagContent', 'Malformed', 'ForbiddenTerm', 'NewerAtLowerLevel', 'LeadingAndTrailingSpaces', 'LeadingSpaces', 'TrailingSpaces', 'TargetSourceIdentical', 'SourceOrTargetRegexp', 'UnmodifiedFuzzyTranslation', 'UnmodifiedFuzzyTranslationTM', 'UnmodifiedFuzzyTranslationMTNT', 'Moravia', 'ExtraNumbersV3', 'UnresolvedConversation', 'NestedTags', 'FuzzyInconsistencyTargetSource', 'FuzzyInconsistencySourceTarget', 'CustomQA')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +60,7 @@ def from_json(cls, json_str: str) -> QualityAssuranceSegmentsRunDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +80,9 @@ def from_dict(cls, obj: dict) -> QualityAssuranceSegmentsRunDtoV3:
return None
if not isinstance(obj, dict):
- return QualityAssuranceSegmentsRunDtoV3.parse_obj(obj)
+ return QualityAssuranceSegmentsRunDtoV3.model_validate(obj)
- _obj = QualityAssuranceSegmentsRunDtoV3.parse_obj({
+ _obj = QualityAssuranceSegmentsRunDtoV3.model_validate({
"jobs_and_segments": [JobPartSegmentsDtoV3.from_dict(_item) for _item in obj.get("jobsAndSegments")] if obj.get("jobsAndSegments") is not None else None,
"warning_types": obj.get("warningTypes"),
"max_qa_warnings_count": obj.get("maxQaWarningsCount")
diff --git a/phrasetms_client/models/quark_tag_settings_dto.py b/phrasetms_client/models/quark_tag_settings_dto.py
index 61a385d1..51dc444b 100644
--- a/phrasetms_client/models/quark_tag_settings_dto.py
+++ b/phrasetms_client/models/quark_tag_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class QuarkTagSettingsDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class QuarkTagSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["removeKerningTrackingTags", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> QuarkTagSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> QuarkTagSettingsDto:
return None
if not isinstance(obj, dict):
- return QuarkTagSettingsDto.parse_obj(obj)
+ return QuarkTagSettingsDto.model_validate(obj)
- _obj = QuarkTagSettingsDto.parse_obj({
+ _obj = QuarkTagSettingsDto.model_validate({
"remove_kerning_tracking_tags": obj.get("removeKerningTrackingTags"),
"tag_regexp": obj.get("tagRegexp")
})
diff --git a/phrasetms_client/models/query.py b/phrasetms_client/models/query.py
index a1608ae8..7ec1890d 100644
--- a/phrasetms_client/models/query.py
+++ b/phrasetms_client/models/query.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class Query(BaseModel):
"""
@@ -29,14 +29,10 @@ class Query(BaseModel):
lang: Optional[StrictStr] = None
__properties = ["query", "lang"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> Query:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> Query:
return None
if not isinstance(obj, dict):
- return Query.parse_obj(obj)
+ return Query.model_validate(obj)
- _obj = Query.parse_obj({
+ _obj = Query.model_validate({
"query": obj.get("query"),
"lang": obj.get("lang")
})
diff --git a/phrasetms_client/models/quote_create_v2_dto.py b/phrasetms_client/models/quote_create_v2_dto.py
index 2ed42e0f..183ffc27 100644
--- a/phrasetms_client/models/quote_create_v2_dto.py
+++ b/phrasetms_client/models/quote_create_v2_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.provider_reference import ProviderReference
from phrasetms_client.models.quote_units_dto import QuoteUnitsDto
@@ -30,25 +31,21 @@ class QuoteCreateV2Dto(BaseModel):
"""
QuoteCreateV2Dto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
project: UidReference = Field(...)
analyse: IdReference = Field(...)
price_list: IdReference = Field(..., alias="priceList")
net_rate_scheme: Optional[IdReference] = Field(None, alias="netRateScheme")
provider: Optional[ProviderReference] = None
- workflow_settings: Optional[conlist(QuoteWorkflowSettingDto, unique_items=True)] = Field(None, alias="workflowSettings")
- units: Optional[conlist(QuoteUnitsDto)] = None
- additional_steps: Optional[conlist(StrictStr)] = Field(None, alias="additionalSteps")
+ workflow_settings: Optional[List[QuoteWorkflowSettingDto]] = Field(None, alias="workflowSettings")
+ units: Optional[List[QuoteUnitsDto]] = None
+ additional_steps: Optional[List[StrictStr]] = Field(None, alias="additionalSteps")
__properties = ["name", "project", "analyse", "priceList", "netRateScheme", "provider", "workflowSettings", "units", "additionalSteps"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +58,7 @@ def from_json(cls, json_str: str) -> QuoteCreateV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -103,9 +100,9 @@ def from_dict(cls, obj: dict) -> QuoteCreateV2Dto:
return None
if not isinstance(obj, dict):
- return QuoteCreateV2Dto.parse_obj(obj)
+ return QuoteCreateV2Dto.model_validate(obj)
- _obj = QuoteCreateV2Dto.parse_obj({
+ _obj = QuoteCreateV2Dto.model_validate({
"name": obj.get("name"),
"project": UidReference.from_dict(obj.get("project")) if obj.get("project") is not None else None,
"analyse": IdReference.from_dict(obj.get("analyse")) if obj.get("analyse") is not None else None,
diff --git a/phrasetms_client/models/quote_dto.py b/phrasetms_client/models/quote_dto.py
index 1b49605b..04ec56e5 100644
--- a/phrasetms_client/models/quote_dto.py
+++ b/phrasetms_client/models/quote_dto.py
@@ -19,7 +19,16 @@
from datetime import datetime
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictFloat,
+ StrictInt,
+ StrictStr,
+ field_validator,
+)
from phrasetms_client.models.net_rate_scheme_reference import NetRateSchemeReference
from phrasetms_client.models.price_list_reference import PriceListReference
from phrasetms_client.models.provider_reference import ProviderReference
@@ -41,7 +50,7 @@ class QuoteDto(BaseModel):
total_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalPrice")
net_rate_scheme: Optional[NetRateSchemeReference] = Field(None, alias="netRateScheme")
price_list: Optional[PriceListReference] = Field(None, alias="priceList")
- workflow_step_list: Optional[conlist(WorkflowStepReference)] = Field(None, alias="workflowStepList")
+ workflow_step_list: Optional[List[WorkflowStepReference]] = Field(None, alias="workflowStepList")
provider: Optional[ProviderReference] = None
customer_email: Optional[StrictStr] = Field(None, alias="customerEmail")
quote_type: Optional[StrictStr] = Field(None, alias="quoteType")
@@ -49,7 +58,8 @@ class QuoteDto(BaseModel):
outdated: Optional[StrictBool] = None
__properties = ["id", "uid", "name", "status", "currency", "billingUnit", "createdBy", "dateCreated", "totalPrice", "netRateScheme", "priceList", "workflowStepList", "provider", "customerEmail", "quoteType", "editable", "outdated"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -59,7 +69,8 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('APPROVED', 'DECLINED', 'DRAFT', 'FOR_APPROVAL', 'NEW')")
return value
- @validator('billing_unit')
+ @field_validator('billing_unit')
+ @classmethod
def billing_unit_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -69,7 +80,8 @@ def billing_unit_validate_enum(cls, value):
raise ValueError("must be one of enum values ('Character', 'Word', 'Page', 'Hour')")
return value
- @validator('quote_type')
+ @field_validator('quote_type')
+ @classmethod
def quote_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -79,14 +91,10 @@ def quote_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('BUYER', 'PROVIDER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -99,7 +107,7 @@ def from_json(cls, json_str: str) -> QuoteDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -131,9 +139,9 @@ def from_dict(cls, obj: dict) -> QuoteDto:
return None
if not isinstance(obj, dict):
- return QuoteDto.parse_obj(obj)
+ return QuoteDto.model_validate(obj)
- _obj = QuoteDto.parse_obj({
+ _obj = QuoteDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/quote_units_dto.py b/phrasetms_client/models/quote_units_dto.py
index d692e583..593c3080 100644
--- a/phrasetms_client/models/quote_units_dto.py
+++ b/phrasetms_client/models/quote_units_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, confloat, conint
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class QuoteUnitsDto(BaseModel):
@@ -27,17 +28,13 @@ class QuoteUnitsDto(BaseModel):
QuoteUnitsDto
"""
analyse_language_part: IdReference = Field(..., alias="analyseLanguagePart")
- value: Optional[Union[confloat(ge=0, strict=True), conint(ge=0, strict=True)]] = None
+ value: Optional[Union[Annotated[float, Field(ge=0, strict=True)], Annotated[int, Field(ge=0, strict=True)]]] = None
__properties = ["analyseLanguagePart", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +47,7 @@ def from_json(cls, json_str: str) -> QuoteUnitsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +63,9 @@ def from_dict(cls, obj: dict) -> QuoteUnitsDto:
return None
if not isinstance(obj, dict):
- return QuoteUnitsDto.parse_obj(obj)
+ return QuoteUnitsDto.model_validate(obj)
- _obj = QuoteUnitsDto.parse_obj({
+ _obj = QuoteUnitsDto.model_validate({
"analyse_language_part": IdReference.from_dict(obj.get("analyseLanguagePart")) if obj.get("analyseLanguagePart") is not None else None,
"value": obj.get("value")
})
diff --git a/phrasetms_client/models/quote_v2_dto.py b/phrasetms_client/models/quote_v2_dto.py
index 017ab96f..8a939948 100644
--- a/phrasetms_client/models/quote_v2_dto.py
+++ b/phrasetms_client/models/quote_v2_dto.py
@@ -19,7 +19,16 @@
from datetime import datetime
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictFloat,
+ StrictInt,
+ StrictStr,
+ field_validator,
+)
from phrasetms_client.models.additional_workflow_step_v2_dto import AdditionalWorkflowStepV2Dto
from phrasetms_client.models.net_rate_scheme_reference import NetRateSchemeReference
from phrasetms_client.models.price_list_reference import PriceListReference
@@ -42,16 +51,17 @@ class QuoteV2Dto(BaseModel):
total_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalPrice")
net_rate_scheme: Optional[NetRateSchemeReference] = Field(None, alias="netRateScheme")
price_list: Optional[PriceListReference] = Field(None, alias="priceList")
- workflow_step_list: Optional[conlist(WorkflowStepReference)] = Field(None, alias="workflowStepList")
+ workflow_step_list: Optional[List[WorkflowStepReference]] = Field(None, alias="workflowStepList")
provider: Optional[ProviderReference] = None
customer_email: Optional[StrictStr] = Field(None, alias="customerEmail")
quote_type: Optional[StrictStr] = Field(None, alias="quoteType")
editable: Optional[StrictBool] = None
outdated: Optional[StrictBool] = None
- additional_steps: Optional[conlist(AdditionalWorkflowStepV2Dto)] = Field(None, alias="additionalSteps")
+ additional_steps: Optional[List[AdditionalWorkflowStepV2Dto]] = Field(None, alias="additionalSteps")
__properties = ["id", "uid", "name", "status", "currency", "billingUnit", "createdBy", "dateCreated", "totalPrice", "netRateScheme", "priceList", "workflowStepList", "provider", "customerEmail", "quoteType", "editable", "outdated", "additionalSteps"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -61,7 +71,8 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('APPROVED', 'DECLINED', 'DRAFT', 'FOR_APPROVAL', 'NEW')")
return value
- @validator('billing_unit')
+ @field_validator('billing_unit')
+ @classmethod
def billing_unit_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -71,7 +82,8 @@ def billing_unit_validate_enum(cls, value):
raise ValueError("must be one of enum values ('Character', 'Word', 'Page', 'Hour')")
return value
- @validator('quote_type')
+ @field_validator('quote_type')
+ @classmethod
def quote_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -81,14 +93,10 @@ def quote_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('BUYER', 'PROVIDER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -101,7 +109,7 @@ def from_json(cls, json_str: str) -> QuoteV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -140,9 +148,9 @@ def from_dict(cls, obj: dict) -> QuoteV2Dto:
return None
if not isinstance(obj, dict):
- return QuoteV2Dto.parse_obj(obj)
+ return QuoteV2Dto.model_validate(obj)
- _obj = QuoteV2Dto.parse_obj({
+ _obj = QuoteV2Dto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/quote_workflow_setting_dto.py b/phrasetms_client/models/quote_workflow_setting_dto.py
index c8cf3a2e..10fc8ecc 100644
--- a/phrasetms_client/models/quote_workflow_setting_dto.py
+++ b/phrasetms_client/models/quote_workflow_setting_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.quote_units_dto import QuoteUnitsDto
@@ -28,17 +28,13 @@ class QuoteWorkflowSettingDto(BaseModel):
QuoteWorkflowSettingDto
"""
workflow_step: IdReference = Field(..., alias="workflowStep")
- units: Optional[conlist(QuoteUnitsDto, max_items=100, min_items=0)] = None
+ units: Optional[List[QuoteUnitsDto]] = None
__properties = ["workflowStep", "units"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> QuoteWorkflowSettingDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +70,9 @@ def from_dict(cls, obj: dict) -> QuoteWorkflowSettingDto:
return None
if not isinstance(obj, dict):
- return QuoteWorkflowSettingDto.parse_obj(obj)
+ return QuoteWorkflowSettingDto.model_validate(obj)
- _obj = QuoteWorkflowSettingDto.parse_obj({
+ _obj = QuoteWorkflowSettingDto.model_validate({
"workflow_step": IdReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"units": [QuoteUnitsDto.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None
})
diff --git a/phrasetms_client/models/reference_correlation.py b/phrasetms_client/models/reference_correlation.py
index 7a03c344..57e5f4a7 100644
--- a/phrasetms_client/models/reference_correlation.py
+++ b/phrasetms_client/models/reference_correlation.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr, validator
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
class ReferenceCorrelation(BaseModel):
"""
@@ -29,7 +29,8 @@ class ReferenceCorrelation(BaseModel):
role: Optional[StrictStr] = None
__properties = ["uid", "role"]
- @validator('role')
+ @field_validator('role')
+ @classmethod
def role_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -39,14 +40,10 @@ def role_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PARENT')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -59,7 +56,7 @@ def from_json(cls, json_str: str) -> ReferenceCorrelation:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +69,9 @@ def from_dict(cls, obj: dict) -> ReferenceCorrelation:
return None
if not isinstance(obj, dict):
- return ReferenceCorrelation.parse_obj(obj)
+ return ReferenceCorrelation.model_validate(obj)
- _obj = ReferenceCorrelation.parse_obj({
+ _obj = ReferenceCorrelation.model_validate({
"uid": obj.get("uid"),
"role": obj.get("role")
})
diff --git a/phrasetms_client/models/reference_file_access_dto.py b/phrasetms_client/models/reference_file_access_dto.py
index 555a88e0..4646198f 100644
--- a/phrasetms_client/models/reference_file_access_dto.py
+++ b/phrasetms_client/models/reference_file_access_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class ReferenceFileAccessDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class ReferenceFileAccessDto(BaseModel):
can_create: Optional[StrictBool] = Field(None, alias="canCreate")
__properties = ["canCreate"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> ReferenceFileAccessDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> ReferenceFileAccessDto:
return None
if not isinstance(obj, dict):
- return ReferenceFileAccessDto.parse_obj(obj)
+ return ReferenceFileAccessDto.model_validate(obj)
- _obj = ReferenceFileAccessDto.parse_obj({
+ _obj = ReferenceFileAccessDto.model_validate({
"can_create": obj.get("canCreate")
})
return _obj
diff --git a/phrasetms_client/models/reference_file_page_dto.py b/phrasetms_client/models/reference_file_page_dto.py
index fa950ebc..a43acb6d 100644
--- a/phrasetms_client/models/reference_file_page_dto.py
+++ b/phrasetms_client/models/reference_file_page_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
from phrasetms_client.models.reference_file_access_dto import ReferenceFileAccessDto
from phrasetms_client.models.reference_file_reference import ReferenceFileReference
@@ -32,18 +32,14 @@ class ReferenceFilePageDto(BaseModel):
page_size: Optional[StrictInt] = Field(None, alias="pageSize")
page_number: Optional[StrictInt] = Field(None, alias="pageNumber")
number_of_elements: Optional[StrictInt] = Field(None, alias="numberOfElements")
- content: Optional[conlist(ReferenceFileReference)] = None
+ content: Optional[List[ReferenceFileReference]] = None
access: Optional[ReferenceFileAccessDto] = None
__properties = ["totalElements", "totalPages", "pageSize", "pageNumber", "numberOfElements", "content", "access"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> ReferenceFilePageDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> ReferenceFilePageDto:
return None
if not isinstance(obj, dict):
- return ReferenceFilePageDto.parse_obj(obj)
+ return ReferenceFilePageDto.model_validate(obj)
- _obj = ReferenceFilePageDto.parse_obj({
+ _obj = ReferenceFilePageDto.model_validate({
"total_elements": obj.get("totalElements"),
"total_pages": obj.get("totalPages"),
"page_size": obj.get("pageSize"),
diff --git a/phrasetms_client/models/reference_file_reference.py b/phrasetms_client/models/reference_file_reference.py
index 375a415b..936d50e9 100644
--- a/phrasetms_client/models/reference_file_reference.py
+++ b/phrasetms_client/models/reference_file_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class ReferenceFileReference(BaseModel):
@@ -34,14 +34,10 @@ class ReferenceFileReference(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "filename", "note", "dateCreated", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> ReferenceFileReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> ReferenceFileReference:
return None
if not isinstance(obj, dict):
- return ReferenceFileReference.parse_obj(obj)
+ return ReferenceFileReference.model_validate(obj)
- _obj = ReferenceFileReference.parse_obj({
+ _obj = ReferenceFileReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"filename": obj.get("filename"),
diff --git a/phrasetms_client/models/regex.py b/phrasetms_client/models/regex.py
index 3a274991..1bf5df9f 100644
--- a/phrasetms_client/models/regex.py
+++ b/phrasetms_client/models/regex.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.qa_check_dto_v2 import QACheckDtoV2
from phrasetms_client.models.regexp_check_rule_dto_v2 import RegexpCheckRuleDtoV2
@@ -27,17 +27,13 @@ class REGEX(QACheckDtoV2):
"""
REGEX
"""
- rules: Optional[conlist(RegexpCheckRuleDtoV2)] = None
+ rules: Optional[List[RegexpCheckRuleDtoV2]] = None
__properties = ["type", "name", "rules"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> REGEX:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> REGEX:
return None
if not isinstance(obj, dict):
- return REGEX.parse_obj(obj)
+ return REGEX.model_validate(obj)
- _obj = REGEX.parse_obj({
+ _obj = REGEX.model_validate({
"type": obj.get("type"),
"name": obj.get("name"),
"rules": [RegexpCheckRuleDtoV2.from_dict(_item) for _item in obj.get("rules")] if obj.get("rules") is not None else None
diff --git a/phrasetms_client/models/regex_all_of.py b/phrasetms_client/models/regex_all_of.py
index df3d52cf..b49a7362 100644
--- a/phrasetms_client/models/regex_all_of.py
+++ b/phrasetms_client/models/regex_all_of.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.regexp_check_rule_dto_v2 import RegexpCheckRuleDtoV2
class REGEXAllOf(BaseModel):
"""
REGEXAllOf
"""
- rules: Optional[conlist(RegexpCheckRuleDtoV2)] = None
+ rules: Optional[List[RegexpCheckRuleDtoV2]] = None
__properties = ["rules"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> REGEXAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> REGEXAllOf:
return None
if not isinstance(obj, dict):
- return REGEXAllOf.parse_obj(obj)
+ return REGEXAllOf.model_validate(obj)
- _obj = REGEXAllOf.parse_obj({
+ _obj = REGEXAllOf.model_validate({
"rules": [RegexpCheckRuleDtoV2.from_dict(_item) for _item in obj.get("rules")] if obj.get("rules") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/regexp_check_rule_dto_v2.py b/phrasetms_client/models/regexp_check_rule_dto_v2.py
index 69616080..3b7b9053 100644
--- a/phrasetms_client/models/regexp_check_rule_dto_v2.py
+++ b/phrasetms_client/models/regexp_check_rule_dto_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class RegexpCheckRuleDtoV2(BaseModel):
"""
@@ -33,14 +33,10 @@ class RegexpCheckRuleDtoV2(BaseModel):
instant: Optional[StrictBool] = None
__properties = ["description", "sourceRegexp", "targetRegexp", "id", "ignorable", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> RegexpCheckRuleDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> RegexpCheckRuleDtoV2:
return None
if not isinstance(obj, dict):
- return RegexpCheckRuleDtoV2.parse_obj(obj)
+ return RegexpCheckRuleDtoV2.model_validate(obj)
- _obj = RegexpCheckRuleDtoV2.parse_obj({
+ _obj = RegexpCheckRuleDtoV2.model_validate({
"description": obj.get("description"),
"source_regexp": obj.get("sourceRegexp"),
"target_regexp": obj.get("targetRegexp"),
diff --git a/phrasetms_client/models/relative_translation_length_warning_dto.py b/phrasetms_client/models/relative_translation_length_warning_dto.py
index ee030e62..3b67a345 100644
--- a/phrasetms_client/models/relative_translation_length_warning_dto.py
+++ b/phrasetms_client/models/relative_translation_length_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class RelativeTranslationLengthWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class RelativeTranslationLengthWarningDto(SegmentWarning):
limit: Optional[StrictStr] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "limit"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> RelativeTranslationLengthWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> RelativeTranslationLengthWarningDto:
return None
if not isinstance(obj, dict):
- return RelativeTranslationLengthWarningDto.parse_obj(obj)
+ return RelativeTranslationLengthWarningDto.model_validate(obj)
- _obj = RelativeTranslationLengthWarningDto.parse_obj({
+ _obj = RelativeTranslationLengthWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/remote_uploaded_file_dto.py b/phrasetms_client/models/remote_uploaded_file_dto.py
index 0ec2f54f..615a14ed 100644
--- a/phrasetms_client/models/remote_uploaded_file_dto.py
+++ b/phrasetms_client/models/remote_uploaded_file_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class RemoteUploadedFileDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class RemoteUploadedFileDto(BaseModel):
url: Optional[StrictStr] = None
__properties = ["uid", "name", "size", "type", "url"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> RemoteUploadedFileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"uid",
"name",
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> RemoteUploadedFileDto:
return None
if not isinstance(obj, dict):
- return RemoteUploadedFileDto.parse_obj(obj)
+ return RemoteUploadedFileDto.model_validate(obj)
- _obj = RemoteUploadedFileDto.parse_obj({
+ _obj = RemoteUploadedFileDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"size": obj.get("size"),
diff --git a/phrasetms_client/models/repeated_word_warning_dto.py b/phrasetms_client/models/repeated_word_warning_dto.py
index d0afcbad..6e941d4c 100644
--- a/phrasetms_client/models/repeated_word_warning_dto.py
+++ b/phrasetms_client/models/repeated_word_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -28,17 +28,13 @@ class RepeatedWordWarningDto(SegmentWarning):
RepeatedWordWarningDto
"""
word: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "word", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> RepeatedWordWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> RepeatedWordWarningDto:
return None
if not isinstance(obj, dict):
- return RepeatedWordWarningDto.parse_obj(obj)
+ return RepeatedWordWarningDto.model_validate(obj)
- _obj = RepeatedWordWarningDto.parse_obj({
+ _obj = RepeatedWordWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/repeated_word_warning_dto_all_of.py b/phrasetms_client/models/repeated_word_warning_dto_all_of.py
index 1e5249d9..3044fd2b 100644
--- a/phrasetms_client/models/repeated_word_warning_dto_all_of.py
+++ b/phrasetms_client/models/repeated_word_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
class RepeatedWordWarningDtoAllOf(BaseModel):
@@ -27,17 +27,13 @@ class RepeatedWordWarningDtoAllOf(BaseModel):
RepeatedWordWarningDtoAllOf
"""
word: Optional[StrictStr] = None
- positions: Optional[conlist(Position)] = None
+ positions: Optional[List[Position]] = None
__properties = ["word", "positions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> RepeatedWordWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> RepeatedWordWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return RepeatedWordWarningDtoAllOf.parse_obj(obj)
+ return RepeatedWordWarningDtoAllOf.model_validate(obj)
- _obj = RepeatedWordWarningDtoAllOf.parse_obj({
+ _obj = RepeatedWordWarningDtoAllOf.model_validate({
"word": obj.get("word"),
"positions": [Position.from_dict(_item) for _item in obj.get("positions")] if obj.get("positions") is not None else None
})
diff --git a/phrasetms_client/models/repeated_words_warning_dto.py b/phrasetms_client/models/repeated_words_warning_dto.py
index 4539def3..018ab97a 100644
--- a/phrasetms_client/models/repeated_words_warning_dto.py
+++ b/phrasetms_client/models/repeated_words_warning_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class RepeatedWordsWarningDto(SegmentWarning):
"""
RepeatedWordsWarningDto
"""
- repeated_words: Optional[conlist(StrictStr)] = Field(None, alias="repeatedWords")
+ repeated_words: Optional[List[StrictStr]] = Field(None, alias="repeatedWords")
__properties = ["id", "ignored", "type", "repetitionGroupId", "repeatedWords"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> RepeatedWordsWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> RepeatedWordsWarningDto:
return None
if not isinstance(obj, dict):
- return RepeatedWordsWarningDto.parse_obj(obj)
+ return RepeatedWordsWarningDto.model_validate(obj)
- _obj = RepeatedWordsWarningDto.parse_obj({
+ _obj = RepeatedWordsWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/repeated_words_warning_dto_all_of.py b/phrasetms_client/models/repeated_words_warning_dto_all_of.py
index bd7986b7..2c69cc06 100644
--- a/phrasetms_client/models/repeated_words_warning_dto_all_of.py
+++ b/phrasetms_client/models/repeated_words_warning_dto_all_of.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class RepeatedWordsWarningDtoAllOf(BaseModel):
"""
RepeatedWordsWarningDtoAllOf
"""
- repeated_words: Optional[conlist(StrictStr)] = Field(None, alias="repeatedWords")
+ repeated_words: Optional[List[StrictStr]] = Field(None, alias="repeatedWords")
__properties = ["repeatedWords"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> RepeatedWordsWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> RepeatedWordsWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return RepeatedWordsWarningDtoAllOf.parse_obj(obj)
+ return RepeatedWordsWarningDtoAllOf.model_validate(obj)
- _obj = RepeatedWordsWarningDtoAllOf.parse_obj({
+ _obj = RepeatedWordsWarningDtoAllOf.model_validate({
"repeated_words": obj.get("repeatedWords")
})
return _obj
diff --git a/phrasetms_client/models/repetitions_settings_dto.py b/phrasetms_client/models/repetitions_settings_dto.py
index 5105ae9f..ec3411b3 100644
--- a/phrasetms_client/models/repetitions_settings_dto.py
+++ b/phrasetms_client/models/repetitions_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class RepetitionsSettingsDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class RepetitionsSettingsDto(BaseModel):
lock_subsequent_repetitions: Optional[StrictBool] = Field(None, alias="lockSubsequentRepetitions", description="If auto-propagated subsequent repetitions should be locked. Default: false")
__properties = ["autoPropagateRepetitions", "confirmRepetitions", "autoPropagateToLockedRepetitions", "lockSubsequentRepetitions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> RepetitionsSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> RepetitionsSettingsDto:
return None
if not isinstance(obj, dict):
- return RepetitionsSettingsDto.parse_obj(obj)
+ return RepetitionsSettingsDto.model_validate(obj)
- _obj = RepetitionsSettingsDto.parse_obj({
+ _obj = RepetitionsSettingsDto.model_validate({
"auto_propagate_repetitions": obj.get("autoPropagateRepetitions"),
"confirm_repetitions": obj.get("confirmRepetitions"),
"auto_propagate_to_locked_repetitions": obj.get("autoPropagateToLockedRepetitions"),
diff --git a/phrasetms_client/models/replay_request_dto.py b/phrasetms_client/models/replay_request_dto.py
index 96ae3a57..5901e92a 100644
--- a/phrasetms_client/models/replay_request_dto.py
+++ b/phrasetms_client/models/replay_request_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class ReplayRequestDto(BaseModel):
"""
ReplayRequestDto
"""
- webhook_calls: Optional[conlist(UidReference)] = Field(None, alias="webhookCalls")
+ webhook_calls: Optional[List[UidReference]] = Field(None, alias="webhookCalls")
__properties = ["webhookCalls"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ReplayRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> ReplayRequestDto:
return None
if not isinstance(obj, dict):
- return ReplayRequestDto.parse_obj(obj)
+ return ReplayRequestDto.model_validate(obj)
- _obj = ReplayRequestDto.parse_obj({
+ _obj = ReplayRequestDto.model_validate({
"webhook_calls": [UidReference.from_dict(_item) for _item in obj.get("webhookCalls")] if obj.get("webhookCalls") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/resx_settings_dto.py b/phrasetms_client/models/resx_settings_dto.py
index 8a9468e0..8eee046c 100644
--- a/phrasetms_client/models/resx_settings_dto.py
+++ b/phrasetms_client/models/resx_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class ResxSettingsDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class ResxSettingsDto(BaseModel):
html_sub_filter: Optional[StrictBool] = Field(None, alias="htmlSubFilter")
__properties = ["tagRegexp", "htmlSubFilter"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ResxSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> ResxSettingsDto:
return None
if not isinstance(obj, dict):
- return ResxSettingsDto.parse_obj(obj)
+ return ResxSettingsDto.model_validate(obj)
- _obj = ResxSettingsDto.parse_obj({
+ _obj = ResxSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp"),
"html_sub_filter": obj.get("htmlSubFilter")
})
diff --git a/phrasetms_client/models/schema_extension.py b/phrasetms_client/models/schema_extension.py
index f57a1440..5b4bc3fc 100644
--- a/phrasetms_client/models/schema_extension.py
+++ b/phrasetms_client/models/schema_extension.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class SchemaExtension(BaseModel):
"""
@@ -29,14 +29,10 @@ class SchemaExtension(BaseModel):
required: Optional[StrictBool] = None
__properties = ["schema", "required"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SchemaExtension:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SchemaExtension:
return None
if not isinstance(obj, dict):
- return SchemaExtension.parse_obj(obj)
+ return SchemaExtension.model_validate(obj)
- _obj = SchemaExtension.parse_obj({
+ _obj = SchemaExtension.model_validate({
"var_schema": obj.get("schema"),
"required": obj.get("required")
})
diff --git a/phrasetms_client/models/scim_meta.py b/phrasetms_client/models/scim_meta.py
index 9b6695c2..c1cb67a1 100644
--- a/phrasetms_client/models/scim_meta.py
+++ b/phrasetms_client/models/scim_meta.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class ScimMeta(BaseModel):
"""
@@ -29,14 +29,10 @@ class ScimMeta(BaseModel):
location: Optional[StrictStr] = None
__properties = ["created", "location"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> ScimMeta:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> ScimMeta:
return None
if not isinstance(obj, dict):
- return ScimMeta.parse_obj(obj)
+ return ScimMeta.model_validate(obj)
- _obj = ScimMeta.parse_obj({
+ _obj = ScimMeta.model_validate({
"created": obj.get("created"),
"location": obj.get("location")
})
diff --git a/phrasetms_client/models/scim_resource_schema.py b/phrasetms_client/models/scim_resource_schema.py
index 9c9764b6..2dc712b9 100644
--- a/phrasetms_client/models/scim_resource_schema.py
+++ b/phrasetms_client/models/scim_resource_schema.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.attribute import Attribute
class ScimResourceSchema(BaseModel):
@@ -29,17 +29,13 @@ class ScimResourceSchema(BaseModel):
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- attributes: Optional[conlist(Attribute)] = None
+ attributes: Optional[List[Attribute]] = None
__properties = ["id", "name", "description", "attributes"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> ScimResourceSchema:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> ScimResourceSchema:
return None
if not isinstance(obj, dict):
- return ScimResourceSchema.parse_obj(obj)
+ return ScimResourceSchema.model_validate(obj)
- _obj = ScimResourceSchema.parse_obj({
+ _obj = ScimResourceSchema.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"description": obj.get("description"),
diff --git a/phrasetms_client/models/scim_resource_type_schema.py b/phrasetms_client/models/scim_resource_type_schema.py
index e2706973..ba374f32 100644
--- a/phrasetms_client/models/scim_resource_type_schema.py
+++ b/phrasetms_client/models/scim_resource_type_schema.py
@@ -19,30 +19,26 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.schema_extension import SchemaExtension
class ScimResourceTypeSchema(BaseModel):
"""
ScimResourceTypeSchema
"""
- schemas: Optional[conlist(StrictStr)] = None
+ schemas: Optional[List[StrictStr]] = None
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
endpoint: Optional[StrictStr] = None
description: Optional[StrictStr] = None
var_schema: Optional[StrictStr] = Field(None, alias="schema")
- schema_extensions: Optional[conlist(SchemaExtension)] = Field(None, alias="schemaExtensions")
+ schema_extensions: Optional[List[SchemaExtension]] = Field(None, alias="schemaExtensions")
__properties = ["schemas", "id", "name", "endpoint", "description", "schema", "schemaExtensions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> ScimResourceTypeSchema:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> ScimResourceTypeSchema:
return None
if not isinstance(obj, dict):
- return ScimResourceTypeSchema.parse_obj(obj)
+ return ScimResourceTypeSchema.model_validate(obj)
- _obj = ScimResourceTypeSchema.parse_obj({
+ _obj = ScimResourceTypeSchema.model_validate({
"schemas": obj.get("schemas"),
"id": obj.get("id"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/scim_user_core_dto.py b/phrasetms_client/models/scim_user_core_dto.py
index 36c0d7f1..d2daa494 100644
--- a/phrasetms_client/models/scim_user_core_dto.py
+++ b/phrasetms_client/models/scim_user_core_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.email import Email
from phrasetms_client.models.name import Name
from phrasetms_client.models.scim_meta import ScimMeta
@@ -32,18 +32,14 @@ class ScimUserCoreDto(BaseModel):
user_name: StrictStr = Field(..., alias="userName")
name: Name = Field(...)
active: Optional[StrictBool] = Field(None, description="Default: true")
- emails: conlist(Email, max_items=2147483647, min_items=1) = Field(...)
+ emails: List[Email] = Field(...)
meta: Optional[ScimMeta] = None
__properties = ["id", "userName", "name", "active", "emails", "meta"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> ScimUserCoreDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"id",
},
@@ -83,9 +79,9 @@ def from_dict(cls, obj: dict) -> ScimUserCoreDto:
return None
if not isinstance(obj, dict):
- return ScimUserCoreDto.parse_obj(obj)
+ return ScimUserCoreDto.model_validate(obj)
- _obj = ScimUserCoreDto.parse_obj({
+ _obj = ScimUserCoreDto.model_validate({
"id": obj.get("id"),
"user_name": obj.get("userName"),
"name": Name.from_dict(obj.get("name")) if obj.get("name") is not None else None,
diff --git a/phrasetms_client/models/sdl_xlf_settings_dto.py b/phrasetms_client/models/sdl_xlf_settings_dto.py
index df03fcb4..6714c578 100644
--- a/phrasetms_client/models/sdl_xlf_settings_dto.py
+++ b/phrasetms_client/models/sdl_xlf_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class SdlXlfSettingsDto(BaseModel):
"""
@@ -37,14 +37,10 @@ class SdlXlfSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["icuSubFilter", "skipImportRules", "importAsConfirmedRules", "importAsLockedRules", "exportAttrsWhenConfirmedAndLocked", "exportAttrsWhenConfirmedAndNotLocked", "exportAttrsWhenNotConfirmedAndLocked", "exportAttrsWhenNotConfirmedAndNotLocked", "saveConfirmedSegments", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> SdlXlfSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> SdlXlfSettingsDto:
return None
if not isinstance(obj, dict):
- return SdlXlfSettingsDto.parse_obj(obj)
+ return SdlXlfSettingsDto.model_validate(obj)
- _obj = SdlXlfSettingsDto.parse_obj({
+ _obj = SdlXlfSettingsDto.model_validate({
"icu_sub_filter": obj.get("icuSubFilter"),
"skip_import_rules": obj.get("skipImportRules"),
"import_as_confirmed_rules": obj.get("importAsConfirmedRules"),
diff --git a/phrasetms_client/models/search_in_text_response2_dto.py b/phrasetms_client/models/search_in_text_response2_dto.py
index 671e7e69..1332a11a 100644
--- a/phrasetms_client/models/search_in_text_response2_dto.py
+++ b/phrasetms_client/models/search_in_text_response2_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.concept_dtov2 import ConceptDtov2
from phrasetms_client.models.match import Match
from phrasetms_client.models.term_base_reference import TermBaseReference
@@ -32,19 +32,15 @@ class SearchInTextResponse2Dto(BaseModel):
term_base: Optional[TermBaseReference] = Field(None, alias="termBase")
source_term: Optional[TermV2Dto] = Field(None, alias="sourceTerm")
concept: Optional[ConceptDtov2] = None
- translation_terms: Optional[conlist(TermV2Dto)] = Field(None, alias="translationTerms")
+ translation_terms: Optional[List[TermV2Dto]] = Field(None, alias="translationTerms")
sub_term: Optional[StrictBool] = Field(None, alias="subTerm")
- matches: Optional[conlist(Match)] = None
+ matches: Optional[List[Match]] = None
__properties = ["termBase", "sourceTerm", "concept", "translationTerms", "subTerm", "matches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +53,7 @@ def from_json(cls, json_str: str) -> SearchInTextResponse2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -93,9 +89,9 @@ def from_dict(cls, obj: dict) -> SearchInTextResponse2Dto:
return None
if not isinstance(obj, dict):
- return SearchInTextResponse2Dto.parse_obj(obj)
+ return SearchInTextResponse2Dto.model_validate(obj)
- _obj = SearchInTextResponse2Dto.parse_obj({
+ _obj = SearchInTextResponse2Dto.model_validate({
"term_base": TermBaseReference.from_dict(obj.get("termBase")) if obj.get("termBase") is not None else None,
"source_term": TermV2Dto.from_dict(obj.get("sourceTerm")) if obj.get("sourceTerm") is not None else None,
"concept": ConceptDtov2.from_dict(obj.get("concept")) if obj.get("concept") is not None else None,
diff --git a/phrasetms_client/models/search_in_text_response_list2_dto.py b/phrasetms_client/models/search_in_text_response_list2_dto.py
index b7e3859a..c93616fc 100644
--- a/phrasetms_client/models/search_in_text_response_list2_dto.py
+++ b/phrasetms_client/models/search_in_text_response_list2_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.search_in_text_response2_dto import SearchInTextResponse2Dto
class SearchInTextResponseList2Dto(BaseModel):
"""
SearchInTextResponseList2Dto
"""
- search_results: Optional[conlist(SearchInTextResponse2Dto)] = Field(None, alias="searchResults")
+ search_results: Optional[List[SearchInTextResponse2Dto]] = Field(None, alias="searchResults")
__properties = ["searchResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchInTextResponseList2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SearchInTextResponseList2Dto:
return None
if not isinstance(obj, dict):
- return SearchInTextResponseList2Dto.parse_obj(obj)
+ return SearchInTextResponseList2Dto.model_validate(obj)
- _obj = SearchInTextResponseList2Dto.parse_obj({
+ _obj = SearchInTextResponseList2Dto.model_validate({
"search_results": [SearchInTextResponse2Dto.from_dict(_item) for _item in obj.get("searchResults")] if obj.get("searchResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/search_jobs_dto.py b/phrasetms_client/models/search_jobs_dto.py
index ae9db933..f36d134f 100644
--- a/phrasetms_client/models/search_jobs_dto.py
+++ b/phrasetms_client/models/search_jobs_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.job_part_extended_dto import JobPartExtendedDto
class SearchJobsDto(BaseModel):
"""
SearchJobsDto
"""
- jobs: Optional[conlist(JobPartExtendedDto)] = None
+ jobs: Optional[List[JobPartExtendedDto]] = None
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchJobsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SearchJobsDto:
return None
if not isinstance(obj, dict):
- return SearchJobsDto.parse_obj(obj)
+ return SearchJobsDto.model_validate(obj)
- _obj = SearchJobsDto.parse_obj({
+ _obj = SearchJobsDto.model_validate({
"jobs": [JobPartExtendedDto.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/search_jobs_request_dto.py b/phrasetms_client/models/search_jobs_request_dto.py
index bff5a7b7..efa547d7 100644
--- a/phrasetms_client/models/search_jobs_request_dto.py
+++ b/phrasetms_client/models/search_jobs_request_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class SearchJobsRequestDto(BaseModel):
"""
SearchJobsRequestDto
"""
- jobs: conlist(UidReference, max_items=50, min_items=1) = Field(..., description="Max: 50 records")
+ jobs: List[UidReference] = Field(..., description="Max: 50 records")
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchJobsRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SearchJobsRequestDto:
return None
if not isinstance(obj, dict):
- return SearchJobsRequestDto.parse_obj(obj)
+ return SearchJobsRequestDto.model_validate(obj)
- _obj = SearchJobsRequestDto.parse_obj({
+ _obj = SearchJobsRequestDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/search_request_dto.py b/phrasetms_client/models/search_request_dto.py
index 6fee6386..566bc91a 100644
--- a/phrasetms_client/models/search_request_dto.py
+++ b/phrasetms_client/models/search_request_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.tag_metadata_dto import TagMetadataDto
class SearchRequestDto(BaseModel):
@@ -28,22 +28,18 @@ class SearchRequestDto(BaseModel):
"""
query: StrictStr = Field(...)
source_lang: StrictStr = Field(..., alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
previous_segment: Optional[StrictStr] = Field(None, alias="previousSegment")
next_segment: Optional[StrictStr] = Field(None, alias="nextSegment")
- tag_metadata: Optional[conlist(TagMetadataDto)] = Field(None, alias="tagMetadata")
+ tag_metadata: Optional[List[TagMetadataDto]] = Field(None, alias="tagMetadata")
trim_query: Optional[StrictBool] = Field(None, alias="trimQuery", description="Remove leading and trailing whitespace from query. Default: true")
phrase_query: Optional[StrictBool] = Field(None, alias="phraseQuery", description="Return both wildcard and exact search results. Default: true")
__properties = ["query", "sourceLang", "targetLangs", "previousSegment", "nextSegment", "tagMetadata", "trimQuery", "phraseQuery"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> SearchRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> SearchRequestDto:
return None
if not isinstance(obj, dict):
- return SearchRequestDto.parse_obj(obj)
+ return SearchRequestDto.model_validate(obj)
- _obj = SearchRequestDto.parse_obj({
+ _obj = SearchRequestDto.model_validate({
"query": obj.get("query"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs"),
diff --git a/phrasetms_client/models/search_response_list_tb_dto.py b/phrasetms_client/models/search_response_list_tb_dto.py
index 22d3cea2..d0cf1aec 100644
--- a/phrasetms_client/models/search_response_list_tb_dto.py
+++ b/phrasetms_client/models/search_response_list_tb_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.search_response_tb_dto import SearchResponseTbDto
class SearchResponseListTbDto(BaseModel):
"""
SearchResponseListTbDto
"""
- search_results: Optional[conlist(SearchResponseTbDto)] = Field(None, alias="searchResults")
+ search_results: Optional[List[SearchResponseTbDto]] = Field(None, alias="searchResults")
__properties = ["searchResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchResponseListTbDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SearchResponseListTbDto:
return None
if not isinstance(obj, dict):
- return SearchResponseListTbDto.parse_obj(obj)
+ return SearchResponseListTbDto.model_validate(obj)
- _obj = SearchResponseListTbDto.parse_obj({
+ _obj = SearchResponseListTbDto.model_validate({
"search_results": [SearchResponseTbDto.from_dict(_item) for _item in obj.get("searchResults")] if obj.get("searchResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/search_response_list_tm_dto.py b/phrasetms_client/models/search_response_list_tm_dto.py
index a298fe2f..5eb20c44 100644
--- a/phrasetms_client/models/search_response_list_tm_dto.py
+++ b/phrasetms_client/models/search_response_list_tm_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.search_tm_response_dto import SearchTMResponseDto
class SearchResponseListTmDto(BaseModel):
"""
SearchResponseListTmDto
"""
- search_results: Optional[conlist(SearchTMResponseDto)] = Field(None, alias="searchResults")
+ search_results: Optional[List[SearchTMResponseDto]] = Field(None, alias="searchResults")
__properties = ["searchResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchResponseListTmDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SearchResponseListTmDto:
return None
if not isinstance(obj, dict):
- return SearchResponseListTmDto.parse_obj(obj)
+ return SearchResponseListTmDto.model_validate(obj)
- _obj = SearchResponseListTmDto.parse_obj({
+ _obj = SearchResponseListTmDto.model_validate({
"search_results": [SearchTMResponseDto.from_dict(_item) for _item in obj.get("searchResults")] if obj.get("searchResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/search_response_list_tm_dto_v3.py b/phrasetms_client/models/search_response_list_tm_dto_v3.py
index 77ea66d3..9b5590a1 100644
--- a/phrasetms_client/models/search_response_list_tm_dto_v3.py
+++ b/phrasetms_client/models/search_response_list_tm_dto_v3.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.search_tm_response_dto_v3 import SearchTMResponseDtoV3
class SearchResponseListTmDtoV3(BaseModel):
"""
SearchResponseListTmDtoV3
"""
- search_results: Optional[conlist(SearchTMResponseDtoV3)] = Field(None, alias="searchResults")
+ search_results: Optional[List[SearchTMResponseDtoV3]] = Field(None, alias="searchResults")
__properties = ["searchResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchResponseListTmDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SearchResponseListTmDtoV3:
return None
if not isinstance(obj, dict):
- return SearchResponseListTmDtoV3.parse_obj(obj)
+ return SearchResponseListTmDtoV3.model_validate(obj)
- _obj = SearchResponseListTmDtoV3.parse_obj({
+ _obj = SearchResponseListTmDtoV3.model_validate({
"search_results": [SearchTMResponseDtoV3.from_dict(_item) for _item in obj.get("searchResults")] if obj.get("searchResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/search_response_tb_dto.py b/phrasetms_client/models/search_response_tb_dto.py
index d5f7cf2d..12e88604 100644
--- a/phrasetms_client/models/search_response_tb_dto.py
+++ b/phrasetms_client/models/search_response_tb_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.term_base_dto import TermBaseDto
from phrasetms_client.models.term_dto import TermDto
@@ -30,17 +30,13 @@ class SearchResponseTbDto(BaseModel):
term_base: Optional[TermBaseDto] = Field(None, alias="termBase")
concept_id: Optional[StrictStr] = Field(None, alias="conceptId")
source_term: Optional[TermDto] = Field(None, alias="sourceTerm")
- translation_terms: Optional[conlist(TermDto)] = Field(None, alias="translationTerms")
+ translation_terms: Optional[List[TermDto]] = Field(None, alias="translationTerms")
__properties = ["termBase", "conceptId", "sourceTerm", "translationTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> SearchResponseTbDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +75,9 @@ def from_dict(cls, obj: dict) -> SearchResponseTbDto:
return None
if not isinstance(obj, dict):
- return SearchResponseTbDto.parse_obj(obj)
+ return SearchResponseTbDto.model_validate(obj)
- _obj = SearchResponseTbDto.parse_obj({
+ _obj = SearchResponseTbDto.model_validate({
"term_base": TermBaseDto.from_dict(obj.get("termBase")) if obj.get("termBase") is not None else None,
"concept_id": obj.get("conceptId"),
"source_term": TermDto.from_dict(obj.get("sourceTerm")) if obj.get("sourceTerm") is not None else None,
diff --git a/phrasetms_client/models/search_tb_by_job_request_dto.py b/phrasetms_client/models/search_tb_by_job_request_dto.py
index 24142b77..919e7972 100644
--- a/phrasetms_client/models/search_tb_by_job_request_dto.py
+++ b/phrasetms_client/models/search_tb_by_job_request_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class SearchTbByJobRequestDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class SearchTbByJobRequestDto(BaseModel):
reverse: Optional[StrictBool] = Field(None, description="Default: false")
__properties = ["query", "count", "offset", "reverse"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> SearchTbByJobRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> SearchTbByJobRequestDto:
return None
if not isinstance(obj, dict):
- return SearchTbByJobRequestDto.parse_obj(obj)
+ return SearchTbByJobRequestDto.model_validate(obj)
- _obj = SearchTbByJobRequestDto.parse_obj({
+ _obj = SearchTbByJobRequestDto.model_validate({
"query": obj.get("query"),
"count": obj.get("count"),
"offset": obj.get("offset"),
diff --git a/phrasetms_client/models/search_tb_in_text_by_job_request_dto.py b/phrasetms_client/models/search_tb_in_text_by_job_request_dto.py
index d389ee9c..979cf0a7 100644
--- a/phrasetms_client/models/search_tb_in_text_by_job_request_dto.py
+++ b/phrasetms_client/models/search_tb_in_text_by_job_request_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class SearchTbInTextByJobRequestDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class SearchTbInTextByJobRequestDto(BaseModel):
zero_length_separator: Optional[StrictStr] = Field(None, alias="zeroLengthSeparator")
__properties = ["text", "reverse", "zeroLengthSeparator"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SearchTbInTextByJobRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> SearchTbInTextByJobRequestDto:
return None
if not isinstance(obj, dict):
- return SearchTbInTextByJobRequestDto.parse_obj(obj)
+ return SearchTbInTextByJobRequestDto.model_validate(obj)
- _obj = SearchTbInTextByJobRequestDto.parse_obj({
+ _obj = SearchTbInTextByJobRequestDto.model_validate({
"text": obj.get("text"),
"reverse": obj.get("reverse"),
"zero_length_separator": obj.get("zeroLengthSeparator")
diff --git a/phrasetms_client/models/search_tb_response_dto.py b/phrasetms_client/models/search_tb_response_dto.py
index e4936024..a86d0e2f 100644
--- a/phrasetms_client/models/search_tb_response_dto.py
+++ b/phrasetms_client/models/search_tb_response_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.concept_dtov2 import ConceptDtov2
from phrasetms_client.models.term_base_reference import TermBaseReference
from phrasetms_client.models.term_v2_dto import TermV2Dto
@@ -31,17 +31,13 @@ class SearchTbResponseDto(BaseModel):
term_base: Optional[TermBaseReference] = Field(None, alias="termBase")
concept: Optional[ConceptDtov2] = None
source_term: Optional[TermV2Dto] = Field(None, alias="sourceTerm")
- translation_terms: Optional[conlist(TermV2Dto)] = Field(None, alias="translationTerms")
+ translation_terms: Optional[List[TermV2Dto]] = Field(None, alias="translationTerms")
__properties = ["termBase", "concept", "sourceTerm", "translationTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> SearchTbResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -83,9 +79,9 @@ def from_dict(cls, obj: dict) -> SearchTbResponseDto:
return None
if not isinstance(obj, dict):
- return SearchTbResponseDto.parse_obj(obj)
+ return SearchTbResponseDto.model_validate(obj)
- _obj = SearchTbResponseDto.parse_obj({
+ _obj = SearchTbResponseDto.model_validate({
"term_base": TermBaseReference.from_dict(obj.get("termBase")) if obj.get("termBase") is not None else None,
"concept": ConceptDtov2.from_dict(obj.get("concept")) if obj.get("concept") is not None else None,
"source_term": TermV2Dto.from_dict(obj.get("sourceTerm")) if obj.get("sourceTerm") is not None else None,
diff --git a/phrasetms_client/models/search_tb_response_list_dto.py b/phrasetms_client/models/search_tb_response_list_dto.py
index f8b0b2b4..18026534 100644
--- a/phrasetms_client/models/search_tb_response_list_dto.py
+++ b/phrasetms_client/models/search_tb_response_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.search_tb_response_dto import SearchTbResponseDto
class SearchTbResponseListDto(BaseModel):
"""
SearchTbResponseListDto
"""
- search_results: Optional[conlist(SearchTbResponseDto)] = Field(None, alias="searchResults")
+ search_results: Optional[List[SearchTbResponseDto]] = Field(None, alias="searchResults")
__properties = ["searchResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchTbResponseListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SearchTbResponseListDto:
return None
if not isinstance(obj, dict):
- return SearchTbResponseListDto.parse_obj(obj)
+ return SearchTbResponseListDto.model_validate(obj)
- _obj = SearchTbResponseListDto.parse_obj({
+ _obj = SearchTbResponseListDto.model_validate({
"search_results": [SearchTbResponseDto.from_dict(_item) for _item in obj.get("searchResults")] if obj.get("searchResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/search_tm_client_dto.py b/phrasetms_client/models/search_tm_client_dto.py
index 57e2684a..5413ba2f 100644
--- a/phrasetms_client/models/search_tm_client_dto.py
+++ b/phrasetms_client/models/search_tm_client_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMClientDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class SearchTMClientDto(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchTMClientDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SearchTMClientDto:
return None
if not isinstance(obj, dict):
- return SearchTMClientDto.parse_obj(obj)
+ return SearchTMClientDto.model_validate(obj)
- _obj = SearchTMClientDto.parse_obj({
+ _obj = SearchTMClientDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/search_tm_client_dto_v3.py b/phrasetms_client/models/search_tm_client_dto_v3.py
index 4a34e46f..b2fafee4 100644
--- a/phrasetms_client/models/search_tm_client_dto_v3.py
+++ b/phrasetms_client/models/search_tm_client_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMClientDtoV3(BaseModel):
"""
@@ -29,14 +29,10 @@ class SearchTMClientDtoV3(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchTMClientDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SearchTMClientDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMClientDtoV3.parse_obj(obj)
+ return SearchTMClientDtoV3.model_validate(obj)
- _obj = SearchTMClientDtoV3.parse_obj({
+ _obj = SearchTMClientDtoV3.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/search_tm_domain_dto.py b/phrasetms_client/models/search_tm_domain_dto.py
index 4c4b839b..fd0fb632 100644
--- a/phrasetms_client/models/search_tm_domain_dto.py
+++ b/phrasetms_client/models/search_tm_domain_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMDomainDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class SearchTMDomainDto(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchTMDomainDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SearchTMDomainDto:
return None
if not isinstance(obj, dict):
- return SearchTMDomainDto.parse_obj(obj)
+ return SearchTMDomainDto.model_validate(obj)
- _obj = SearchTMDomainDto.parse_obj({
+ _obj = SearchTMDomainDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/search_tm_domain_dto_v3.py b/phrasetms_client/models/search_tm_domain_dto_v3.py
index 350af1a5..8de23eb3 100644
--- a/phrasetms_client/models/search_tm_domain_dto_v3.py
+++ b/phrasetms_client/models/search_tm_domain_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMDomainDtoV3(BaseModel):
"""
@@ -29,14 +29,10 @@ class SearchTMDomainDtoV3(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchTMDomainDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SearchTMDomainDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMDomainDtoV3.parse_obj(obj)
+ return SearchTMDomainDtoV3.model_validate(obj)
- _obj = SearchTMDomainDtoV3.parse_obj({
+ _obj = SearchTMDomainDtoV3.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/search_tm_project_dto.py b/phrasetms_client/models/search_tm_project_dto.py
index 5af76239..c9c4d8e0 100644
--- a/phrasetms_client/models/search_tm_project_dto.py
+++ b/phrasetms_client/models/search_tm_project_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMProjectDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class SearchTMProjectDto(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "uid", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SearchTMProjectDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> SearchTMProjectDto:
return None
if not isinstance(obj, dict):
- return SearchTMProjectDto.parse_obj(obj)
+ return SearchTMProjectDto.model_validate(obj)
- _obj = SearchTMProjectDto.parse_obj({
+ _obj = SearchTMProjectDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name")
diff --git a/phrasetms_client/models/search_tm_project_dto_v3.py b/phrasetms_client/models/search_tm_project_dto_v3.py
index b72e2a80..abe99093 100644
--- a/phrasetms_client/models/search_tm_project_dto_v3.py
+++ b/phrasetms_client/models/search_tm_project_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMProjectDtoV3(BaseModel):
"""
@@ -30,14 +30,10 @@ class SearchTMProjectDtoV3(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "uid", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SearchTMProjectDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> SearchTMProjectDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMProjectDtoV3.parse_obj(obj)
+ return SearchTMProjectDtoV3.model_validate(obj)
- _obj = SearchTMProjectDtoV3.parse_obj({
+ _obj = SearchTMProjectDtoV3.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name")
diff --git a/phrasetms_client/models/search_tm_request_dto.py b/phrasetms_client/models/search_tm_request_dto.py
index 103967d6..de27aee9 100644
--- a/phrasetms_client/models/search_tm_request_dto.py
+++ b/phrasetms_client/models/search_tm_request_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictStr, confloat, conint, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.tag_metadata_dto import TagMetadataDto
class SearchTMRequestDto(BaseModel):
@@ -27,25 +28,21 @@ class SearchTMRequestDto(BaseModel):
SearchTMRequestDto
"""
segment: StrictStr = Field(...)
- workflow_level: Optional[conint(strict=True, le=15, ge=1)] = Field(None, alias="workflowLevel")
- score_threshold: Optional[Union[confloat(le=1.01, ge=0, strict=True), conint(le=1, ge=0, strict=True)]] = Field(None, alias="scoreThreshold")
+ workflow_level: Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = Field(None, alias="workflowLevel")
+ score_threshold: Optional[Union[Annotated[float, Field(le=1.01, ge=0, strict=True)], Annotated[int, Field(le=1, ge=0, strict=True)]]] = Field(None, alias="scoreThreshold")
previous_segment: Optional[StrictStr] = Field(None, alias="previousSegment")
next_segment: Optional[StrictStr] = Field(None, alias="nextSegment")
context_key: Optional[StrictStr] = Field(None, alias="contextKey")
- max_segments: Optional[conint(strict=True, le=5, ge=0)] = Field(None, alias="maxSegments", description="Default: 5")
- max_sub_segments: Optional[conint(strict=True, le=5, ge=0)] = Field(None, alias="maxSubSegments", description="Default: 5")
- tag_metadata: Optional[conlist(TagMetadataDto)] = Field(None, alias="tagMetadata")
- target_langs: conlist(StrictStr, max_items=2147483647, min_items=1) = Field(..., alias="targetLangs")
+ max_segments: Optional[Annotated[int, Field(strict=True, le=5, ge=0)]] = Field(None, alias="maxSegments", description="Default: 5")
+ max_sub_segments: Optional[Annotated[int, Field(strict=True, le=5, ge=0)]] = Field(None, alias="maxSubSegments", description="Default: 5")
+ tag_metadata: Optional[List[TagMetadataDto]] = Field(None, alias="tagMetadata")
+ target_langs: List[StrictStr] = Field(..., alias="targetLangs")
__properties = ["segment", "workflowLevel", "scoreThreshold", "previousSegment", "nextSegment", "contextKey", "maxSegments", "maxSubSegments", "tagMetadata", "targetLangs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +55,7 @@ def from_json(cls, json_str: str) -> SearchTMRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +75,9 @@ def from_dict(cls, obj: dict) -> SearchTMRequestDto:
return None
if not isinstance(obj, dict):
- return SearchTMRequestDto.parse_obj(obj)
+ return SearchTMRequestDto.model_validate(obj)
- _obj = SearchTMRequestDto.parse_obj({
+ _obj = SearchTMRequestDto.model_validate({
"segment": obj.get("segment"),
"workflow_level": obj.get("workflowLevel"),
"score_threshold": obj.get("scoreThreshold"),
diff --git a/phrasetms_client/models/search_tm_response_dto.py b/phrasetms_client/models/search_tm_response_dto.py
index 233faf3e..4c018756 100644
--- a/phrasetms_client/models/search_tm_response_dto.py
+++ b/phrasetms_client/models/search_tm_response_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.search_tm_segment_dto import SearchTMSegmentDto
from phrasetms_client.models.search_tm_trans_memory_dto import SearchTMTransMemoryDto
@@ -29,21 +29,17 @@ class SearchTMResponseDto(BaseModel):
"""
segment_id: Optional[StrictStr] = Field(None, alias="segmentId")
source: Optional[SearchTMSegmentDto] = None
- translations: Optional[conlist(SearchTMSegmentDto)] = None
+ translations: Optional[List[SearchTMSegmentDto]] = None
trans_memory: Optional[SearchTMTransMemoryDto] = Field(None, alias="transMemory")
gross_score: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="grossScore")
score: Optional[Union[StrictFloat, StrictInt]] = None
sub_segment: Optional[StrictBool] = Field(None, alias="subSegment")
__properties = ["segmentId", "source", "translations", "transMemory", "grossScore", "score", "subSegment"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> SearchTMResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> SearchTMResponseDto:
return None
if not isinstance(obj, dict):
- return SearchTMResponseDto.parse_obj(obj)
+ return SearchTMResponseDto.model_validate(obj)
- _obj = SearchTMResponseDto.parse_obj({
+ _obj = SearchTMResponseDto.model_validate({
"segment_id": obj.get("segmentId"),
"source": SearchTMSegmentDto.from_dict(obj.get("source")) if obj.get("source") is not None else None,
"translations": [SearchTMSegmentDto.from_dict(_item) for _item in obj.get("translations")] if obj.get("translations") is not None else None,
diff --git a/phrasetms_client/models/search_tm_response_dto_v3.py b/phrasetms_client/models/search_tm_response_dto_v3.py
index e64e62ee..3de12cf7 100644
--- a/phrasetms_client/models/search_tm_response_dto_v3.py
+++ b/phrasetms_client/models/search_tm_response_dto_v3.py
@@ -19,7 +19,7 @@
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.search_tm_segment_dto_v3 import SearchTMSegmentDtoV3
from phrasetms_client.models.search_tm_trans_memory_dto_v3 import SearchTMTransMemoryDtoV3
@@ -29,21 +29,17 @@ class SearchTMResponseDtoV3(BaseModel):
"""
segment_id: Optional[StrictStr] = Field(None, alias="segmentId")
source: Optional[SearchTMSegmentDtoV3] = None
- translations: Optional[conlist(SearchTMSegmentDtoV3)] = None
+ translations: Optional[List[SearchTMSegmentDtoV3]] = None
trans_memory: Optional[SearchTMTransMemoryDtoV3] = Field(None, alias="transMemory")
gross_score: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="grossScore")
score: Optional[Union[StrictFloat, StrictInt]] = None
sub_segment: Optional[StrictBool] = Field(None, alias="subSegment")
__properties = ["segmentId", "source", "translations", "transMemory", "grossScore", "score", "subSegment"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> SearchTMResponseDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> SearchTMResponseDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMResponseDtoV3.parse_obj(obj)
+ return SearchTMResponseDtoV3.model_validate(obj)
- _obj = SearchTMResponseDtoV3.parse_obj({
+ _obj = SearchTMResponseDtoV3.model_validate({
"segment_id": obj.get("segmentId"),
"source": SearchTMSegmentDtoV3.from_dict(obj.get("source")) if obj.get("source") is not None else None,
"translations": [SearchTMSegmentDtoV3.from_dict(_item) for _item in obj.get("translations")] if obj.get("translations") is not None else None,
diff --git a/phrasetms_client/models/search_tm_segment_dto.py b/phrasetms_client/models/search_tm_segment_dto.py
index 19c8f7d9..ca5769d4 100644
--- a/phrasetms_client/models/search_tm_segment_dto.py
+++ b/phrasetms_client/models/search_tm_segment_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.search_tm_client_dto import SearchTMClientDto
from phrasetms_client.models.search_tm_domain_dto import SearchTMDomainDto
from phrasetms_client.models.search_tm_project_dto import SearchTMProjectDto
@@ -44,20 +44,16 @@ class SearchTMSegmentDto(BaseModel):
client: Optional[SearchTMClientDto] = None
domain: Optional[SearchTMDomainDto] = None
sub_domain: Optional[SearchTMSubDomainDto] = Field(None, alias="subDomain")
- tag_metadata: Optional[conlist(TagMetadata)] = Field(None, alias="tagMetadata")
+ tag_metadata: Optional[List[TagMetadata]] = Field(None, alias="tagMetadata")
previous_segment: Optional[StrictStr] = Field(None, alias="previousSegment")
next_segment: Optional[StrictStr] = Field(None, alias="nextSegment")
key: Optional[StrictStr] = None
__properties = ["id", "text", "lang", "rtl", "modifiedAt", "createdAt", "modifiedBy", "createdBy", "filename", "project", "client", "domain", "subDomain", "tagMetadata", "previousSegment", "nextSegment", "key"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -70,7 +66,7 @@ def from_json(cls, json_str: str) -> SearchTMSegmentDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -108,9 +104,9 @@ def from_dict(cls, obj: dict) -> SearchTMSegmentDto:
return None
if not isinstance(obj, dict):
- return SearchTMSegmentDto.parse_obj(obj)
+ return SearchTMSegmentDto.model_validate(obj)
- _obj = SearchTMSegmentDto.parse_obj({
+ _obj = SearchTMSegmentDto.model_validate({
"id": obj.get("id"),
"text": obj.get("text"),
"lang": obj.get("lang"),
diff --git a/phrasetms_client/models/search_tm_segment_dto_v3.py b/phrasetms_client/models/search_tm_segment_dto_v3.py
index 4e9bdc96..59e00fec 100644
--- a/phrasetms_client/models/search_tm_segment_dto_v3.py
+++ b/phrasetms_client/models/search_tm_segment_dto_v3.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.search_tm_client_dto_v3 import SearchTMClientDtoV3
from phrasetms_client.models.search_tm_domain_dto_v3 import SearchTMDomainDtoV3
from phrasetms_client.models.search_tm_project_dto_v3 import SearchTMProjectDtoV3
@@ -44,21 +44,17 @@ class SearchTMSegmentDtoV3(BaseModel):
client: Optional[SearchTMClientDtoV3] = None
domain: Optional[SearchTMDomainDtoV3] = None
sub_domain: Optional[SearchTMSubDomainDtoV3] = Field(None, alias="subDomain")
- tag_metadata: Optional[conlist(TagMetadata)] = Field(None, alias="tagMetadata")
+ tag_metadata: Optional[List[TagMetadata]] = Field(None, alias="tagMetadata")
previous_segment: Optional[StrictStr] = Field(None, alias="previousSegment")
next_segment: Optional[StrictStr] = Field(None, alias="nextSegment")
key: Optional[StrictStr] = None
target_note: Optional[StrictStr] = Field(None, alias="targetNote")
__properties = ["id", "text", "lang", "rtl", "modifiedAt", "createdAt", "modifiedBy", "createdBy", "filename", "project", "client", "domain", "subDomain", "tagMetadata", "previousSegment", "nextSegment", "key", "targetNote"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -71,7 +67,7 @@ def from_json(cls, json_str: str) -> SearchTMSegmentDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -109,9 +105,9 @@ def from_dict(cls, obj: dict) -> SearchTMSegmentDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMSegmentDtoV3.parse_obj(obj)
+ return SearchTMSegmentDtoV3.model_validate(obj)
- _obj = SearchTMSegmentDtoV3.parse_obj({
+ _obj = SearchTMSegmentDtoV3.model_validate({
"id": obj.get("id"),
"text": obj.get("text"),
"lang": obj.get("lang"),
diff --git a/phrasetms_client/models/search_tm_sub_domain_dto.py b/phrasetms_client/models/search_tm_sub_domain_dto.py
index ddae6a74..bd9ac604 100644
--- a/phrasetms_client/models/search_tm_sub_domain_dto.py
+++ b/phrasetms_client/models/search_tm_sub_domain_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMSubDomainDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class SearchTMSubDomainDto(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchTMSubDomainDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SearchTMSubDomainDto:
return None
if not isinstance(obj, dict):
- return SearchTMSubDomainDto.parse_obj(obj)
+ return SearchTMSubDomainDto.model_validate(obj)
- _obj = SearchTMSubDomainDto.parse_obj({
+ _obj = SearchTMSubDomainDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/search_tm_sub_domain_dto_v3.py b/phrasetms_client/models/search_tm_sub_domain_dto_v3.py
index fb3ed5d2..a65076c0 100644
--- a/phrasetms_client/models/search_tm_sub_domain_dto_v3.py
+++ b/phrasetms_client/models/search_tm_sub_domain_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class SearchTMSubDomainDtoV3(BaseModel):
"""
@@ -29,14 +29,10 @@ class SearchTMSubDomainDtoV3(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SearchTMSubDomainDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SearchTMSubDomainDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMSubDomainDtoV3.parse_obj(obj)
+ return SearchTMSubDomainDtoV3.model_validate(obj)
- _obj = SearchTMSubDomainDtoV3.parse_obj({
+ _obj = SearchTMSubDomainDtoV3.model_validate({
"id": obj.get("id"),
"name": obj.get("name")
})
diff --git a/phrasetms_client/models/search_tm_trans_memory_dto.py b/phrasetms_client/models/search_tm_trans_memory_dto.py
index 2c0d2865..6d2d5b66 100644
--- a/phrasetms_client/models/search_tm_trans_memory_dto.py
+++ b/phrasetms_client/models/search_tm_trans_memory_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
class SearchTMTransMemoryDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class SearchTMTransMemoryDto(BaseModel):
reverse: Optional[StrictBool] = None
__properties = ["uid", "id", "name", "reverse"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> SearchTMTransMemoryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> SearchTMTransMemoryDto:
return None
if not isinstance(obj, dict):
- return SearchTMTransMemoryDto.parse_obj(obj)
+ return SearchTMTransMemoryDto.model_validate(obj)
- _obj = SearchTMTransMemoryDto.parse_obj({
+ _obj = SearchTMTransMemoryDto.model_validate({
"uid": obj.get("uid"),
"id": obj.get("id"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/search_tm_trans_memory_dto_v3.py b/phrasetms_client/models/search_tm_trans_memory_dto_v3.py
index 686bca3c..971fd22e 100644
--- a/phrasetms_client/models/search_tm_trans_memory_dto_v3.py
+++ b/phrasetms_client/models/search_tm_trans_memory_dto_v3.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
class SearchTMTransMemoryDtoV3(BaseModel):
"""
@@ -31,14 +31,10 @@ class SearchTMTransMemoryDtoV3(BaseModel):
reverse: Optional[StrictBool] = None
__properties = ["uid", "id", "name", "reverse"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> SearchTMTransMemoryDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> SearchTMTransMemoryDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMTransMemoryDtoV3.parse_obj(obj)
+ return SearchTMTransMemoryDtoV3.model_validate(obj)
- _obj = SearchTMTransMemoryDtoV3.parse_obj({
+ _obj = SearchTMTransMemoryDtoV3.model_validate({
"uid": obj.get("uid"),
"id": obj.get("id"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/search_tmby_job_request_dto.py b/phrasetms_client/models/search_tmby_job_request_dto.py
index 3bf9e83e..18a19612 100644
--- a/phrasetms_client/models/search_tmby_job_request_dto.py
+++ b/phrasetms_client/models/search_tmby_job_request_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictStr, confloat, conint, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.tag_metadata_dto import TagMetadataDto
class SearchTMByJobRequestDto(BaseModel):
@@ -27,24 +28,20 @@ class SearchTMByJobRequestDto(BaseModel):
SearchTMByJobRequestDto
"""
segment: StrictStr = Field(...)
- workflow_level: Optional[conint(strict=True, le=15, ge=1)] = Field(None, alias="workflowLevel")
- score_threshold: Optional[Union[confloat(le=1.01, ge=0, strict=True), conint(le=1, ge=0, strict=True)]] = Field(None, alias="scoreThreshold")
+ workflow_level: Optional[Annotated[int, Field(strict=True, le=15, ge=1)]] = Field(None, alias="workflowLevel")
+ score_threshold: Optional[Union[Annotated[float, Field(le=1.01, ge=0, strict=True)], Annotated[int, Field(le=1, ge=0, strict=True)]]] = Field(None, alias="scoreThreshold")
previous_segment: Optional[StrictStr] = Field(None, alias="previousSegment")
next_segment: Optional[StrictStr] = Field(None, alias="nextSegment")
context_key: Optional[StrictStr] = Field(None, alias="contextKey")
- max_segments: Optional[conint(strict=True, le=5, ge=0)] = Field(None, alias="maxSegments", description="Default: 5")
- max_sub_segments: Optional[conint(strict=True, le=5, ge=0)] = Field(None, alias="maxSubSegments", description="Default: 5")
- tag_metadata: Optional[conlist(TagMetadataDto)] = Field(None, alias="tagMetadata")
+ max_segments: Optional[Annotated[int, Field(strict=True, le=5, ge=0)]] = Field(None, alias="maxSegments", description="Default: 5")
+ max_sub_segments: Optional[Annotated[int, Field(strict=True, le=5, ge=0)]] = Field(None, alias="maxSubSegments", description="Default: 5")
+ tag_metadata: Optional[List[TagMetadataDto]] = Field(None, alias="tagMetadata")
__properties = ["segment", "workflowLevel", "scoreThreshold", "previousSegment", "nextSegment", "contextKey", "maxSegments", "maxSubSegments", "tagMetadata"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -57,7 +54,7 @@ def from_json(cls, json_str: str) -> SearchTMByJobRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +74,9 @@ def from_dict(cls, obj: dict) -> SearchTMByJobRequestDto:
return None
if not isinstance(obj, dict):
- return SearchTMByJobRequestDto.parse_obj(obj)
+ return SearchTMByJobRequestDto.model_validate(obj)
- _obj = SearchTMByJobRequestDto.parse_obj({
+ _obj = SearchTMByJobRequestDto.model_validate({
"segment": obj.get("segment"),
"workflow_level": obj.get("workflowLevel"),
"score_threshold": obj.get("scoreThreshold"),
diff --git a/phrasetms_client/models/search_tmby_job_request_dto_v3.py b/phrasetms_client/models/search_tmby_job_request_dto_v3.py
index 9e7fe92f..fcc3a9fc 100644
--- a/phrasetms_client/models/search_tmby_job_request_dto_v3.py
+++ b/phrasetms_client/models/search_tmby_job_request_dto_v3.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictStr, confloat, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class SearchTMByJobRequestDtoV3(BaseModel):
"""
@@ -27,18 +28,14 @@ class SearchTMByJobRequestDtoV3(BaseModel):
"""
query: StrictStr = Field(...)
reverse: Optional[StrictBool] = Field(None, description="Default: false")
- score_threshold: Optional[Union[confloat(le=1.01, ge=0, strict=True), conint(le=1, ge=0, strict=True)]] = Field(None, alias="scoreThreshold", description="Default: 0.0")
- max_results: Optional[conint(strict=True, le=100, ge=1)] = Field(None, alias="maxResults", description="Default: 15")
+ score_threshold: Optional[Union[Annotated[float, Field(le=1.01, ge=0, strict=True)], Annotated[int, Field(le=1, ge=0, strict=True)]]] = Field(None, alias="scoreThreshold", description="Default: 0.0")
+ max_results: Optional[Annotated[int, Field(strict=True, le=100, ge=1)]] = Field(None, alias="maxResults", description="Default: 15")
__properties = ["query", "reverse", "scoreThreshold", "maxResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +48,7 @@ def from_json(cls, json_str: str) -> SearchTMByJobRequestDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +61,9 @@ def from_dict(cls, obj: dict) -> SearchTMByJobRequestDtoV3:
return None
if not isinstance(obj, dict):
- return SearchTMByJobRequestDtoV3.parse_obj(obj)
+ return SearchTMByJobRequestDtoV3.model_validate(obj)
- _obj = SearchTMByJobRequestDtoV3.parse_obj({
+ _obj = SearchTMByJobRequestDtoV3.model_validate({
"query": obj.get("query"),
"reverse": obj.get("reverse"),
"score_threshold": obj.get("scoreThreshold"),
diff --git a/phrasetms_client/models/seg_rule_reference.py b/phrasetms_client/models/seg_rule_reference.py
index 4051c302..38026216 100644
--- a/phrasetms_client/models/seg_rule_reference.py
+++ b/phrasetms_client/models/seg_rule_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
class SegRuleReference(BaseModel):
"""
@@ -33,14 +33,10 @@ class SegRuleReference(BaseModel):
primary: Optional[StrictBool] = None
__properties = ["id", "uid", "language", "name", "filename", "primary"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> SegRuleReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> SegRuleReference:
return None
if not isinstance(obj, dict):
- return SegRuleReference.parse_obj(obj)
+ return SegRuleReference.model_validate(obj)
- _obj = SegRuleReference.parse_obj({
+ _obj = SegRuleReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"language": obj.get("language"),
diff --git a/phrasetms_client/models/segment_dto.py b/phrasetms_client/models/segment_dto.py
index a7c8465f..579282ea 100644
--- a/phrasetms_client/models/segment_dto.py
+++ b/phrasetms_client/models/segment_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.tag_metadata_dto import TagMetadataDto
class SegmentDto(BaseModel):
@@ -31,18 +31,14 @@ class SegmentDto(BaseModel):
target_segment: StrictStr = Field(..., alias="targetSegment")
previous_source_segment: Optional[StrictStr] = Field(None, alias="previousSourceSegment")
next_source_segment: Optional[StrictStr] = Field(None, alias="nextSourceSegment")
- source_tag_metadata: Optional[conlist(TagMetadataDto)] = Field(None, alias="sourceTagMetadata")
- target_tag_metadata: Optional[conlist(TagMetadataDto)] = Field(None, alias="targetTagMetadata")
+ source_tag_metadata: Optional[List[TagMetadataDto]] = Field(None, alias="sourceTagMetadata")
+ target_tag_metadata: Optional[List[TagMetadataDto]] = Field(None, alias="targetTagMetadata")
__properties = ["targetLang", "sourceSegment", "targetSegment", "previousSourceSegment", "nextSourceSegment", "sourceTagMetadata", "targetTagMetadata"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> SegmentDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> SegmentDto:
return None
if not isinstance(obj, dict):
- return SegmentDto.parse_obj(obj)
+ return SegmentDto.model_validate(obj)
- _obj = SegmentDto.parse_obj({
+ _obj = SegmentDto.model_validate({
"target_lang": obj.get("targetLang"),
"source_segment": obj.get("sourceSegment"),
"target_segment": obj.get("targetSegment"),
diff --git a/phrasetms_client/models/segment_list_dto.py b/phrasetms_client/models/segment_list_dto.py
index b31e8aee..fed9f798 100644
--- a/phrasetms_client/models/segment_list_dto.py
+++ b/phrasetms_client/models/segment_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.job_segment_dto import JobSegmentDto
class SegmentListDto(BaseModel):
"""
SegmentListDto
"""
- segments: Optional[conlist(JobSegmentDto)] = None
+ segments: Optional[List[JobSegmentDto]] = None
__properties = ["segments"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SegmentListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SegmentListDto:
return None
if not isinstance(obj, dict):
- return SegmentListDto.parse_obj(obj)
+ return SegmentListDto.model_validate(obj)
- _obj = SegmentListDto.parse_obj({
+ _obj = SegmentListDto.model_validate({
"segments": [JobSegmentDto.from_dict(_item) for _item in obj.get("segments")] if obj.get("segments") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/segment_reference.py b/phrasetms_client/models/segment_reference.py
index a0b07291..525d1c7d 100644
--- a/phrasetms_client/models/segment_reference.py
+++ b/phrasetms_client/models/segment_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class SegmentReference(BaseModel):
"""
@@ -28,14 +28,10 @@ class SegmentReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> SegmentReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> SegmentReference:
return None
if not isinstance(obj, dict):
- return SegmentReference.parse_obj(obj)
+ return SegmentReference.model_validate(obj)
- _obj = SegmentReference.parse_obj({
+ _obj = SegmentReference.model_validate({
"uid": obj.get("uid")
})
return _obj
diff --git a/phrasetms_client/models/segment_warning.py b/phrasetms_client/models/segment_warning.py
index ee34169b..a3c6ef29 100644
--- a/phrasetms_client/models/segment_warning.py
+++ b/phrasetms_client/models/segment_warning.py
@@ -20,7 +20,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class SegmentWarning(BaseModel):
"""
@@ -32,11 +32,7 @@ class SegmentWarning(BaseModel):
repetition_group_id: Optional[StrictStr] = Field(None, alias="repetitionGroupId")
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'type'
@@ -95,7 +91,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -108,7 +104,7 @@ def from_json(cls, json_str: str) -> Union(AbsoluteTranslationLengthWarningDto,
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/segment_warnings_dto.py b/phrasetms_client/models/segment_warnings_dto.py
index 90bd469d..b8287e16 100644
--- a/phrasetms_client/models/segment_warnings_dto.py
+++ b/phrasetms_client/models/segment_warnings_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class SegmentWarningsDto(BaseModel):
@@ -27,18 +27,14 @@ class SegmentWarningsDto(BaseModel):
SegmentWarningsDto
"""
segment_id: Optional[StrictStr] = Field(None, alias="segmentId")
- warnings: Optional[conlist(SegmentWarning)] = None
- ignored_checks: Optional[conlist(StrictStr)] = Field(None, alias="ignoredChecks")
+ warnings: Optional[List[SegmentWarning]] = None
+ ignored_checks: Optional[List[StrictStr]] = Field(None, alias="ignoredChecks")
__properties = ["segmentId", "warnings", "ignoredChecks"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> SegmentWarningsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> SegmentWarningsDto:
return None
if not isinstance(obj, dict):
- return SegmentWarningsDto.parse_obj(obj)
+ return SegmentWarningsDto.model_validate(obj)
- _obj = SegmentWarningsDto.parse_obj({
+ _obj = SegmentWarningsDto.model_validate({
"segment_id": obj.get("segmentId"),
"warnings": [SegmentWarning.from_dict(_item) for _item in obj.get("warnings")] if obj.get("warnings") is not None else None,
"ignored_checks": obj.get("ignoredChecks")
diff --git a/phrasetms_client/models/segmentation_rule_dto.py b/phrasetms_client/models/segmentation_rule_dto.py
index b958c0f0..0cfac78e 100644
--- a/phrasetms_client/models/segmentation_rule_dto.py
+++ b/phrasetms_client/models/segmentation_rule_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.user_reference import UserReference
class SegmentationRuleDto(BaseModel):
@@ -36,14 +36,10 @@ class SegmentationRuleDto(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "locale", "primary", "filename", "dateCreated", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> SegmentationRuleDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"id",
"uid",
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> SegmentationRuleDto:
return None
if not isinstance(obj, dict):
- return SegmentationRuleDto.parse_obj(obj)
+ return SegmentationRuleDto.model_validate(obj)
- _obj = SegmentationRuleDto.parse_obj({
+ _obj = SegmentationRuleDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/segmentation_rule_reference.py b/phrasetms_client/models/segmentation_rule_reference.py
index 73994950..0057d8bc 100644
--- a/phrasetms_client/models/segmentation_rule_reference.py
+++ b/phrasetms_client/models/segmentation_rule_reference.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class SegmentationRuleReference(BaseModel):
"""
@@ -34,14 +34,10 @@ class SegmentationRuleReference(BaseModel):
date_created: Optional[datetime] = Field(None, alias="dateCreated")
__properties = ["id", "uid", "name", "locale", "primary", "filename", "dateCreated"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> SegmentationRuleReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"id",
"uid",
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> SegmentationRuleReference:
return None
if not isinstance(obj, dict):
- return SegmentationRuleReference.parse_obj(obj)
+ return SegmentationRuleReference.model_validate(obj)
- _obj = SegmentationRuleReference.parse_obj({
+ _obj = SegmentationRuleReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/segments_counts_dto.py b/phrasetms_client/models/segments_counts_dto.py
index 99db8619..9085db34 100644
--- a/phrasetms_client/models/segments_counts_dto.py
+++ b/phrasetms_client/models/segments_counts_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt
from phrasetms_client.models.quality_assurance_dto import QualityAssuranceDto
class SegmentsCountsDto(BaseModel):
@@ -51,14 +51,10 @@ class SegmentsCountsDto(BaseModel):
quality_assurance_resolved: Optional[StrictBool] = Field(None, alias="qualityAssuranceResolved")
__properties = ["allConfirmed", "charsCount", "completedCharsCount", "confirmedCharsCount", "confirmedLockedCharsCount", "lockedCharsCount", "segmentsCount", "completedSegmentsCount", "lockedSegmentsCount", "segmentGroupsCount", "translatedSegmentsCount", "translatedLockedSegmentsCount", "wordsCount", "completedWordsCount", "confirmedWordsCount", "confirmedLockedWordsCount", "lockedWordsCount", "addedSegments", "addedWords", "machineTranslationPostEditedSegmentsCount", "machineTranslationRelevantSegmentsCount", "qualityAssurance", "qualityAssuranceResolved"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -71,7 +67,7 @@ def from_json(cls, json_str: str) -> SegmentsCountsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +83,9 @@ def from_dict(cls, obj: dict) -> SegmentsCountsDto:
return None
if not isinstance(obj, dict):
- return SegmentsCountsDto.parse_obj(obj)
+ return SegmentsCountsDto.model_validate(obj)
- _obj = SegmentsCountsDto.parse_obj({
+ _obj = SegmentsCountsDto.model_validate({
"all_confirmed": obj.get("allConfirmed"),
"chars_count": obj.get("charsCount"),
"completed_chars_count": obj.get("completedCharsCount"),
diff --git a/phrasetms_client/models/segments_counts_response_dto.py b/phrasetms_client/models/segments_counts_response_dto.py
index 17851fd3..11f4f646 100644
--- a/phrasetms_client/models/segments_counts_response_dto.py
+++ b/phrasetms_client/models/segments_counts_response_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.previous_workflow_dto import PreviousWorkflowDto
from phrasetms_client.models.segments_counts_dto import SegmentsCountsDto
@@ -32,14 +32,10 @@ class SegmentsCountsResponseDto(BaseModel):
previous_workflow: Optional[PreviousWorkflowDto] = Field(None, alias="previousWorkflow")
__properties = ["jobPartUid", "counts", "previousWorkflow"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> SegmentsCountsResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> SegmentsCountsResponseDto:
return None
if not isinstance(obj, dict):
- return SegmentsCountsResponseDto.parse_obj(obj)
+ return SegmentsCountsResponseDto.model_validate(obj)
- _obj = SegmentsCountsResponseDto.parse_obj({
+ _obj = SegmentsCountsResponseDto.model_validate({
"job_part_uid": obj.get("jobPartUid"),
"counts": SegmentsCountsDto.from_dict(obj.get("counts")) if obj.get("counts") is not None else None,
"previous_workflow": PreviousWorkflowDto.from_dict(obj.get("previousWorkflow")) if obj.get("previousWorkflow") is not None else None
diff --git a/phrasetms_client/models/segments_counts_response_list_dto.py b/phrasetms_client/models/segments_counts_response_list_dto.py
index 7d25fac6..ed1a2994 100644
--- a/phrasetms_client/models/segments_counts_response_list_dto.py
+++ b/phrasetms_client/models/segments_counts_response_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.segments_counts_response_dto import SegmentsCountsResponseDto
class SegmentsCountsResponseListDto(BaseModel):
"""
SegmentsCountsResponseListDto
"""
- segments_counts_results: Optional[conlist(SegmentsCountsResponseDto)] = Field(None, alias="segmentsCountsResults")
+ segments_counts_results: Optional[List[SegmentsCountsResponseDto]] = Field(None, alias="segmentsCountsResults")
__properties = ["segmentsCountsResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SegmentsCountsResponseListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SegmentsCountsResponseListDto:
return None
if not isinstance(obj, dict):
- return SegmentsCountsResponseListDto.parse_obj(obj)
+ return SegmentsCountsResponseListDto.model_validate(obj)
- _obj = SegmentsCountsResponseListDto.parse_obj({
+ _obj = SegmentsCountsResponseListDto.model_validate({
"segments_counts_results": [SegmentsCountsResponseDto.from_dict(_item) for _item in obj.get("segmentsCountsResults")] if obj.get("segmentsCountsResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/segmenttarget.py b/phrasetms_client/models/segmenttarget.py
index 9ef0fbca..9c0e156a 100644
--- a/phrasetms_client/models/segmenttarget.py
+++ b/phrasetms_client/models/segmenttarget.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.comment_dto import CommentDto
from phrasetms_client.models.common_conversation_dto import CommonConversationDto
from phrasetms_client.models.mentionable_user_dto import MentionableUserDto
@@ -33,14 +33,10 @@ class SEGMENTTARGET(CommonConversationDto):
references: Optional[PlainReferences] = None
__properties = ["id", "type", "dateCreated", "dateModified", "dateEdited", "createdBy", "comments", "status", "deleted", "references"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> SEGMENTTARGET:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> SEGMENTTARGET:
return None
if not isinstance(obj, dict):
- return SEGMENTTARGET.parse_obj(obj)
+ return SEGMENTTARGET.model_validate(obj)
- _obj = SEGMENTTARGET.parse_obj({
+ _obj = SEGMENTTARGET.model_validate({
"id": obj.get("id"),
"type": obj.get("type"),
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/segmenttarget_all_of.py b/phrasetms_client/models/segmenttarget_all_of.py
index ffbb29f1..390a0cf8 100644
--- a/phrasetms_client/models/segmenttarget_all_of.py
+++ b/phrasetms_client/models/segmenttarget_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.plain_references import PlainReferences
class SEGMENTTARGETAllOf(BaseModel):
@@ -29,14 +29,10 @@ class SEGMENTTARGETAllOf(BaseModel):
references: Optional[PlainReferences] = None
__properties = ["references"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SEGMENTTARGETAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> SEGMENTTARGETAllOf:
return None
if not isinstance(obj, dict):
- return SEGMENTTARGETAllOf.parse_obj(obj)
+ return SEGMENTTARGETAllOf.model_validate(obj)
- _obj = SEGMENTTARGETAllOf.parse_obj({
+ _obj = SEGMENTTARGETAllOf.model_validate({
"references": PlainReferences.from_dict(obj.get("references")) if obj.get("references") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/service_provider_config_dto.py b/phrasetms_client/models/service_provider_config_dto.py
index 100af488..489ef74e 100644
--- a/phrasetms_client/models/service_provider_config_dto.py
+++ b/phrasetms_client/models/service_provider_config_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.auth_schema import AuthSchema
from phrasetms_client.models.supported import Supported
@@ -27,8 +27,8 @@ class ServiceProviderConfigDto(BaseModel):
"""
ServiceProviderConfigDto
"""
- authentication_schemes: Optional[conlist(AuthSchema)] = Field(None, alias="authenticationSchemes")
- schemas: Optional[conlist(StrictStr)] = None
+ authentication_schemes: Optional[List[AuthSchema]] = Field(None, alias="authenticationSchemes")
+ schemas: Optional[List[StrictStr]] = None
patch: Optional[Supported] = None
bulk: Optional[Supported] = None
filter: Optional[Supported] = None
@@ -38,14 +38,10 @@ class ServiceProviderConfigDto(BaseModel):
xml_data_format: Optional[Supported] = Field(None, alias="xmlDataFormat")
__properties = ["authenticationSchemes", "schemas", "patch", "bulk", "filter", "changePassword", "sort", "etag", "xmlDataFormat"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +54,7 @@ def from_json(cls, json_str: str) -> ServiceProviderConfigDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -99,9 +95,9 @@ def from_dict(cls, obj: dict) -> ServiceProviderConfigDto:
return None
if not isinstance(obj, dict):
- return ServiceProviderConfigDto.parse_obj(obj)
+ return ServiceProviderConfigDto.model_validate(obj)
- _obj = ServiceProviderConfigDto.parse_obj({
+ _obj = ServiceProviderConfigDto.model_validate({
"authentication_schemes": [AuthSchema.from_dict(_item) for _item in obj.get("authenticationSchemes")] if obj.get("authenticationSchemes") is not None else None,
"schemas": obj.get("schemas"),
"patch": Supported.from_dict(obj.get("patch")) if obj.get("patch") is not None else None,
diff --git a/phrasetms_client/models/set_context_pt_trans_memories_v2_dto.py b/phrasetms_client/models/set_context_pt_trans_memories_v2_dto.py
index afec91e5..36d669aa 100644
--- a/phrasetms_client/models/set_context_pt_trans_memories_v2_dto.py
+++ b/phrasetms_client/models/set_context_pt_trans_memories_v2_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.set_project_template_trans_memory_v2_dto import SetProjectTemplateTransMemoryV2Dto
from phrasetms_client.models.uid_reference import UidReference
@@ -27,20 +27,16 @@ class SetContextPTTransMemoriesV2Dto(BaseModel):
"""
SetContextPTTransMemoriesV2Dto
"""
- trans_memories: conlist(SetProjectTemplateTransMemoryV2Dto) = Field(..., alias="transMemories")
+ trans_memories: List[SetProjectTemplateTransMemoryV2Dto] = Field(..., alias="transMemories")
target_lang: Optional[StrictStr] = Field(None, alias="targetLang", description="Set translation memory only for the specific project target language")
workflow_step: Optional[UidReference] = Field(None, alias="workflowStep")
order_enabled: Optional[StrictBool] = Field(None, alias="orderEnabled", description="Default: false")
__properties = ["transMemories", "targetLang", "workflowStep", "orderEnabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> SetContextPTTransMemoriesV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> SetContextPTTransMemoriesV2Dto:
return None
if not isinstance(obj, dict):
- return SetContextPTTransMemoriesV2Dto.parse_obj(obj)
+ return SetContextPTTransMemoriesV2Dto.model_validate(obj)
- _obj = SetContextPTTransMemoriesV2Dto.parse_obj({
+ _obj = SetContextPTTransMemoriesV2Dto.model_validate({
"trans_memories": [SetProjectTemplateTransMemoryV2Dto.from_dict(_item) for _item in obj.get("transMemories")] if obj.get("transMemories") is not None else None,
"target_lang": obj.get("targetLang"),
"workflow_step": UidReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
diff --git a/phrasetms_client/models/set_context_trans_memories_dto_v3_dto.py b/phrasetms_client/models/set_context_trans_memories_dto_v3_dto.py
index f21e4322..028286ca 100644
--- a/phrasetms_client/models/set_context_trans_memories_dto_v3_dto.py
+++ b/phrasetms_client/models/set_context_trans_memories_dto_v3_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.set_project_trans_memory_v3_dto import SetProjectTransMemoryV3Dto
from phrasetms_client.models.uid_reference import UidReference
@@ -27,20 +27,16 @@ class SetContextTransMemoriesDtoV3Dto(BaseModel):
"""
SetContextTransMemoriesDtoV3Dto
"""
- trans_memories: conlist(SetProjectTransMemoryV3Dto) = Field(..., alias="transMemories")
+ trans_memories: List[SetProjectTransMemoryV3Dto] = Field(..., alias="transMemories")
target_lang: Optional[StrictStr] = Field(None, alias="targetLang", description="Set translation memory only for the specific project target language")
workflow_step: Optional[UidReference] = Field(None, alias="workflowStep")
order_enabled: Optional[StrictBool] = Field(None, alias="orderEnabled", description="Default: false")
__properties = ["transMemories", "targetLang", "workflowStep", "orderEnabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> SetContextTransMemoriesDtoV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> SetContextTransMemoriesDtoV3Dto:
return None
if not isinstance(obj, dict):
- return SetContextTransMemoriesDtoV3Dto.parse_obj(obj)
+ return SetContextTransMemoriesDtoV3Dto.model_validate(obj)
- _obj = SetContextTransMemoriesDtoV3Dto.parse_obj({
+ _obj = SetContextTransMemoriesDtoV3Dto.model_validate({
"trans_memories": [SetProjectTransMemoryV3Dto.from_dict(_item) for _item in obj.get("transMemories")] if obj.get("transMemories") is not None else None,
"target_lang": obj.get("targetLang"),
"workflow_step": UidReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
diff --git a/phrasetms_client/models/set_financial_settings_dto.py b/phrasetms_client/models/set_financial_settings_dto.py
index 4982aef9..7be84953 100644
--- a/phrasetms_client/models/set_financial_settings_dto.py
+++ b/phrasetms_client/models/set_financial_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
class SetFinancialSettingsDto(BaseModel):
@@ -30,14 +30,10 @@ class SetFinancialSettingsDto(BaseModel):
price_list: Optional[IdReference] = Field(None, alias="priceList")
__properties = ["netRateScheme", "priceList"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SetFinancialSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SetFinancialSettingsDto:
return None
if not isinstance(obj, dict):
- return SetFinancialSettingsDto.parse_obj(obj)
+ return SetFinancialSettingsDto.model_validate(obj)
- _obj = SetFinancialSettingsDto.parse_obj({
+ _obj = SetFinancialSettingsDto.model_validate({
"net_rate_scheme": IdReference.from_dict(obj.get("netRateScheme")) if obj.get("netRateScheme") is not None else None,
"price_list": IdReference.from_dict(obj.get("priceList")) if obj.get("priceList") is not None else None
})
diff --git a/phrasetms_client/models/set_project_status_dto.py b/phrasetms_client/models/set_project_status_dto.py
index 26c100eb..7ecedd93 100644
--- a/phrasetms_client/models/set_project_status_dto.py
+++ b/phrasetms_client/models/set_project_status_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class SetProjectStatusDto(BaseModel):
"""
@@ -28,21 +28,18 @@ class SetProjectStatusDto(BaseModel):
status: StrictStr = Field(...)
__properties = ["status"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('NEW', 'ASSIGNED', 'COMPLETED', 'ACCEPTED_BY_VENDOR', 'DECLINED_BY_VENDOR', 'COMPLETED_BY_VENDOR', 'CANCELLED'):
raise ValueError("must be one of enum values ('NEW', 'ASSIGNED', 'COMPLETED', 'ACCEPTED_BY_VENDOR', 'DECLINED_BY_VENDOR', 'COMPLETED_BY_VENDOR', 'CANCELLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +52,7 @@ def from_json(cls, json_str: str) -> SetProjectStatusDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +65,9 @@ def from_dict(cls, obj: dict) -> SetProjectStatusDto:
return None
if not isinstance(obj, dict):
- return SetProjectStatusDto.parse_obj(obj)
+ return SetProjectStatusDto.model_validate(obj)
- _obj = SetProjectStatusDto.parse_obj({
+ _obj = SetProjectStatusDto.model_validate({
"status": obj.get("status")
})
return _obj
diff --git a/phrasetms_client/models/set_project_template_term_base_dto.py b/phrasetms_client/models/set_project_template_term_base_dto.py
index 5a0e6055..3395b1c0 100644
--- a/phrasetms_client/models/set_project_template_term_base_dto.py
+++ b/phrasetms_client/models/set_project_template_term_base_dto.py
@@ -19,28 +19,24 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.id_reference import IdReference
class SetProjectTemplateTermBaseDto(BaseModel):
"""
SetProjectTemplateTermBaseDto
"""
- read_term_bases: Optional[conlist(IdReference)] = Field(None, alias="readTermBases")
+ read_term_bases: Optional[List[IdReference]] = Field(None, alias="readTermBases")
write_term_base: Optional[IdReference] = Field(None, alias="writeTermBase")
- quality_assurance_term_bases: Optional[conlist(IdReference)] = Field(None, alias="qualityAssuranceTermBases")
+ quality_assurance_term_bases: Optional[List[IdReference]] = Field(None, alias="qualityAssuranceTermBases")
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
workflow_step: Optional[IdReference] = Field(None, alias="workflowStep")
__properties = ["readTermBases", "writeTermBase", "qualityAssuranceTermBases", "targetLang", "workflowStep"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> SetProjectTemplateTermBaseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -86,9 +82,9 @@ def from_dict(cls, obj: dict) -> SetProjectTemplateTermBaseDto:
return None
if not isinstance(obj, dict):
- return SetProjectTemplateTermBaseDto.parse_obj(obj)
+ return SetProjectTemplateTermBaseDto.model_validate(obj)
- _obj = SetProjectTemplateTermBaseDto.parse_obj({
+ _obj = SetProjectTemplateTermBaseDto.model_validate({
"read_term_bases": [IdReference.from_dict(_item) for _item in obj.get("readTermBases")] if obj.get("readTermBases") is not None else None,
"write_term_base": IdReference.from_dict(obj.get("writeTermBase")) if obj.get("writeTermBase") is not None else None,
"quality_assurance_term_bases": [IdReference.from_dict(_item) for _item in obj.get("qualityAssuranceTermBases")] if obj.get("qualityAssuranceTermBases") is not None else None,
diff --git a/phrasetms_client/models/set_project_template_trans_memories_v2_dto.py b/phrasetms_client/models/set_project_template_trans_memories_v2_dto.py
index a5b1d3fe..1e45aa00 100644
--- a/phrasetms_client/models/set_project_template_trans_memories_v2_dto.py
+++ b/phrasetms_client/models/set_project_template_trans_memories_v2_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.set_context_pt_trans_memories_v2_dto import SetContextPTTransMemoriesV2Dto
class SetProjectTemplateTransMemoriesV2Dto(BaseModel):
"""
SetProjectTemplateTransMemoriesV2Dto
"""
- data_per_context: conlist(SetContextPTTransMemoriesV2Dto) = Field(..., alias="dataPerContext")
+ data_per_context: List[SetContextPTTransMemoriesV2Dto] = Field(..., alias="dataPerContext")
__properties = ["dataPerContext"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SetProjectTemplateTransMemoriesV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SetProjectTemplateTransMemoriesV2Dto:
return None
if not isinstance(obj, dict):
- return SetProjectTemplateTransMemoriesV2Dto.parse_obj(obj)
+ return SetProjectTemplateTransMemoriesV2Dto.model_validate(obj)
- _obj = SetProjectTemplateTransMemoriesV2Dto.parse_obj({
+ _obj = SetProjectTemplateTransMemoriesV2Dto.model_validate({
"data_per_context": [SetContextPTTransMemoriesV2Dto.from_dict(_item) for _item in obj.get("dataPerContext")] if obj.get("dataPerContext") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/set_project_template_trans_memory_v2_dto.py b/phrasetms_client/models/set_project_template_trans_memory_v2_dto.py
index 86dcc21f..b00c7661 100644
--- a/phrasetms_client/models/set_project_template_trans_memory_v2_dto.py
+++ b/phrasetms_client/models/set_project_template_trans_memory_v2_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictInt, confloat, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt
from phrasetms_client.models.uid_reference import UidReference
@@ -38,7 +39,7 @@ class SetProjectTemplateTransMemoryV2Dto(BaseModel):
description="Can be set only for Translation Memory with read == true.
Max 2 write TMs allowed per project.
Default: false",
)
penalty: Optional[
- Union[confloat(le=100.0, ge=0, strict=True), conint(le=100, ge=0, strict=True)]
+ Union[Annotated[float, Field(le=100.0, ge=0, strict=True)], Annotated[int, Field(le=100, ge=0, strict=True)]]
] = None
apply_penalty_to101_only: Optional[StrictBool] = Field(
None,
@@ -55,15 +56,10 @@ class SetProjectTemplateTransMemoryV2Dto(BaseModel):
"order",
]
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -76,7 +72,7 @@ def from_json(cls, json_str: str) -> SetProjectTemplateTransMemoryV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of trans_memory
if self.trans_memory:
_dict["transMemory"] = self.trans_memory.to_dict()
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> SetProjectTemplateTransMemoryV2Dto:
return None
if not isinstance(obj, dict):
- return SetProjectTemplateTransMemoryV2Dto.parse_obj(obj)
+ return SetProjectTemplateTransMemoryV2Dto.model_validate(obj)
- _obj = SetProjectTemplateTransMemoryV2Dto.parse_obj(
+ _obj = SetProjectTemplateTransMemoryV2Dto.model_validate(
{
"trans_memory": UidReference.from_dict(obj.get("transMemory"))
if obj.get("transMemory") is not None
diff --git a/phrasetms_client/models/set_project_trans_memories_v3_dto.py b/phrasetms_client/models/set_project_trans_memories_v3_dto.py
index 84682144..e1cb54de 100644
--- a/phrasetms_client/models/set_project_trans_memories_v3_dto.py
+++ b/phrasetms_client/models/set_project_trans_memories_v3_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.set_context_trans_memories_dto_v3_dto import SetContextTransMemoriesDtoV3Dto
class SetProjectTransMemoriesV3Dto(BaseModel):
"""
SetProjectTransMemoriesV3Dto
"""
- data_per_context: conlist(SetContextTransMemoriesDtoV3Dto) = Field(..., alias="dataPerContext")
+ data_per_context: List[SetContextTransMemoriesDtoV3Dto] = Field(..., alias="dataPerContext")
__properties = ["dataPerContext"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SetProjectTransMemoriesV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SetProjectTransMemoriesV3Dto:
return None
if not isinstance(obj, dict):
- return SetProjectTransMemoriesV3Dto.parse_obj(obj)
+ return SetProjectTransMemoriesV3Dto.model_validate(obj)
- _obj = SetProjectTransMemoriesV3Dto.parse_obj({
+ _obj = SetProjectTransMemoriesV3Dto.model_validate({
"data_per_context": [SetContextTransMemoriesDtoV3Dto.from_dict(_item) for _item in obj.get("dataPerContext")] if obj.get("dataPerContext") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/set_project_trans_memory_v3_dto.py b/phrasetms_client/models/set_project_trans_memory_v3_dto.py
index 37536be3..174af494 100644
--- a/phrasetms_client/models/set_project_trans_memory_v3_dto.py
+++ b/phrasetms_client/models/set_project_trans_memory_v3_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictInt, confloat, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt
from phrasetms_client.models.uid_reference import UidReference
@@ -38,7 +39,7 @@ class SetProjectTransMemoryV3Dto(BaseModel):
description="Can be set only for Translation Memory with read == true.
Max 2 write TMs allowed per project.
Default: false",
)
penalty: Optional[
- Union[confloat(le=100.0, ge=0, strict=True), conint(le=100, ge=0, strict=True)]
+ Union[Annotated[float, Field(le=100.0, ge=0, strict=True)], Annotated[int, Field(le=100, ge=0, strict=True)]]
] = None
apply_penalty_to101_only: Optional[StrictBool] = Field(
None,
@@ -55,15 +56,10 @@ class SetProjectTransMemoryV3Dto(BaseModel):
"order",
]
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -76,7 +72,7 @@ def from_json(cls, json_str: str) -> SetProjectTransMemoryV3Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of trans_memory
if self.trans_memory:
_dict["transMemory"] = self.trans_memory.to_dict()
@@ -89,9 +85,9 @@ def from_dict(cls, obj: dict) -> SetProjectTransMemoryV3Dto:
return None
if not isinstance(obj, dict):
- return SetProjectTransMemoryV3Dto.parse_obj(obj)
+ return SetProjectTransMemoryV3Dto.model_validate(obj)
- _obj = SetProjectTransMemoryV3Dto.parse_obj(
+ _obj = SetProjectTransMemoryV3Dto.model_validate(
{
"trans_memory": UidReference.from_dict(obj.get("transMemory"))
if obj.get("transMemory") is not None
diff --git a/phrasetms_client/models/set_term_base_dto.py b/phrasetms_client/models/set_term_base_dto.py
index b198e216..75ff140b 100644
--- a/phrasetms_client/models/set_term_base_dto.py
+++ b/phrasetms_client/models/set_term_base_dto.py
@@ -19,27 +19,23 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.id_reference import IdReference
class SetTermBaseDto(BaseModel):
"""
SetTermBaseDto
"""
- read_term_bases: Optional[conlist(IdReference)] = Field(None, alias="readTermBases")
+ read_term_bases: Optional[List[IdReference]] = Field(None, alias="readTermBases")
write_term_base: Optional[IdReference] = Field(None, alias="writeTermBase")
- quality_assurance_term_bases: Optional[conlist(IdReference)] = Field(None, alias="qualityAssuranceTermBases")
+ quality_assurance_term_bases: Optional[List[IdReference]] = Field(None, alias="qualityAssuranceTermBases")
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
__properties = ["readTermBases", "writeTermBase", "qualityAssuranceTermBases", "targetLang"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> SetTermBaseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> SetTermBaseDto:
return None
if not isinstance(obj, dict):
- return SetTermBaseDto.parse_obj(obj)
+ return SetTermBaseDto.model_validate(obj)
- _obj = SetTermBaseDto.parse_obj({
+ _obj = SetTermBaseDto.model_validate({
"read_term_bases": [IdReference.from_dict(_item) for _item in obj.get("readTermBases")] if obj.get("readTermBases") is not None else None,
"write_term_base": IdReference.from_dict(obj.get("writeTermBase")) if obj.get("writeTermBase") is not None else None,
"quality_assurance_term_bases": [IdReference.from_dict(_item) for _item in obj.get("qualityAssuranceTermBases")] if obj.get("qualityAssuranceTermBases") is not None else None,
diff --git a/phrasetms_client/models/severity_dto.py b/phrasetms_client/models/severity_dto.py
index d8dbfa8f..555db0e4 100644
--- a/phrasetms_client/models/severity_dto.py
+++ b/phrasetms_client/models/severity_dto.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt
class SeverityDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class SeverityDto(BaseModel):
value: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Allowed values 0.0-100,000.0")
__properties = ["code", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SeverityDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SeverityDto:
return None
if not isinstance(obj, dict):
- return SeverityDto.parse_obj(obj)
+ return SeverityDto.model_validate(obj)
- _obj = SeverityDto.parse_obj({
+ _obj = SeverityDto.model_validate({
"code": obj.get("code"),
"value": obj.get("value")
})
diff --git a/phrasetms_client/models/sftp.py b/phrasetms_client/models/sftp.py
index 078b069f..a74e462a 100644
--- a/phrasetms_client/models/sftp.py
+++ b/phrasetms_client/models/sftp.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Sftp(AbstractConnectorDto):
@@ -35,14 +35,10 @@ class Sftp(AbstractConnectorDto):
ssh_pass_phrase: Optional[StrictStr] = Field(None, alias="sshPassPhrase")
__properties = ["name", "type", "host", "port", "userName", "password", "sshKeyName", "sshKey", "sshPassPhrase"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> Sftp:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> Sftp:
return None
if not isinstance(obj, dict):
- return Sftp.parse_obj(obj)
+ return Sftp.model_validate(obj)
- _obj = Sftp.parse_obj({
+ _obj = Sftp.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/sftp_all_of.py b/phrasetms_client/models/sftp_all_of.py
index 806dad99..6d963e10 100644
--- a/phrasetms_client/models/sftp_all_of.py
+++ b/phrasetms_client/models/sftp_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class SftpAllOf(BaseModel):
"""
@@ -34,14 +34,10 @@ class SftpAllOf(BaseModel):
ssh_pass_phrase: Optional[StrictStr] = Field(None, alias="sshPassPhrase")
__properties = ["host", "port", "userName", "password", "sshKeyName", "sshKey", "sshPassPhrase"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> SftpAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -67,9 +63,9 @@ def from_dict(cls, obj: dict) -> SftpAllOf:
return None
if not isinstance(obj, dict):
- return SftpAllOf.parse_obj(obj)
+ return SftpAllOf.model_validate(obj)
- _obj = SftpAllOf.parse_obj({
+ _obj = SftpAllOf.model_validate({
"host": obj.get("host"),
"port": obj.get("port"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/sitecore.py b/phrasetms_client/models/sitecore.py
index 8bc4665a..369b01a8 100644
--- a/phrasetms_client/models/sitecore.py
+++ b/phrasetms_client/models/sitecore.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Sitecore(AbstractConnectorDto):
@@ -33,14 +33,10 @@ class Sitecore(AbstractConnectorDto):
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
__properties = ["name", "type", "userName", "password", "host", "sitecoreDatabase", "sourceLang"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> Sitecore:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> Sitecore:
return None
if not isinstance(obj, dict):
- return Sitecore.parse_obj(obj)
+ return Sitecore.model_validate(obj)
- _obj = Sitecore.parse_obj({
+ _obj = Sitecore.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/sitecore_all_of.py b/phrasetms_client/models/sitecore_all_of.py
index c7fe2422..9af0ce51 100644
--- a/phrasetms_client/models/sitecore_all_of.py
+++ b/phrasetms_client/models/sitecore_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class SitecoreAllOf(BaseModel):
"""
@@ -32,14 +32,10 @@ class SitecoreAllOf(BaseModel):
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
__properties = ["userName", "password", "host", "sitecoreDatabase", "sourceLang"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> SitecoreAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> SitecoreAllOf:
return None
if not isinstance(obj, dict):
- return SitecoreAllOf.parse_obj(obj)
+ return SitecoreAllOf.model_validate(obj)
- _obj = SitecoreAllOf.parse_obj({
+ _obj = SitecoreAllOf.model_validate({
"user_name": obj.get("userName"),
"password": obj.get("password"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/source_target_regexp_warning_dto.py b/phrasetms_client/models/source_target_regexp_warning_dto.py
index a6ded3c0..0332acca 100644
--- a/phrasetms_client/models/source_target_regexp_warning_dto.py
+++ b/phrasetms_client/models/source_target_regexp_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class SourceTargetRegexpWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class SourceTargetRegexpWarningDto(SegmentWarning):
description: Optional[StrictStr] = None
__properties = ["id", "ignored", "type", "repetitionGroupId", "description"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SourceTargetRegexpWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SourceTargetRegexpWarningDto:
return None
if not isinstance(obj, dict):
- return SourceTargetRegexpWarningDto.parse_obj(obj)
+ return SourceTargetRegexpWarningDto.model_validate(obj)
- _obj = SourceTargetRegexpWarningDto.parse_obj({
+ _obj = SourceTargetRegexpWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/source_target_regexp_warning_dto_all_of.py b/phrasetms_client/models/source_target_regexp_warning_dto_all_of.py
index dd78df47..bab73652 100644
--- a/phrasetms_client/models/source_target_regexp_warning_dto_all_of.py
+++ b/phrasetms_client/models/source_target_regexp_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class SourceTargetRegexpWarningDtoAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class SourceTargetRegexpWarningDtoAllOf(BaseModel):
description: Optional[StrictStr] = None
__properties = ["description"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> SourceTargetRegexpWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> SourceTargetRegexpWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return SourceTargetRegexpWarningDtoAllOf.parse_obj(obj)
+ return SourceTargetRegexpWarningDtoAllOf.model_validate(obj)
- _obj = SourceTargetRegexpWarningDtoAllOf.parse_obj({
+ _obj = SourceTargetRegexpWarningDtoAllOf.model_validate({
"description": obj.get("description")
})
return _obj
diff --git a/phrasetms_client/models/spell_check_request_dto.py b/phrasetms_client/models/spell_check_request_dto.py
index 46044788..77fd612e 100644
--- a/phrasetms_client/models/spell_check_request_dto.py
+++ b/phrasetms_client/models/spell_check_request_dto.py
@@ -19,26 +19,22 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class SpellCheckRequestDto(BaseModel):
"""
SpellCheckRequestDto
"""
lang: StrictStr = Field(...)
- texts: conlist(StrictStr) = Field(...)
- reference_texts: Optional[conlist(StrictStr)] = Field(None, alias="referenceTexts")
+ texts: List[StrictStr] = Field(...)
+ reference_texts: Optional[List[StrictStr]] = Field(None, alias="referenceTexts")
zero_length_separator: Optional[StrictStr] = Field(None, alias="zeroLengthSeparator")
__properties = ["lang", "texts", "referenceTexts", "zeroLengthSeparator"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> SpellCheckRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> SpellCheckRequestDto:
return None
if not isinstance(obj, dict):
- return SpellCheckRequestDto.parse_obj(obj)
+ return SpellCheckRequestDto.model_validate(obj)
- _obj = SpellCheckRequestDto.parse_obj({
+ _obj = SpellCheckRequestDto.model_validate({
"lang": obj.get("lang"),
"texts": obj.get("texts"),
"reference_texts": obj.get("referenceTexts"),
diff --git a/phrasetms_client/models/spell_check_response_dto.py b/phrasetms_client/models/spell_check_response_dto.py
index 0872a860..7bf04741 100644
--- a/phrasetms_client/models/spell_check_response_dto.py
+++ b/phrasetms_client/models/spell_check_response_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.check_response import CheckResponse
class SpellCheckResponseDto(BaseModel):
"""
SpellCheckResponseDto
"""
- spell_check_results: Optional[conlist(CheckResponse)] = Field(None, alias="spellCheckResults")
+ spell_check_results: Optional[List[CheckResponse]] = Field(None, alias="spellCheckResults")
__properties = ["spellCheckResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SpellCheckResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SpellCheckResponseDto:
return None
if not isinstance(obj, dict):
- return SpellCheckResponseDto.parse_obj(obj)
+ return SpellCheckResponseDto.model_validate(obj)
- _obj = SpellCheckResponseDto.parse_obj({
+ _obj = SpellCheckResponseDto.model_validate({
"spell_check_results": [CheckResponse.from_dict(_item) for _item in obj.get("spellCheckResults")] if obj.get("spellCheckResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/spell_check_warning_dto.py b/phrasetms_client/models/spell_check_warning_dto.py
index b1ebe3a9..a52e0804 100644
--- a/phrasetms_client/models/spell_check_warning_dto.py
+++ b/phrasetms_client/models/spell_check_warning_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.misspelled_word_dto import MisspelledWordDto
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -27,17 +27,13 @@ class SpellCheckWarningDto(SegmentWarning):
"""
SpellCheckWarningDto
"""
- misspelled_words: Optional[conlist(MisspelledWordDto)] = Field(None, alias="misspelledWords")
+ misspelled_words: Optional[List[MisspelledWordDto]] = Field(None, alias="misspelledWords")
__properties = ["id", "ignored", "type", "repetitionGroupId", "misspelledWords"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SpellCheckWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> SpellCheckWarningDto:
return None
if not isinstance(obj, dict):
- return SpellCheckWarningDto.parse_obj(obj)
+ return SpellCheckWarningDto.model_validate(obj)
- _obj = SpellCheckWarningDto.parse_obj({
+ _obj = SpellCheckWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/spell_check_warning_dto_all_of.py b/phrasetms_client/models/spell_check_warning_dto_all_of.py
index d4e019aa..cf036892 100644
--- a/phrasetms_client/models/spell_check_warning_dto_all_of.py
+++ b/phrasetms_client/models/spell_check_warning_dto_all_of.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.misspelled_word_dto import MisspelledWordDto
class SpellCheckWarningDtoAllOf(BaseModel):
"""
SpellCheckWarningDtoAllOf
"""
- misspelled_words: Optional[conlist(MisspelledWordDto)] = Field(None, alias="misspelledWords")
+ misspelled_words: Optional[List[MisspelledWordDto]] = Field(None, alias="misspelledWords")
__properties = ["misspelledWords"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SpellCheckWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SpellCheckWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return SpellCheckWarningDtoAllOf.parse_obj(obj)
+ return SpellCheckWarningDtoAllOf.model_validate(obj)
- _obj = SpellCheckWarningDtoAllOf.parse_obj({
+ _obj = SpellCheckWarningDtoAllOf.model_validate({
"misspelled_words": [MisspelledWordDto.from_dict(_item) for _item in obj.get("misspelledWords")] if obj.get("misspelledWords") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/split_job_action_dto.py b/phrasetms_client/models/split_job_action_dto.py
index f1fab8ff..6bda24fe 100644
--- a/phrasetms_client/models/split_job_action_dto.py
+++ b/phrasetms_client/models/split_job_action_dto.py
@@ -19,27 +19,23 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt
class SplitJobActionDto(BaseModel):
"""
SplitJobActionDto
"""
- segment_ordinals: Optional[conlist(StrictInt, max_items=2147483647, min_items=1)] = Field(None, alias="segmentOrdinals")
+ segment_ordinals: Optional[List[StrictInt]] = Field(None, alias="segmentOrdinals")
part_count: Optional[StrictInt] = Field(None, alias="partCount")
part_size: Optional[StrictInt] = Field(None, alias="partSize")
word_count: Optional[StrictInt] = Field(None, alias="wordCount")
by_document_part: Optional[StrictBool] = Field(None, alias="byDocumentPart", description="Can be used only for PowerPoint files")
__properties = ["segmentOrdinals", "partCount", "partSize", "wordCount", "byDocumentPart"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> SplitJobActionDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> SplitJobActionDto:
return None
if not isinstance(obj, dict):
- return SplitJobActionDto.parse_obj(obj)
+ return SplitJobActionDto.model_validate(obj)
- _obj = SplitJobActionDto.parse_obj({
+ _obj = SplitJobActionDto.model_validate({
"segment_ordinals": obj.get("segmentOrdinals"),
"part_count": obj.get("partCount"),
"part_size": obj.get("partSize"),
diff --git a/phrasetms_client/models/status_dto.py b/phrasetms_client/models/status_dto.py
index 3d9bb06d..390e1a99 100644
--- a/phrasetms_client/models/status_dto.py
+++ b/phrasetms_client/models/status_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.mentionable_user_dto import MentionableUserDto
class StatusDto(BaseModel):
@@ -31,7 +31,8 @@ class StatusDto(BaseModel):
var_date: Optional[datetime] = Field(None, alias="date")
__properties = ["name", "by", "date"]
- @validator('name')
+ @field_validator('name')
+ @classmethod
def name_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -41,14 +42,10 @@ def name_validate_enum(cls, value):
raise ValueError("must be one of enum values ('resolved', 'unresolved')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +58,7 @@ def from_json(cls, json_str: str) -> StatusDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +74,9 @@ def from_dict(cls, obj: dict) -> StatusDto:
return None
if not isinstance(obj, dict):
- return StatusDto.parse_obj(obj)
+ return StatusDto.model_validate(obj)
- _obj = StatusDto.parse_obj({
+ _obj = StatusDto.model_validate({
"name": obj.get("name"),
"by": MentionableUserDto.from_dict(obj.get("by")) if obj.get("by") is not None else None,
"var_date": obj.get("date")
diff --git a/phrasetms_client/models/string.py b/phrasetms_client/models/string.py
index ba36104a..30a388b2 100644
--- a/phrasetms_client/models/string.py
+++ b/phrasetms_client/models/string.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
from phrasetms_client.models.qa_check_dto_v2 import QACheckDtoV2
class STRING(QACheckDtoV2):
@@ -32,14 +32,10 @@ class STRING(QACheckDtoV2):
instant: Optional[StrictBool] = None
__properties = ["type", "name", "ignorable", "enabled", "value", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> STRING:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> STRING:
return None
if not isinstance(obj, dict):
- return STRING.parse_obj(obj)
+ return STRING.model_validate(obj)
- _obj = STRING.parse_obj({
+ _obj = STRING.model_validate({
"type": obj.get("type"),
"name": obj.get("name"),
"ignorable": obj.get("ignorable"),
diff --git a/phrasetms_client/models/string_all_of.py b/phrasetms_client/models/string_all_of.py
index f408081d..3c7cecb0 100644
--- a/phrasetms_client/models/string_all_of.py
+++ b/phrasetms_client/models/string_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
class STRINGAllOf(BaseModel):
"""
@@ -31,14 +31,10 @@ class STRINGAllOf(BaseModel):
instant: Optional[StrictBool] = None
__properties = ["ignorable", "enabled", "value", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> STRINGAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> STRINGAllOf:
return None
if not isinstance(obj, dict):
- return STRINGAllOf.parse_obj(obj)
+ return STRINGAllOf.model_validate(obj)
- _obj = STRINGAllOf.parse_obj({
+ _obj = STRINGAllOf.model_validate({
"ignorable": obj.get("ignorable"),
"enabled": obj.get("enabled"),
"value": obj.get("value"),
diff --git a/phrasetms_client/models/style_weights_dto.py b/phrasetms_client/models/style_weights_dto.py
index 0d27c962..64b48061 100644
--- a/phrasetms_client/models/style_weights_dto.py
+++ b/phrasetms_client/models/style_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class StyleWeightsDto(BaseModel):
@@ -34,14 +34,10 @@ class StyleWeightsDto(BaseModel):
unidiomatic: Optional[ToggleableWeightDto] = None
__properties = ["style", "awkward", "companyStyle", "inconsistentStyle", "thirdPartyStyle", "unidiomatic"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> StyleWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -85,9 +81,9 @@ def from_dict(cls, obj: dict) -> StyleWeightsDto:
return None
if not isinstance(obj, dict):
- return StyleWeightsDto.parse_obj(obj)
+ return StyleWeightsDto.model_validate(obj)
- _obj = StyleWeightsDto.parse_obj({
+ _obj = StyleWeightsDto.model_validate({
"style": ToggleableWeightDto.from_dict(obj.get("style")) if obj.get("style") is not None else None,
"awkward": ToggleableWeightDto.from_dict(obj.get("awkward")) if obj.get("awkward") is not None else None,
"company_style": ToggleableWeightDto.from_dict(obj.get("companyStyle")) if obj.get("companyStyle") is not None else None,
diff --git a/phrasetms_client/models/sub_domain_dto.py b/phrasetms_client/models/sub_domain_dto.py
index 88ac2993..63726012 100644
--- a/phrasetms_client/models/sub_domain_dto.py
+++ b/phrasetms_client/models/sub_domain_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.user_reference import UserReference
class SubDomainDto(BaseModel):
@@ -32,14 +32,10 @@ class SubDomainDto(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "name", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> SubDomainDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> SubDomainDto:
return None
if not isinstance(obj, dict):
- return SubDomainDto.parse_obj(obj)
+ return SubDomainDto.model_validate(obj)
- _obj = SubDomainDto.parse_obj({
+ _obj = SubDomainDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/sub_domain_edit_dto.py b/phrasetms_client/models/sub_domain_edit_dto.py
index bb095479..a2434df6 100644
--- a/phrasetms_client/models/sub_domain_edit_dto.py
+++ b/phrasetms_client/models/sub_domain_edit_dto.py
@@ -18,24 +18,21 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, constr
+from pydantic import BaseModel, ConfigDict, StringConstraints
class SubDomainEditDto(BaseModel):
"""
SubDomainEditDto
"""
- name: Optional[constr(strict=True, max_length=255, min_length=0)] = None
+ name: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)]] = None
__properties = ["name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +45,7 @@ def from_json(cls, json_str: str) -> SubDomainEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +58,9 @@ def from_dict(cls, obj: dict) -> SubDomainEditDto:
return None
if not isinstance(obj, dict):
- return SubDomainEditDto.parse_obj(obj)
+ return SubDomainEditDto.model_validate(obj)
- _obj = SubDomainEditDto.parse_obj({
+ _obj = SubDomainEditDto.model_validate({
"name": obj.get("name")
})
return _obj
diff --git a/phrasetms_client/models/sub_domain_reference.py b/phrasetms_client/models/sub_domain_reference.py
index 211b2ab8..a87ad66f 100644
--- a/phrasetms_client/models/sub_domain_reference.py
+++ b/phrasetms_client/models/sub_domain_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class SubDomainReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class SubDomainReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["name", "id", "uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SubDomainReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> SubDomainReference:
return None
if not isinstance(obj, dict):
- return SubDomainReference.parse_obj(obj)
+ return SubDomainReference.model_validate(obj)
- _obj = SubDomainReference.parse_obj({
+ _obj = SubDomainReference.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"uid": obj.get("uid")
diff --git a/phrasetms_client/models/submitter.py b/phrasetms_client/models/submitter.py
index 8aaf0342..87e9ffdb 100644
--- a/phrasetms_client/models/submitter.py
+++ b/phrasetms_client/models/submitter.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.abstract_user_create_dto import AbstractUserCreateDto
from phrasetms_client.models.id_reference import IdReference
@@ -27,18 +27,14 @@ class SUBMITTER(AbstractUserCreateDto):
"""
SUBMITTER
"""
- automation_widgets: Optional[conlist(IdReference)] = Field(None, alias="automationWidgets", description="If no automation widgets are assigned in request the default automation widgets will be assigned instead")
+ automation_widgets: Optional[List[IdReference]] = Field(None, alias="automationWidgets", description="If no automation widgets are assigned in request the default automation widgets will be assigned instead")
project_view_created_by_other_submitters: Optional[StrictBool] = Field(None, alias="projectViewCreatedByOtherSubmitters", description="View projects created by other Submitters. Default: false")
__properties = ["userName", "firstName", "lastName", "email", "password", "role", "timezone", "receiveNewsletter", "note", "active", "automationWidgets", "projectViewCreatedByOtherSubmitters"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> SUBMITTER:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> SUBMITTER:
return None
if not isinstance(obj, dict):
- return SUBMITTER.parse_obj(obj)
+ return SUBMITTER.model_validate(obj)
- _obj = SUBMITTER.parse_obj({
+ _obj = SUBMITTER.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/submitter_all_of.py b/phrasetms_client/models/submitter_all_of.py
index 520cdaac..c23c54ec 100644
--- a/phrasetms_client/models/submitter_all_of.py
+++ b/phrasetms_client/models/submitter_all_of.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.id_reference import IdReference
class SUBMITTERAllOf(BaseModel):
"""
SUBMITTERAllOf
"""
- automation_widgets: Optional[conlist(IdReference)] = Field(None, alias="automationWidgets", description="If no automation widgets are assigned in request the default automation widgets will be assigned instead")
+ automation_widgets: Optional[List[IdReference]] = Field(None, alias="automationWidgets", description="If no automation widgets are assigned in request the default automation widgets will be assigned instead")
project_view_created_by_other_submitters: Optional[StrictBool] = Field(None, alias="projectViewCreatedByOtherSubmitters", description="View projects created by other Submitters. Default: false")
__properties = ["automationWidgets", "projectViewCreatedByOtherSubmitters"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SUBMITTERAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> SUBMITTERAllOf:
return None
if not isinstance(obj, dict):
- return SUBMITTERAllOf.parse_obj(obj)
+ return SUBMITTERAllOf.model_validate(obj)
- _obj = SUBMITTERAllOf.parse_obj({
+ _obj = SUBMITTERAllOf.model_validate({
"automation_widgets": [IdReference.from_dict(_item) for _item in obj.get("automationWidgets")] if obj.get("automationWidgets") is not None else None,
"project_view_created_by_other_submitters": obj.get("projectViewCreatedByOtherSubmitters")
})
diff --git a/phrasetms_client/models/submitteredit.py b/phrasetms_client/models/submitteredit.py
index 105ffe52..a725db2d 100644
--- a/phrasetms_client/models/submitteredit.py
+++ b/phrasetms_client/models/submitteredit.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.abstract_user_edit_dto import AbstractUserEditDto
from phrasetms_client.models.id_reference import IdReference
@@ -27,18 +27,14 @@ class SUBMITTEREDIT(AbstractUserEditDto):
"""
SUBMITTEREDIT
"""
- automation_widgets: conlist(IdReference) = Field(..., alias="automationWidgets")
+ automation_widgets: List[IdReference] = Field(..., alias="automationWidgets")
project_view_created_by_other_submitters: Optional[StrictBool] = Field(None, alias="projectViewCreatedByOtherSubmitters", description="View projects created by other Submitters. Default: false")
__properties = ["userName", "firstName", "lastName", "email", "role", "timezone", "receiveNewsletter", "note", "active", "automationWidgets", "projectViewCreatedByOtherSubmitters"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> SUBMITTEREDIT:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> SUBMITTEREDIT:
return None
if not isinstance(obj, dict):
- return SUBMITTEREDIT.parse_obj(obj)
+ return SUBMITTEREDIT.model_validate(obj)
- _obj = SUBMITTEREDIT.parse_obj({
+ _obj = SUBMITTEREDIT.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/submitteredit_all_of.py b/phrasetms_client/models/submitteredit_all_of.py
index 3dc17b69..e3789988 100644
--- a/phrasetms_client/models/submitteredit_all_of.py
+++ b/phrasetms_client/models/submitteredit_all_of.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.id_reference import IdReference
class SUBMITTEREDITAllOf(BaseModel):
"""
SUBMITTEREDITAllOf
"""
- automation_widgets: conlist(IdReference) = Field(..., alias="automationWidgets")
+ automation_widgets: List[IdReference] = Field(..., alias="automationWidgets")
project_view_created_by_other_submitters: Optional[StrictBool] = Field(None, alias="projectViewCreatedByOtherSubmitters", description="View projects created by other Submitters. Default: false")
__properties = ["automationWidgets", "projectViewCreatedByOtherSubmitters"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SUBMITTEREDITAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> SUBMITTEREDITAllOf:
return None
if not isinstance(obj, dict):
- return SUBMITTEREDITAllOf.parse_obj(obj)
+ return SUBMITTEREDITAllOf.model_validate(obj)
- _obj = SUBMITTEREDITAllOf.parse_obj({
+ _obj = SUBMITTEREDITAllOf.model_validate({
"automation_widgets": [IdReference.from_dict(_item) for _item in obj.get("automationWidgets")] if obj.get("automationWidgets") is not None else None,
"project_view_created_by_other_submitters": obj.get("projectViewCreatedByOtherSubmitters")
})
diff --git a/phrasetms_client/models/submitterresponse.py b/phrasetms_client/models/submitterresponse.py
index 9b2e8f00..b84d2db4 100644
--- a/phrasetms_client/models/submitterresponse.py
+++ b/phrasetms_client/models/submitterresponse.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.user_details_dto_v3 import UserDetailsDtoV3
from phrasetms_client.models.user_reference import UserReference
@@ -28,18 +28,14 @@ class SUBMITTERRESPONSE(UserDetailsDtoV3):
"""
SUBMITTERRESPONSE
"""
- automation_widgets: conlist(IdReference) = Field(..., alias="automationWidgets")
+ automation_widgets: List[IdReference] = Field(..., alias="automationWidgets")
project_view_created_by_other_submitters: Optional[StrictBool] = Field(None, alias="projectViewCreatedByOtherSubmitters")
__properties = ["uid", "userName", "firstName", "lastName", "email", "dateCreated", "dateDeleted", "createdBy", "role", "timezone", "note", "receiveNewsletter", "active", "pendingEmailChange", "automationWidgets", "projectViewCreatedByOtherSubmitters"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> SUBMITTERRESPONSE:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -75,9 +71,9 @@ def from_dict(cls, obj: dict) -> SUBMITTERRESPONSE:
return None
if not isinstance(obj, dict):
- return SUBMITTERRESPONSE.parse_obj(obj)
+ return SUBMITTERRESPONSE.model_validate(obj)
- _obj = SUBMITTERRESPONSE.parse_obj({
+ _obj = SUBMITTERRESPONSE.model_validate({
"uid": obj.get("uid"),
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
diff --git a/phrasetms_client/models/submitterresponse_all_of.py b/phrasetms_client/models/submitterresponse_all_of.py
index c6c4fdb0..e10597b1 100644
--- a/phrasetms_client/models/submitterresponse_all_of.py
+++ b/phrasetms_client/models/submitterresponse_all_of.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.id_reference import IdReference
class SUBMITTERRESPONSEAllOf(BaseModel):
"""
SUBMITTERRESPONSEAllOf
"""
- automation_widgets: conlist(IdReference) = Field(..., alias="automationWidgets")
+ automation_widgets: List[IdReference] = Field(..., alias="automationWidgets")
project_view_created_by_other_submitters: Optional[StrictBool] = Field(None, alias="projectViewCreatedByOtherSubmitters")
__properties = ["automationWidgets", "projectViewCreatedByOtherSubmitters"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SUBMITTERRESPONSEAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> SUBMITTERRESPONSEAllOf:
return None
if not isinstance(obj, dict):
- return SUBMITTERRESPONSEAllOf.parse_obj(obj)
+ return SUBMITTERRESPONSEAllOf.model_validate(obj)
- _obj = SUBMITTERRESPONSEAllOf.parse_obj({
+ _obj = SUBMITTERRESPONSEAllOf.model_validate({
"automation_widgets": [IdReference.from_dict(_item) for _item in obj.get("automationWidgets")] if obj.get("automationWidgets") is not None else None,
"project_view_created_by_other_submitters": obj.get("projectViewCreatedByOtherSubmitters")
})
diff --git a/phrasetms_client/models/substitute_dto.py b/phrasetms_client/models/substitute_dto.py
index 732ad40f..9b527499 100644
--- a/phrasetms_client/models/substitute_dto.py
+++ b/phrasetms_client/models/substitute_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class SubstituteDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class SubstituteDto(BaseModel):
target: StrictStr = Field(...)
__properties = ["source", "target"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SubstituteDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> SubstituteDto:
return None
if not isinstance(obj, dict):
- return SubstituteDto.parse_obj(obj)
+ return SubstituteDto.model_validate(obj)
- _obj = SubstituteDto.parse_obj({
+ _obj = SubstituteDto.model_validate({
"source": obj.get("source"),
"target": obj.get("target")
})
diff --git a/phrasetms_client/models/substitute_dto_v2.py b/phrasetms_client/models/substitute_dto_v2.py
index 1a0da10c..37df3dc3 100644
--- a/phrasetms_client/models/substitute_dto_v2.py
+++ b/phrasetms_client/models/substitute_dto_v2.py
@@ -13,30 +13,27 @@
from __future__ import annotations
+from typing_extensions import Annotated
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
class SubstituteDtoV2(BaseModel):
"""
SubstituteDtoV2
"""
- source: constr(strict=True, max_length=1, min_length=1) = Field(...)
- target: constr(strict=True, max_length=1, min_length=1) = Field(...)
+ source: Annotated[str, StringConstraints(strict=True, max_length=1, min_length=1)] = Field(...)
+ target: Annotated[str, StringConstraints(strict=True, max_length=1, min_length=1)] = Field(...)
__properties = ["source", "target"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +46,7 @@ def from_json(cls, json_str: str) -> SubstituteDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +59,9 @@ def from_dict(cls, obj: dict) -> SubstituteDtoV2:
return None
if not isinstance(obj, dict):
- return SubstituteDtoV2.parse_obj(obj)
+ return SubstituteDtoV2.model_validate(obj)
- _obj = SubstituteDtoV2.parse_obj({
+ _obj = SubstituteDtoV2.model_validate({
"source": obj.get("source"),
"target": obj.get("target")
})
diff --git a/phrasetms_client/models/suggest_request_dto.py b/phrasetms_client/models/suggest_request_dto.py
index aa35e9dd..d1cfb063 100644
--- a/phrasetms_client/models/suggest_request_dto.py
+++ b/phrasetms_client/models/suggest_request_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class SuggestRequestDto(BaseModel):
"""
SuggestRequestDto
"""
lang: StrictStr = Field(...)
- words: conlist(StrictStr) = Field(...)
- reference_texts: Optional[conlist(StrictStr)] = Field(None, alias="referenceTexts")
+ words: List[StrictStr] = Field(...)
+ reference_texts: Optional[List[StrictStr]] = Field(None, alias="referenceTexts")
__properties = ["lang", "words", "referenceTexts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SuggestRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> SuggestRequestDto:
return None
if not isinstance(obj, dict):
- return SuggestRequestDto.parse_obj(obj)
+ return SuggestRequestDto.model_validate(obj)
- _obj = SuggestRequestDto.parse_obj({
+ _obj = SuggestRequestDto.model_validate({
"lang": obj.get("lang"),
"words": obj.get("words"),
"reference_texts": obj.get("referenceTexts")
diff --git a/phrasetms_client/models/suggest_response.py b/phrasetms_client/models/suggest_response.py
index 544b1c35..3fc8102a 100644
--- a/phrasetms_client/models/suggest_response.py
+++ b/phrasetms_client/models/suggest_response.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.suggestion import Suggestion
class SuggestResponse(BaseModel):
@@ -27,17 +27,13 @@ class SuggestResponse(BaseModel):
SuggestResponse
"""
word: Optional[StrictStr] = None
- suggestions: Optional[conlist(Suggestion)] = None
+ suggestions: Optional[List[Suggestion]] = None
__properties = ["word", "suggestions"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> SuggestResponse:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> SuggestResponse:
return None
if not isinstance(obj, dict):
- return SuggestResponse.parse_obj(obj)
+ return SuggestResponse.model_validate(obj)
- _obj = SuggestResponse.parse_obj({
+ _obj = SuggestResponse.model_validate({
"word": obj.get("word"),
"suggestions": [Suggestion.from_dict(_item) for _item in obj.get("suggestions")] if obj.get("suggestions") is not None else None
})
diff --git a/phrasetms_client/models/suggest_response_dto.py b/phrasetms_client/models/suggest_response_dto.py
index f715328b..ec9e7ac8 100644
--- a/phrasetms_client/models/suggest_response_dto.py
+++ b/phrasetms_client/models/suggest_response_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.suggest_response import SuggestResponse
class SuggestResponseDto(BaseModel):
"""
SuggestResponseDto
"""
- suggest_results: Optional[conlist(SuggestResponse)] = Field(None, alias="suggestResults")
+ suggest_results: Optional[List[SuggestResponse]] = Field(None, alias="suggestResults")
__properties = ["suggestResults"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> SuggestResponseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> SuggestResponseDto:
return None
if not isinstance(obj, dict):
- return SuggestResponseDto.parse_obj(obj)
+ return SuggestResponseDto.model_validate(obj)
- _obj = SuggestResponseDto.parse_obj({
+ _obj = SuggestResponseDto.model_validate({
"suggest_results": [SuggestResponse.from_dict(_item) for _item in obj.get("suggestResults")] if obj.get("suggestResults") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/suggestion.py b/phrasetms_client/models/suggestion.py
index 9ff0c9eb..4ae878df 100644
--- a/phrasetms_client/models/suggestion.py
+++ b/phrasetms_client/models/suggestion.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class Suggestion(BaseModel):
"""
@@ -28,14 +28,10 @@ class Suggestion(BaseModel):
text: Optional[StrictStr] = None
__properties = ["text"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> Suggestion:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> Suggestion:
return None
if not isinstance(obj, dict):
- return Suggestion.parse_obj(obj)
+ return Suggestion.model_validate(obj)
- _obj = Suggestion.parse_obj({
+ _obj = Suggestion.model_validate({
"text": obj.get("text")
})
return _obj
diff --git a/phrasetms_client/models/supported.py b/phrasetms_client/models/supported.py
index e54ccda3..500430c5 100644
--- a/phrasetms_client/models/supported.py
+++ b/phrasetms_client/models/supported.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool
+from pydantic import BaseModel, ConfigDict, StrictBool
class Supported(BaseModel):
"""
@@ -28,14 +28,10 @@ class Supported(BaseModel):
supported: Optional[StrictBool] = None
__properties = ["supported"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> Supported:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> Supported:
return None
if not isinstance(obj, dict):
- return Supported.parse_obj(obj)
+ return Supported.model_validate(obj)
- _obj = Supported.parse_obj({
+ _obj = Supported.model_validate({
"supported": obj.get("supported")
})
return _obj
diff --git a/phrasetms_client/models/tag_metadata.py b/phrasetms_client/models/tag_metadata.py
index 775662c4..4e36c1e7 100644
--- a/phrasetms_client/models/tag_metadata.py
+++ b/phrasetms_client/models/tag_metadata.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TagMetadata(BaseModel):
"""
@@ -31,14 +31,10 @@ class TagMetadata(BaseModel):
trans_attributes: Optional[StrictStr] = Field(None, alias="transAttributes")
__properties = ["id", "type", "content", "transAttributes"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> TagMetadata:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> TagMetadata:
return None
if not isinstance(obj, dict):
- return TagMetadata.parse_obj(obj)
+ return TagMetadata.model_validate(obj)
- _obj = TagMetadata.parse_obj({
+ _obj = TagMetadata.model_validate({
"id": obj.get("id"),
"type": obj.get("type"),
"content": obj.get("content"),
diff --git a/phrasetms_client/models/tag_metadata_dto.py b/phrasetms_client/models/tag_metadata_dto.py
index 3f3039e0..b184570c 100644
--- a/phrasetms_client/models/tag_metadata_dto.py
+++ b/phrasetms_client/models/tag_metadata_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TagMetadataDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class TagMetadataDto(BaseModel):
trans_attributes: Optional[StrictStr] = Field(None, alias="transAttributes")
__properties = ["id", "type", "content", "transAttributes"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> TagMetadataDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> TagMetadataDto:
return None
if not isinstance(obj, dict):
- return TagMetadataDto.parse_obj(obj)
+ return TagMetadataDto.model_validate(obj)
- _obj = TagMetadataDto.parse_obj({
+ _obj = TagMetadataDto.model_validate({
"id": obj.get("id"),
"type": obj.get("type"),
"content": obj.get("content"),
diff --git a/phrasetms_client/models/target_file_warnings_dto.py b/phrasetms_client/models/target_file_warnings_dto.py
index 5031b86c..d9f4cd58 100644
--- a/phrasetms_client/models/target_file_warnings_dto.py
+++ b/phrasetms_client/models/target_file_warnings_dto.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
class TargetFileWarningsDto(BaseModel):
"""
TargetFileWarningsDto
"""
- warnings: Optional[conlist(StrictStr)] = None
+ warnings: Optional[List[StrictStr]] = None
__properties = ["warnings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TargetFileWarningsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TargetFileWarningsDto:
return None
if not isinstance(obj, dict):
- return TargetFileWarningsDto.parse_obj(obj)
+ return TargetFileWarningsDto.model_validate(obj)
- _obj = TargetFileWarningsDto.parse_obj({
+ _obj = TargetFileWarningsDto.model_validate({
"warnings": obj.get("warnings")
})
return _obj
diff --git a/phrasetms_client/models/target_language_dto.py b/phrasetms_client/models/target_language_dto.py
index cf9cd6a8..8b46d335 100644
--- a/phrasetms_client/models/target_language_dto.py
+++ b/phrasetms_client/models/target_language_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TargetLanguageDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class TargetLanguageDto(BaseModel):
language: StrictStr = Field(...)
__properties = ["language"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TargetLanguageDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TargetLanguageDto:
return None
if not isinstance(obj, dict):
- return TargetLanguageDto.parse_obj(obj)
+ return TargetLanguageDto.model_validate(obj)
- _obj = TargetLanguageDto.parse_obj({
+ _obj = TargetLanguageDto.model_validate({
"language": obj.get("language")
})
return _obj
diff --git a/phrasetms_client/models/target_source_identical_warning_dto.py b/phrasetms_client/models/target_source_identical_warning_dto.py
index 009b8f5b..49450b82 100644
--- a/phrasetms_client/models/target_source_identical_warning_dto.py
+++ b/phrasetms_client/models/target_source_identical_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class TargetSourceIdenticalWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class TargetSourceIdenticalWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TargetSourceIdenticalWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TargetSourceIdenticalWarningDto:
return None
if not isinstance(obj, dict):
- return TargetSourceIdenticalWarningDto.parse_obj(obj)
+ return TargetSourceIdenticalWarningDto.model_validate(obj)
- _obj = TargetSourceIdenticalWarningDto.parse_obj({
+ _obj = TargetSourceIdenticalWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/task_mapping_dto.py b/phrasetms_client/models/task_mapping_dto.py
index eab9687d..2fbb1c33 100644
--- a/phrasetms_client/models/task_mapping_dto.py
+++ b/phrasetms_client/models/task_mapping_dto.py
@@ -19,7 +19,7 @@
from typing import Any, Dict, Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TaskMappingDto(BaseModel):
"""
@@ -32,14 +32,10 @@ class TaskMappingDto(BaseModel):
job: Optional[Dict[str, Any]] = None
__properties = ["taskId", "workflowLevel", "resourcePath", "project", "job"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> TaskMappingDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> TaskMappingDto:
return None
if not isinstance(obj, dict):
- return TaskMappingDto.parse_obj(obj)
+ return TaskMappingDto.model_validate(obj)
- _obj = TaskMappingDto.parse_obj({
+ _obj = TaskMappingDto.model_validate({
"task_id": obj.get("taskId"),
"workflow_level": obj.get("workflowLevel"),
"resource_path": obj.get("resourcePath"),
diff --git a/phrasetms_client/models/term.py b/phrasetms_client/models/term.py
index 7783df71..5baebc3c 100644
--- a/phrasetms_client/models/term.py
+++ b/phrasetms_client/models/term.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
class Term(BaseModel):
"""
@@ -29,14 +29,10 @@ class Term(BaseModel):
preferred: Optional[StrictBool] = None
__properties = ["text", "preferred"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> Term:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> Term:
return None
if not isinstance(obj, dict):
- return Term.parse_obj(obj)
+ return Term.model_validate(obj)
- _obj = Term.parse_obj({
+ _obj = Term.model_validate({
"text": obj.get("text"),
"preferred": obj.get("preferred")
})
diff --git a/phrasetms_client/models/term_base_dto.py b/phrasetms_client/models/term_base_dto.py
index 8b5446a2..2afbeb6e 100644
--- a/phrasetms_client/models/term_base_dto.py
+++ b/phrasetms_client/models/term_base_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -34,7 +34,7 @@ class TermBaseDto(BaseModel):
uid: Optional[StrictStr] = None
internal_id: Optional[StrictInt] = Field(None, alias="internalId")
name: StrictStr = Field(...)
- langs: Optional[conlist(StrictStr)] = None
+ langs: Optional[List[StrictStr]] = None
client: Optional[ClientReference] = None
domain: Optional[DomainReference] = None
sub_domain: Optional[SubDomainReference] = Field(None, alias="subDomain")
@@ -46,14 +46,10 @@ class TermBaseDto(BaseModel):
can_show: Optional[StrictBool] = Field(None, alias="canShow")
__properties = ["id", "uid", "internalId", "name", "langs", "client", "domain", "subDomain", "businessUnit", "createdBy", "owner", "dateCreated", "note", "canShow"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -66,7 +62,7 @@ def from_json(cls, json_str: str) -> TermBaseDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -97,9 +93,9 @@ def from_dict(cls, obj: dict) -> TermBaseDto:
return None
if not isinstance(obj, dict):
- return TermBaseDto.parse_obj(obj)
+ return TermBaseDto.model_validate(obj)
- _obj = TermBaseDto.parse_obj({
+ _obj = TermBaseDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/term_base_edit_dto.py b/phrasetms_client/models/term_base_edit_dto.py
index 28b64902..c2cfbdca 100644
--- a/phrasetms_client/models/term_base_edit_dto.py
+++ b/phrasetms_client/models/term_base_edit_dto.py
@@ -18,32 +18,29 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
class TermBaseEditDto(BaseModel):
"""
TermBaseEditDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
- langs: conlist(StrictStr, max_items=2147483647, min_items=1) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ langs: List[StrictStr] = Field(...)
client: Optional[IdReference] = None
domain: Optional[IdReference] = None
sub_domain: Optional[IdReference] = Field(None, alias="subDomain")
business_unit: Optional[IdReference] = Field(None, alias="businessUnit")
owner: Optional[IdReference] = None
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
__properties = ["name", "langs", "client", "domain", "subDomain", "businessUnit", "owner", "note"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +53,7 @@ def from_json(cls, json_str: str) -> TermBaseEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -84,9 +81,9 @@ def from_dict(cls, obj: dict) -> TermBaseEditDto:
return None
if not isinstance(obj, dict):
- return TermBaseEditDto.parse_obj(obj)
+ return TermBaseEditDto.model_validate(obj)
- _obj = TermBaseEditDto.parse_obj({
+ _obj = TermBaseEditDto.model_validate({
"name": obj.get("name"),
"langs": obj.get("langs"),
"client": IdReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
diff --git a/phrasetms_client/models/term_base_reference.py b/phrasetms_client/models/term_base_reference.py
index b790d63c..3e61fbf0 100644
--- a/phrasetms_client/models/term_base_reference.py
+++ b/phrasetms_client/models/term_base_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class TermBaseReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class TermBaseReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["name", "id", "uid"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> TermBaseReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> TermBaseReference:
return None
if not isinstance(obj, dict):
- return TermBaseReference.parse_obj(obj)
+ return TermBaseReference.model_validate(obj)
- _obj = TermBaseReference.parse_obj({
+ _obj = TermBaseReference.model_validate({
"name": obj.get("name"),
"id": str(obj.get("id")),
"uid": obj.get("uid")
diff --git a/phrasetms_client/models/term_base_search_request_dto.py b/phrasetms_client/models/term_base_search_request_dto.py
index 27c38582..f5bbfcb9 100644
--- a/phrasetms_client/models/term_base_search_request_dto.py
+++ b/phrasetms_client/models/term_base_search_request_dto.py
@@ -19,19 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class TermBaseSearchRequestDto(BaseModel):
"""
TermBaseSearchRequestDto
"""
- target_langs: conlist(StrictStr) = Field(..., alias="targetLangs")
+ target_langs: List[StrictStr] = Field(..., alias="targetLangs")
source_lang: StrictStr = Field(..., alias="sourceLang")
query: StrictStr = Field(...)
status: Optional[StrictStr] = None
__properties = ["targetLangs", "sourceLang", "query", "status"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -41,14 +42,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('New', 'Approved')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -61,7 +58,7 @@ def from_json(cls, json_str: str) -> TermBaseSearchRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +71,9 @@ def from_dict(cls, obj: dict) -> TermBaseSearchRequestDto:
return None
if not isinstance(obj, dict):
- return TermBaseSearchRequestDto.parse_obj(obj)
+ return TermBaseSearchRequestDto.model_validate(obj)
- _obj = TermBaseSearchRequestDto.parse_obj({
+ _obj = TermBaseSearchRequestDto.model_validate({
"target_langs": obj.get("targetLangs"),
"source_lang": obj.get("sourceLang"),
"query": obj.get("query"),
diff --git a/phrasetms_client/models/term_create_by_job_dto.py b/phrasetms_client/models/term_create_by_job_dto.py
index f3673916..6979bd97 100644
--- a/phrasetms_client/models/term_create_by_job_dto.py
+++ b/phrasetms_client/models/term_create_by_job_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class TermCreateByJobDto(BaseModel):
"""
@@ -39,7 +39,8 @@ class TermCreateByJobDto(BaseModel):
number: Optional[StrictStr] = None
__properties = ["text", "caseSensitive", "exactMatch", "forbidden", "preferred", "usage", "note", "shortTranslation", "termType", "partOfSpeech", "gender", "number"]
- @validator('term_type')
+ @field_validator('term_type')
+ @classmethod
def term_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -49,7 +50,8 @@ def term_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FULL_FORM', 'SHORT_FORM', 'ACRONYM', 'ABBREVIATION', 'PHRASE', 'VARIANT')")
return value
- @validator('part_of_speech')
+ @field_validator('part_of_speech')
+ @classmethod
def part_of_speech_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -59,7 +61,8 @@ def part_of_speech_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ADJECTIVE', 'NOUN', 'VERB', 'ADVERB')")
return value
- @validator('gender')
+ @field_validator('gender')
+ @classmethod
def gender_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -69,7 +72,8 @@ def gender_validate_enum(cls, value):
raise ValueError("must be one of enum values ('MASCULINE', 'FEMININE', 'NEUTRAL')")
return value
- @validator('number')
+ @field_validator('number')
+ @classmethod
def number_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -79,14 +83,10 @@ def number_validate_enum(cls, value):
raise ValueError("must be one of enum values ('SINGULAR', 'PLURAL', 'UNCOUNTABLE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -99,7 +99,7 @@ def from_json(cls, json_str: str) -> TermCreateByJobDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -112,9 +112,9 @@ def from_dict(cls, obj: dict) -> TermCreateByJobDto:
return None
if not isinstance(obj, dict):
- return TermCreateByJobDto.parse_obj(obj)
+ return TermCreateByJobDto.model_validate(obj)
- _obj = TermCreateByJobDto.parse_obj({
+ _obj = TermCreateByJobDto.model_validate({
"text": obj.get("text"),
"case_sensitive": obj.get("caseSensitive"),
"exact_match": obj.get("exactMatch"),
diff --git a/phrasetms_client/models/term_create_dto.py b/phrasetms_client/models/term_create_dto.py
index c75fd7e9..fa5facdf 100644
--- a/phrasetms_client/models/term_create_dto.py
+++ b/phrasetms_client/models/term_create_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class TermCreateDto(BaseModel):
"""
@@ -42,7 +42,8 @@ class TermCreateDto(BaseModel):
number: Optional[StrictStr] = None
__properties = ["text", "lang", "caseSensitive", "exactMatch", "forbidden", "preferred", "status", "conceptId", "usage", "note", "shortTranslation", "termType", "partOfSpeech", "gender", "number"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -52,7 +53,8 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('New', 'Approved')")
return value
- @validator('term_type')
+ @field_validator('term_type')
+ @classmethod
def term_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -62,7 +64,8 @@ def term_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FULL_FORM', 'SHORT_FORM', 'ACRONYM', 'ABBREVIATION', 'PHRASE', 'VARIANT')")
return value
- @validator('part_of_speech')
+ @field_validator('part_of_speech')
+ @classmethod
def part_of_speech_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -72,7 +75,8 @@ def part_of_speech_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ADJECTIVE', 'NOUN', 'VERB', 'ADVERB')")
return value
- @validator('gender')
+ @field_validator('gender')
+ @classmethod
def gender_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -82,7 +86,8 @@ def gender_validate_enum(cls, value):
raise ValueError("must be one of enum values ('MASCULINE', 'FEMININE', 'NEUTRAL')")
return value
- @validator('number')
+ @field_validator('number')
+ @classmethod
def number_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -92,14 +97,10 @@ def number_validate_enum(cls, value):
raise ValueError("must be one of enum values ('SINGULAR', 'PLURAL', 'UNCOUNTABLE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -112,7 +113,7 @@ def from_json(cls, json_str: str) -> TermCreateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -125,9 +126,9 @@ def from_dict(cls, obj: dict) -> TermCreateDto:
return None
if not isinstance(obj, dict):
- return TermCreateDto.parse_obj(obj)
+ return TermCreateDto.model_validate(obj)
- _obj = TermCreateDto.parse_obj({
+ _obj = TermCreateDto.model_validate({
"text": obj.get("text"),
"lang": obj.get("lang"),
"case_sensitive": obj.get("caseSensitive"),
diff --git a/phrasetms_client/models/term_dto.py b/phrasetms_client/models/term_dto.py
index fe373c1c..6910f6b7 100644
--- a/phrasetms_client/models/term_dto.py
+++ b/phrasetms_client/models/term_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.user_reference import UserReference
class TermDto(BaseModel):
@@ -50,12 +50,13 @@ class TermDto(BaseModel):
number: Optional[StrictStr] = None
definition: Optional[StrictStr] = None
domain: Optional[StrictStr] = None
- sub_domains: Optional[conlist(StrictStr)] = Field(None, alias="subDomains")
+ sub_domains: Optional[List[StrictStr]] = Field(None, alias="subDomains")
url: Optional[StrictStr] = None
concept_note: Optional[StrictStr] = Field(None, alias="conceptNote")
__properties = ["id", "text", "lang", "rtl", "modifiedAt", "createdAt", "modifiedBy", "createdBy", "caseSensitive", "exactMatch", "forbidden", "preferred", "status", "conceptId", "usage", "note", "writable", "shortTranslation", "termType", "partOfSpeech", "gender", "number", "definition", "domain", "subDomains", "url", "conceptNote"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -65,14 +66,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('New', 'Approved')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -85,7 +82,7 @@ def from_json(cls, json_str: str) -> TermDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -104,9 +101,9 @@ def from_dict(cls, obj: dict) -> TermDto:
return None
if not isinstance(obj, dict):
- return TermDto.parse_obj(obj)
+ return TermDto.model_validate(obj)
- _obj = TermDto.parse_obj({
+ _obj = TermDto.model_validate({
"id": obj.get("id"),
"text": obj.get("text"),
"lang": obj.get("lang"),
diff --git a/phrasetms_client/models/term_edit_dto.py b/phrasetms_client/models/term_edit_dto.py
index 1ca236a9..4c25e807 100644
--- a/phrasetms_client/models/term_edit_dto.py
+++ b/phrasetms_client/models/term_edit_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class TermEditDto(BaseModel):
"""
@@ -41,7 +41,8 @@ class TermEditDto(BaseModel):
number: Optional[StrictStr] = None
__properties = ["text", "lang", "caseSensitive", "exactMatch", "forbidden", "preferred", "status", "usage", "note", "shortTranslation", "termType", "partOfSpeech", "gender", "number"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -51,7 +52,8 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('New', 'Approved')")
return value
- @validator('term_type')
+ @field_validator('term_type')
+ @classmethod
def term_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -61,7 +63,8 @@ def term_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('FULL_FORM', 'SHORT_FORM', 'ACRONYM', 'ABBREVIATION', 'PHRASE', 'VARIANT')")
return value
- @validator('part_of_speech')
+ @field_validator('part_of_speech')
+ @classmethod
def part_of_speech_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -71,7 +74,8 @@ def part_of_speech_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ADJECTIVE', 'NOUN', 'VERB', 'ADVERB')")
return value
- @validator('gender')
+ @field_validator('gender')
+ @classmethod
def gender_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -81,7 +85,8 @@ def gender_validate_enum(cls, value):
raise ValueError("must be one of enum values ('MASCULINE', 'FEMININE', 'NEUTRAL')")
return value
- @validator('number')
+ @field_validator('number')
+ @classmethod
def number_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -91,14 +96,10 @@ def number_validate_enum(cls, value):
raise ValueError("must be one of enum values ('SINGULAR', 'PLURAL', 'UNCOUNTABLE')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -111,7 +112,7 @@ def from_json(cls, json_str: str) -> TermEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -124,9 +125,9 @@ def from_dict(cls, obj: dict) -> TermEditDto:
return None
if not isinstance(obj, dict):
- return TermEditDto.parse_obj(obj)
+ return TermEditDto.model_validate(obj)
- _obj = TermEditDto.parse_obj({
+ _obj = TermEditDto.model_validate({
"text": obj.get("text"),
"lang": obj.get("lang"),
"case_sensitive": obj.get("caseSensitive"),
diff --git a/phrasetms_client/models/term_pair_dto.py b/phrasetms_client/models/term_pair_dto.py
index ce83ee1b..7d390e59 100644
--- a/phrasetms_client/models/term_pair_dto.py
+++ b/phrasetms_client/models/term_pair_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.term_dto import TermDto
class TermPairDto(BaseModel):
@@ -30,14 +30,10 @@ class TermPairDto(BaseModel):
target_term: TermDto = Field(..., alias="targetTerm")
__properties = ["sourceTerm", "targetTerm"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> TermPairDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> TermPairDto:
return None
if not isinstance(obj, dict):
- return TermPairDto.parse_obj(obj)
+ return TermPairDto.model_validate(obj)
- _obj = TermPairDto.parse_obj({
+ _obj = TermPairDto.model_validate({
"source_term": TermDto.from_dict(obj.get("sourceTerm")) if obj.get("sourceTerm") is not None else None,
"target_term": TermDto.from_dict(obj.get("targetTerm")) if obj.get("targetTerm") is not None else None
})
diff --git a/phrasetms_client/models/term_v2_dto.py b/phrasetms_client/models/term_v2_dto.py
index 2ecd966d..f8e6e1e3 100644
--- a/phrasetms_client/models/term_v2_dto.py
+++ b/phrasetms_client/models/term_v2_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.user_reference import UserReference
class TermV2Dto(BaseModel):
@@ -50,7 +50,8 @@ class TermV2Dto(BaseModel):
number: Optional[StrictStr] = None
__properties = ["id", "text", "lang", "rtl", "modifiedAt", "createdAt", "modifiedBy", "createdBy", "caseSensitive", "exactMatch", "forbidden", "preferred", "status", "conceptId", "usage", "note", "writable", "shortTranslation", "termType", "partOfSpeech", "gender", "number"]
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -60,14 +61,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('New', 'Approved')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -80,7 +77,7 @@ def from_json(cls, json_str: str) -> TermV2Dto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -99,9 +96,9 @@ def from_dict(cls, obj: dict) -> TermV2Dto:
return None
if not isinstance(obj, dict):
- return TermV2Dto.parse_obj(obj)
+ return TermV2Dto.model_validate(obj)
- _obj = TermV2Dto.parse_obj({
+ _obj = TermV2Dto.model_validate({
"id": obj.get("id"),
"text": obj.get("text"),
"lang": obj.get("lang"),
diff --git a/phrasetms_client/models/terminology_warning_dto.py b/phrasetms_client/models/terminology_warning_dto.py
index 485ff8b2..d5cd6bae 100644
--- a/phrasetms_client/models/terminology_warning_dto.py
+++ b/phrasetms_client/models/terminology_warning_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class TerminologyWarningDto(SegmentWarning):
"""
TerminologyWarningDto
"""
- missing_terms: Optional[conlist(StrictStr)] = Field(None, alias="missingTerms")
- forbidden_terms: Optional[conlist(StrictStr)] = Field(None, alias="forbiddenTerms")
+ missing_terms: Optional[List[StrictStr]] = Field(None, alias="missingTerms")
+ forbidden_terms: Optional[List[StrictStr]] = Field(None, alias="forbiddenTerms")
__properties = ["id", "ignored", "type", "repetitionGroupId", "missingTerms", "forbiddenTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> TerminologyWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> TerminologyWarningDto:
return None
if not isinstance(obj, dict):
- return TerminologyWarningDto.parse_obj(obj)
+ return TerminologyWarningDto.model_validate(obj)
- _obj = TerminologyWarningDto.parse_obj({
+ _obj = TerminologyWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/terminology_warning_dto_all_of.py b/phrasetms_client/models/terminology_warning_dto_all_of.py
index c762536b..a371c068 100644
--- a/phrasetms_client/models/terminology_warning_dto_all_of.py
+++ b/phrasetms_client/models/terminology_warning_dto_all_of.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TerminologyWarningDtoAllOf(BaseModel):
"""
TerminologyWarningDtoAllOf
"""
- missing_terms: Optional[conlist(StrictStr)] = Field(None, alias="missingTerms")
- forbidden_terms: Optional[conlist(StrictStr)] = Field(None, alias="forbiddenTerms")
+ missing_terms: Optional[List[StrictStr]] = Field(None, alias="missingTerms")
+ forbidden_terms: Optional[List[StrictStr]] = Field(None, alias="forbiddenTerms")
__properties = ["missingTerms", "forbiddenTerms"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> TerminologyWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> TerminologyWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return TerminologyWarningDtoAllOf.parse_obj(obj)
+ return TerminologyWarningDtoAllOf.model_validate(obj)
- _obj = TerminologyWarningDtoAllOf.parse_obj({
+ _obj = TerminologyWarningDtoAllOf.model_validate({
"missing_terms": obj.get("missingTerms"),
"forbidden_terms": obj.get("forbiddenTerms")
})
diff --git a/phrasetms_client/models/terminology_weights_dto.py b/phrasetms_client/models/terminology_weights_dto.py
index 5966a440..73a43a01 100644
--- a/phrasetms_client/models/terminology_weights_dto.py
+++ b/phrasetms_client/models/terminology_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class TerminologyWeightsDto(BaseModel):
@@ -31,14 +31,10 @@ class TerminologyWeightsDto(BaseModel):
inconsistent_use_of_terminology: Optional[ToggleableWeightDto] = Field(None, alias="inconsistentUseOfTerminology")
__properties = ["terminology", "inconsistentWithTb", "inconsistentUseOfTerminology"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> TerminologyWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -73,9 +69,9 @@ def from_dict(cls, obj: dict) -> TerminologyWeightsDto:
return None
if not isinstance(obj, dict):
- return TerminologyWeightsDto.parse_obj(obj)
+ return TerminologyWeightsDto.model_validate(obj)
- _obj = TerminologyWeightsDto.parse_obj({
+ _obj = TerminologyWeightsDto.model_validate({
"terminology": ToggleableWeightDto.from_dict(obj.get("terminology")) if obj.get("terminology") is not None else None,
"inconsistent_with_tb": ToggleableWeightDto.from_dict(obj.get("inconsistentWithTb")) if obj.get("inconsistentWithTb") is not None else None,
"inconsistent_use_of_terminology": ToggleableWeightDto.from_dict(obj.get("inconsistentUseOfTerminology")) if obj.get("inconsistentUseOfTerminology") is not None else None
diff --git a/phrasetms_client/models/tm_match_settings_dto.py b/phrasetms_client/models/tm_match_settings_dto.py
index e02c6ef1..889c53a1 100644
--- a/phrasetms_client/models/tm_match_settings_dto.py
+++ b/phrasetms_client/models/tm_match_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.metadata_priority_settings_dto import MetadataPrioritySettingsDto
class TMMatchSettingsDto(BaseModel):
@@ -33,7 +33,8 @@ class TMMatchSettingsDto(BaseModel):
metadata_priority: Optional[MetadataPrioritySettingsDto] = Field(None, alias="metadataPriority")
__properties = ["contextType", "prevOrNextSegment", "penalizeMultiContextMatch", "ignoreTagMetadata", "metadataPriority"]
- @validator('context_type')
+ @field_validator('context_type')
+ @classmethod
def context_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -43,14 +44,10 @@ def context_type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('AUTO', 'PREV_AND_NEXT_SEGMENT', 'SEGMENT_KEY', 'NO_CONTEXT')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -63,7 +60,7 @@ def from_json(cls, json_str: str) -> TMMatchSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -79,9 +76,9 @@ def from_dict(cls, obj: dict) -> TMMatchSettingsDto:
return None
if not isinstance(obj, dict):
- return TMMatchSettingsDto.parse_obj(obj)
+ return TMMatchSettingsDto.model_validate(obj)
- _obj = TMMatchSettingsDto.parse_obj({
+ _obj = TMMatchSettingsDto.model_validate({
"context_type": obj.get("contextType"),
"prev_or_next_segment": obj.get("prevOrNextSegment"),
"penalize_multi_context_match": obj.get("penalizeMultiContextMatch"),
diff --git a/phrasetms_client/models/toggleable_weight_dto.py b/phrasetms_client/models/toggleable_weight_dto.py
index 7c1f2f96..45dd1491 100644
--- a/phrasetms_client/models/toggleable_weight_dto.py
+++ b/phrasetms_client/models/toggleable_weight_dto.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictFloat, StrictInt
class ToggleableWeightDto(BaseModel):
"""
@@ -30,14 +30,10 @@ class ToggleableWeightDto(BaseModel):
code: Optional[StrictInt] = Field(None, description="Code of the error category")
__properties = ["enabled", "weight", "code"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> ToggleableWeightDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> ToggleableWeightDto:
return None
if not isinstance(obj, dict):
- return ToggleableWeightDto.parse_obj(obj)
+ return ToggleableWeightDto.model_validate(obj)
- _obj = ToggleableWeightDto.parse_obj({
+ _obj = ToggleableWeightDto.model_validate({
"enabled": obj.get("enabled"),
"weight": obj.get("weight"),
"code": obj.get("code")
diff --git a/phrasetms_client/models/trailing_punctuation_warning_dto.py b/phrasetms_client/models/trailing_punctuation_warning_dto.py
index 12183b8a..a2bac63d 100644
--- a/phrasetms_client/models/trailing_punctuation_warning_dto.py
+++ b/phrasetms_client/models/trailing_punctuation_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
from phrasetms_client.models.segment_warning import SegmentWarning
@@ -33,14 +33,10 @@ class TrailingPunctuationWarningDto(SegmentWarning):
tgt_end_punctuation: Optional[StrictStr] = Field(None, alias="tgtEndPunctuation")
__properties = ["id", "ignored", "type", "repetitionGroupId", "srcPosition", "srcEndPunctuation", "tgtPosition", "tgtEndPunctuation"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> TrailingPunctuationWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> TrailingPunctuationWarningDto:
return None
if not isinstance(obj, dict):
- return TrailingPunctuationWarningDto.parse_obj(obj)
+ return TrailingPunctuationWarningDto.model_validate(obj)
- _obj = TrailingPunctuationWarningDto.parse_obj({
+ _obj = TrailingPunctuationWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/trailing_punctuation_warning_dto_all_of.py b/phrasetms_client/models/trailing_punctuation_warning_dto_all_of.py
index f9daed75..48baa1d6 100644
--- a/phrasetms_client/models/trailing_punctuation_warning_dto_all_of.py
+++ b/phrasetms_client/models/trailing_punctuation_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.position import Position
class TrailingPunctuationWarningDtoAllOf(BaseModel):
@@ -32,14 +32,10 @@ class TrailingPunctuationWarningDtoAllOf(BaseModel):
tgt_end_punctuation: Optional[StrictStr] = Field(None, alias="tgtEndPunctuation")
__properties = ["srcPosition", "srcEndPunctuation", "tgtPosition", "tgtEndPunctuation"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> TrailingPunctuationWarningDtoAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> TrailingPunctuationWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return TrailingPunctuationWarningDtoAllOf.parse_obj(obj)
+ return TrailingPunctuationWarningDtoAllOf.model_validate(obj)
- _obj = TrailingPunctuationWarningDtoAllOf.parse_obj({
+ _obj = TrailingPunctuationWarningDtoAllOf.model_validate({
"src_position": Position.from_dict(obj.get("srcPosition")) if obj.get("srcPosition") is not None else None,
"src_end_punctuation": obj.get("srcEndPunctuation"),
"tgt_position": Position.from_dict(obj.get("tgtPosition")) if obj.get("tgtPosition") is not None else None,
diff --git a/phrasetms_client/models/trailing_space_warning_dto.py b/phrasetms_client/models/trailing_space_warning_dto.py
index a3107e4d..045238e0 100644
--- a/phrasetms_client/models/trailing_space_warning_dto.py
+++ b/phrasetms_client/models/trailing_space_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class TrailingSpaceWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class TrailingSpaceWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TrailingSpaceWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TrailingSpaceWarningDto:
return None
if not isinstance(obj, dict):
- return TrailingSpaceWarningDto.parse_obj(obj)
+ return TrailingSpaceWarningDto.model_validate(obj)
- _obj = TrailingSpaceWarningDto.parse_obj({
+ _obj = TrailingSpaceWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/trans_memory_create_dto.py b/phrasetms_client/models/trans_memory_create_dto.py
index 13ab148e..a772ec9d 100644
--- a/phrasetms_client/models/trans_memory_create_dto.py
+++ b/phrasetms_client/models/trans_memory_create_dto.py
@@ -18,32 +18,29 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
class TransMemoryCreateDto(BaseModel):
"""
TransMemoryCreateDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
source_lang: StrictStr = Field(..., alias="sourceLang")
- target_langs: conlist(StrictStr) = Field(..., alias="targetLangs")
+ target_langs: List[StrictStr] = Field(..., alias="targetLangs")
client: Optional[IdReference] = None
business_unit: Optional[IdReference] = Field(None, alias="businessUnit")
domain: Optional[IdReference] = None
sub_domain: Optional[IdReference] = Field(None, alias="subDomain")
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
__properties = ["name", "sourceLang", "targetLangs", "client", "businessUnit", "domain", "subDomain", "note"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +53,7 @@ def from_json(cls, json_str: str) -> TransMemoryCreateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +78,9 @@ def from_dict(cls, obj: dict) -> TransMemoryCreateDto:
return None
if not isinstance(obj, dict):
- return TransMemoryCreateDto.parse_obj(obj)
+ return TransMemoryCreateDto.model_validate(obj)
- _obj = TransMemoryCreateDto.parse_obj({
+ _obj = TransMemoryCreateDto.model_validate({
"name": obj.get("name"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs"),
diff --git a/phrasetms_client/models/trans_memory_dto.py b/phrasetms_client/models/trans_memory_dto.py
index 0aedb474..453265af 100644
--- a/phrasetms_client/models/trans_memory_dto.py
+++ b/phrasetms_client/models/trans_memory_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -35,7 +35,7 @@ class TransMemoryDto(BaseModel):
internal_id: Optional[StrictInt] = Field(None, alias="internalId")
name: Optional[StrictStr] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
client: Optional[ClientReference] = None
business_unit: Optional[BusinessUnitReference] = Field(None, alias="businessUnit")
domain: Optional[DomainReference] = None
@@ -46,14 +46,10 @@ class TransMemoryDto(BaseModel):
owner: Optional[UserReference] = None
__properties = ["id", "uid", "internalId", "name", "sourceLang", "targetLangs", "client", "businessUnit", "domain", "subDomain", "note", "dateCreated", "createdBy", "owner"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -66,7 +62,7 @@ def from_json(cls, json_str: str) -> TransMemoryDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -97,9 +93,9 @@ def from_dict(cls, obj: dict) -> TransMemoryDto:
return None
if not isinstance(obj, dict):
- return TransMemoryDto.parse_obj(obj)
+ return TransMemoryDto.model_validate(obj)
- _obj = TransMemoryDto.parse_obj({
+ _obj = TransMemoryDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/trans_memory_dto_v2.py b/phrasetms_client/models/trans_memory_dto_v2.py
index 7d56ad83..7fb34d2e 100644
--- a/phrasetms_client/models/trans_memory_dto_v2.py
+++ b/phrasetms_client/models/trans_memory_dto_v2.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -35,7 +35,7 @@ class TransMemoryDtoV2(BaseModel):
internal_id: Optional[StrictInt] = Field(None, alias="internalId")
name: Optional[StrictStr] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
client: Optional[ClientReference] = None
business_unit: Optional[BusinessUnitReference] = Field(None, alias="businessUnit")
domain: Optional[DomainReference] = None
@@ -45,14 +45,10 @@ class TransMemoryDtoV2(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "internalId", "name", "sourceLang", "targetLangs", "client", "businessUnit", "domain", "subDomain", "note", "dateCreated", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +61,7 @@ def from_json(cls, json_str: str) -> TransMemoryDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -93,9 +89,9 @@ def from_dict(cls, obj: dict) -> TransMemoryDtoV2:
return None
if not isinstance(obj, dict):
- return TransMemoryDtoV2.parse_obj(obj)
+ return TransMemoryDtoV2.model_validate(obj)
- _obj = TransMemoryDtoV2.parse_obj({
+ _obj = TransMemoryDtoV2.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/trans_memory_dto_v3.py b/phrasetms_client/models/trans_memory_dto_v3.py
index 7b723a9e..e3811c5e 100644
--- a/phrasetms_client/models/trans_memory_dto_v3.py
+++ b/phrasetms_client/models/trans_memory_dto_v3.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -35,7 +35,7 @@ class TransMemoryDtoV3(BaseModel):
internal_id: Optional[StrictInt] = Field(None, alias="internalId")
name: Optional[StrictStr] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
client: Optional[ClientReference] = None
business_unit: Optional[BusinessUnitReference] = Field(None, alias="businessUnit")
domain: Optional[DomainReference] = None
@@ -45,14 +45,10 @@ class TransMemoryDtoV3(BaseModel):
created_by: Optional[UserReference] = Field(None, alias="createdBy")
__properties = ["id", "uid", "internalId", "name", "sourceLang", "targetLangs", "client", "businessUnit", "domain", "subDomain", "note", "dateCreated", "createdBy"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +61,7 @@ def from_json(cls, json_str: str) -> TransMemoryDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -93,9 +89,9 @@ def from_dict(cls, obj: dict) -> TransMemoryDtoV3:
return None
if not isinstance(obj, dict):
- return TransMemoryDtoV3.parse_obj(obj)
+ return TransMemoryDtoV3.model_validate(obj)
- _obj = TransMemoryDtoV3.parse_obj({
+ _obj = TransMemoryDtoV3.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/trans_memory_edit_dto.py b/phrasetms_client/models/trans_memory_edit_dto.py
index ef70f503..4113c038 100644
--- a/phrasetms_client/models/trans_memory_edit_dto.py
+++ b/phrasetms_client/models/trans_memory_edit_dto.py
@@ -18,32 +18,29 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, StringConstraints
from phrasetms_client.models.id_reference import IdReference
class TransMemoryEditDto(BaseModel):
"""
TransMemoryEditDto
"""
- name: constr(strict=True, max_length=255, min_length=0) = Field(...)
- target_langs: conlist(StrictStr) = Field(..., alias="targetLangs", description="New target languages to add. No languages can be removed")
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ target_langs: List[StrictStr] = Field(..., alias="targetLangs", description="New target languages to add. No languages can be removed")
client: Optional[IdReference] = None
business_unit: Optional[IdReference] = Field(None, alias="businessUnit")
domain: Optional[IdReference] = None
sub_domain: Optional[IdReference] = Field(None, alias="subDomain")
owner: Optional[IdReference] = None
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
__properties = ["name", "targetLangs", "client", "businessUnit", "domain", "subDomain", "owner", "note"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +53,7 @@ def from_json(cls, json_str: str) -> TransMemoryEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -84,9 +81,9 @@ def from_dict(cls, obj: dict) -> TransMemoryEditDto:
return None
if not isinstance(obj, dict):
- return TransMemoryEditDto.parse_obj(obj)
+ return TransMemoryEditDto.model_validate(obj)
- _obj = TransMemoryEditDto.parse_obj({
+ _obj = TransMemoryEditDto.model_validate({
"name": obj.get("name"),
"target_langs": obj.get("targetLangs"),
"client": IdReference.from_dict(obj.get("client")) if obj.get("client") is not None else None,
diff --git a/phrasetms_client/models/trans_memory_reference_dto_v2.py b/phrasetms_client/models/trans_memory_reference_dto_v2.py
index 6cd940bd..16fba5f2 100644
--- a/phrasetms_client/models/trans_memory_reference_dto_v2.py
+++ b/phrasetms_client/models/trans_memory_reference_dto_v2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class TransMemoryReferenceDtoV2(BaseModel):
"""
@@ -29,17 +29,13 @@ class TransMemoryReferenceDtoV2(BaseModel):
uid: StrictStr = Field(...)
name: Optional[StrictStr] = None
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
__properties = ["internalId", "uid", "name", "sourceLang", "targetLangs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> TransMemoryReferenceDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> TransMemoryReferenceDtoV2:
return None
if not isinstance(obj, dict):
- return TransMemoryReferenceDtoV2.parse_obj(obj)
+ return TransMemoryReferenceDtoV2.model_validate(obj)
- _obj = TransMemoryReferenceDtoV2.parse_obj({
+ _obj = TransMemoryReferenceDtoV2.model_validate({
"internal_id": obj.get("internalId"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/translation_dto.py b/phrasetms_client/models/translation_dto.py
index d0de4570..253ddf4c 100644
--- a/phrasetms_client/models/translation_dto.py
+++ b/phrasetms_client/models/translation_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TranslationDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class TranslationDto(BaseModel):
text: StrictStr = Field(...)
__properties = ["lang", "text"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> TranslationDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> TranslationDto:
return None
if not isinstance(obj, dict):
- return TranslationDto.parse_obj(obj)
+ return TranslationDto.model_validate(obj)
- _obj = TranslationDto.parse_obj({
+ _obj = TranslationDto.model_validate({
"lang": obj.get("lang"),
"text": obj.get("text")
})
diff --git a/phrasetms_client/models/translation_length_warning_dto.py b/phrasetms_client/models/translation_length_warning_dto.py
index 102e1fd5..b5c7746e 100644
--- a/phrasetms_client/models/translation_length_warning_dto.py
+++ b/phrasetms_client/models/translation_length_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class TranslationLengthWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class TranslationLengthWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TranslationLengthWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TranslationLengthWarningDto:
return None
if not isinstance(obj, dict):
- return TranslationLengthWarningDto.parse_obj(obj)
+ return TranslationLengthWarningDto.model_validate(obj)
- _obj = TranslationLengthWarningDto.parse_obj({
+ _obj = TranslationLengthWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/translation_memory_settings_dto.py b/phrasetms_client/models/translation_memory_settings_dto.py
index 47b324ac..3940aee0 100644
--- a/phrasetms_client/models/translation_memory_settings_dto.py
+++ b/phrasetms_client/models/translation_memory_settings_dto.py
@@ -18,29 +18,26 @@
import json
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, confloat, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class TranslationMemorySettingsDto(BaseModel):
"""
Translation memory related settings
"""
use_translation_memory: Optional[StrictBool] = Field(None, alias="useTranslationMemory", description="Pre-translate from translation memory. Default: false")
- translation_memory_threshold: Optional[Union[confloat(le=1.01, ge=0, strict=True), conint(le=1, ge=0, strict=True)]] = Field(None, alias="translationMemoryThreshold", description="Pre-translation threshold percent")
+ translation_memory_threshold: Optional[Union[Annotated[float, Field(le=1.01, ge=0, strict=True)], Annotated[int, Field(le=1, ge=0, strict=True)]]] = Field(None, alias="translationMemoryThreshold", description="Pre-translation threshold percent")
confirm100_percent_matches: Optional[StrictBool] = Field(None, alias="confirm100PercentMatches", description="Set segment status to confirmed for: 100% translation memory matches. Default: false")
confirm101_percent_matches: Optional[StrictBool] = Field(None, alias="confirm101PercentMatches", description="Set segment status to confirmed for: 101% translation memory matches. Default: false")
lock100_percent_matches: Optional[StrictBool] = Field(None, alias="lock100PercentMatches", description="Lock section: 100% translation memory matches. Default: false")
lock101_percent_matches: Optional[StrictBool] = Field(None, alias="lock101PercentMatches", description="Lock section: 101% translation memory matches. Default: false")
__properties = ["useTranslationMemory", "translationMemoryThreshold", "confirm100PercentMatches", "confirm101PercentMatches", "lock100PercentMatches", "lock101PercentMatches"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +50,7 @@ def from_json(cls, json_str: str) -> TranslationMemorySettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +63,9 @@ def from_dict(cls, obj: dict) -> TranslationMemorySettingsDto:
return None
if not isinstance(obj, dict):
- return TranslationMemorySettingsDto.parse_obj(obj)
+ return TranslationMemorySettingsDto.model_validate(obj)
- _obj = TranslationMemorySettingsDto.parse_obj({
+ _obj = TranslationMemorySettingsDto.model_validate({
"use_translation_memory": obj.get("useTranslationMemory"),
"translation_memory_threshold": obj.get("translationMemoryThreshold"),
"confirm100_percent_matches": obj.get("confirm100PercentMatches"),
diff --git a/phrasetms_client/models/translation_price_dto.py b/phrasetms_client/models/translation_price_dto.py
index 89b3176e..b8c34431 100644
--- a/phrasetms_client/models/translation_price_dto.py
+++ b/phrasetms_client/models/translation_price_dto.py
@@ -19,7 +19,7 @@
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt
from phrasetms_client.models.workflow_step_dto import WorkflowStepDto
class TranslationPriceDto(BaseModel):
@@ -30,14 +30,10 @@ class TranslationPriceDto(BaseModel):
price: Optional[Union[StrictFloat, StrictInt]] = None
__properties = ["workflowStep", "price"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> TranslationPriceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceDto.parse_obj(obj)
+ return TranslationPriceDto.model_validate(obj)
- _obj = TranslationPriceDto.parse_obj({
+ _obj = TranslationPriceDto.model_validate({
"workflow_step": WorkflowStepDto.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"price": obj.get("price")
})
diff --git a/phrasetms_client/models/translation_price_list_create_dto.py b/phrasetms_client/models/translation_price_list_create_dto.py
index d9844eab..f9d462d5 100644
--- a/phrasetms_client/models/translation_price_list_create_dto.py
+++ b/phrasetms_client/models/translation_price_list_create_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class TranslationPriceListCreateDto(BaseModel):
"""
@@ -30,7 +30,8 @@ class TranslationPriceListCreateDto(BaseModel):
billing_unit: Optional[StrictStr] = Field(None, alias="billingUnit", description="Default: Word")
__properties = ["name", "currencyCode", "billingUnit"]
- @validator('billing_unit')
+ @field_validator('billing_unit')
+ @classmethod
def billing_unit_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -40,14 +41,10 @@ def billing_unit_validate_enum(cls, value):
raise ValueError("must be one of enum values ('Word', 'Page', 'Character', 'Hour')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -60,7 +57,7 @@ def from_json(cls, json_str: str) -> TranslationPriceListCreateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -73,9 +70,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceListCreateDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceListCreateDto.parse_obj(obj)
+ return TranslationPriceListCreateDto.model_validate(obj)
- _obj = TranslationPriceListCreateDto.parse_obj({
+ _obj = TranslationPriceListCreateDto.model_validate({
"name": obj.get("name"),
"currency_code": obj.get("currencyCode"),
"billing_unit": obj.get("billingUnit")
diff --git a/phrasetms_client/models/translation_price_list_dto.py b/phrasetms_client/models/translation_price_list_dto.py
index 70503e9b..adb23b8e 100644
--- a/phrasetms_client/models/translation_price_list_dto.py
+++ b/phrasetms_client/models/translation_price_list_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.translation_price_set_dto import TranslationPriceSetDto
class TranslationPriceListDto(BaseModel):
@@ -32,10 +32,11 @@ class TranslationPriceListDto(BaseModel):
name: StrictStr = Field(...)
currency_code: Optional[StrictStr] = Field(None, alias="currencyCode")
billing_unit: Optional[StrictStr] = Field(None, alias="billingUnit")
- price_sets: Optional[conlist(TranslationPriceSetDto)] = Field(None, alias="priceSets")
+ price_sets: Optional[List[TranslationPriceSetDto]] = Field(None, alias="priceSets")
__properties = ["id", "uid", "dateCreated", "name", "currencyCode", "billingUnit", "priceSets"]
- @validator('billing_unit')
+ @field_validator('billing_unit')
+ @classmethod
def billing_unit_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -45,14 +46,10 @@ def billing_unit_validate_enum(cls, value):
raise ValueError("must be one of enum values ('Character', 'Word', 'Page', 'Hour')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +62,7 @@ def from_json(cls, json_str: str) -> TranslationPriceListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"id",
},
@@ -86,9 +83,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceListDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceListDto.parse_obj(obj)
+ return TranslationPriceListDto.model_validate(obj)
- _obj = TranslationPriceListDto.parse_obj({
+ _obj = TranslationPriceListDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"date_created": obj.get("dateCreated"),
diff --git a/phrasetms_client/models/translation_price_set_bulk_delete_dto.py b/phrasetms_client/models/translation_price_set_bulk_delete_dto.py
index 28b48256..85bbdb09 100644
--- a/phrasetms_client/models/translation_price_set_bulk_delete_dto.py
+++ b/phrasetms_client/models/translation_price_set_bulk_delete_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TranslationPriceSetBulkDeleteDto(BaseModel):
"""
TranslationPriceSetBulkDeleteDto
"""
- source_languages: Optional[conlist(StrictStr)] = Field(None, alias="sourceLanguages")
- target_languages: Optional[conlist(StrictStr)] = Field(None, alias="targetLanguages")
+ source_languages: Optional[List[StrictStr]] = Field(None, alias="sourceLanguages")
+ target_languages: Optional[List[StrictStr]] = Field(None, alias="targetLanguages")
__properties = ["sourceLanguages", "targetLanguages"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> TranslationPriceSetBulkDeleteDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceSetBulkDeleteDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceSetBulkDeleteDto.parse_obj(obj)
+ return TranslationPriceSetBulkDeleteDto.model_validate(obj)
- _obj = TranslationPriceSetBulkDeleteDto.parse_obj({
+ _obj = TranslationPriceSetBulkDeleteDto.model_validate({
"source_languages": obj.get("sourceLanguages"),
"target_languages": obj.get("targetLanguages")
})
diff --git a/phrasetms_client/models/translation_price_set_bulk_minimum_prices_dto.py b/phrasetms_client/models/translation_price_set_bulk_minimum_prices_dto.py
index b0fb4ace..8390fe3c 100644
--- a/phrasetms_client/models/translation_price_set_bulk_minimum_prices_dto.py
+++ b/phrasetms_client/models/translation_price_set_bulk_minimum_prices_dto.py
@@ -19,25 +19,21 @@
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt, StrictStr
class TranslationPriceSetBulkMinimumPricesDto(BaseModel):
"""
TranslationPriceSetBulkMinimumPricesDto
"""
- source_languages: Optional[conlist(StrictStr)] = Field(None, alias="sourceLanguages")
- target_languages: Optional[conlist(StrictStr)] = Field(None, alias="targetLanguages")
+ source_languages: Optional[List[StrictStr]] = Field(None, alias="sourceLanguages")
+ target_languages: Optional[List[StrictStr]] = Field(None, alias="targetLanguages")
minimum_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="minimumPrice")
__properties = ["sourceLanguages", "targetLanguages", "minimumPrice"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> TranslationPriceSetBulkMinimumPricesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceSetBulkMinimumPricesDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceSetBulkMinimumPricesDto.parse_obj(obj)
+ return TranslationPriceSetBulkMinimumPricesDto.model_validate(obj)
- _obj = TranslationPriceSetBulkMinimumPricesDto.parse_obj({
+ _obj = TranslationPriceSetBulkMinimumPricesDto.model_validate({
"source_languages": obj.get("sourceLanguages"),
"target_languages": obj.get("targetLanguages"),
"minimum_price": obj.get("minimumPrice")
diff --git a/phrasetms_client/models/translation_price_set_bulk_prices_dto.py b/phrasetms_client/models/translation_price_set_bulk_prices_dto.py
index b22a7f58..f7f0e722 100644
--- a/phrasetms_client/models/translation_price_set_bulk_prices_dto.py
+++ b/phrasetms_client/models/translation_price_set_bulk_prices_dto.py
@@ -19,27 +19,23 @@
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.id_reference import IdReference
class TranslationPriceSetBulkPricesDto(BaseModel):
"""
TranslationPriceSetBulkPricesDto
"""
- source_languages: Optional[conlist(StrictStr)] = Field(None, alias="sourceLanguages")
- target_languages: Optional[conlist(StrictStr)] = Field(None, alias="targetLanguages")
+ source_languages: Optional[List[StrictStr]] = Field(None, alias="sourceLanguages")
+ target_languages: Optional[List[StrictStr]] = Field(None, alias="targetLanguages")
price: Optional[Union[StrictFloat, StrictInt]] = None
- workflow_steps: Optional[conlist(IdReference, max_items=15, min_items=0)] = Field(None, alias="workflowSteps")
+ workflow_steps: Optional[List[IdReference]] = Field(None, alias="workflowSteps")
__properties = ["sourceLanguages", "targetLanguages", "price", "workflowSteps"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> TranslationPriceSetBulkPricesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceSetBulkPricesDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceSetBulkPricesDto.parse_obj(obj)
+ return TranslationPriceSetBulkPricesDto.model_validate(obj)
- _obj = TranslationPriceSetBulkPricesDto.parse_obj({
+ _obj = TranslationPriceSetBulkPricesDto.model_validate({
"source_languages": obj.get("sourceLanguages"),
"target_languages": obj.get("targetLanguages"),
"price": obj.get("price"),
diff --git a/phrasetms_client/models/translation_price_set_create_dto.py b/phrasetms_client/models/translation_price_set_create_dto.py
index 7e2ab066..adf6d049 100644
--- a/phrasetms_client/models/translation_price_set_create_dto.py
+++ b/phrasetms_client/models/translation_price_set_create_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TranslationPriceSetCreateDto(BaseModel):
"""
TranslationPriceSetCreateDto
"""
- source_languages: conlist(StrictStr, max_items=100, min_items=1) = Field(..., alias="sourceLanguages")
- target_languages: conlist(StrictStr, max_items=100, min_items=1) = Field(..., alias="targetLanguages")
+ source_languages: List[StrictStr] = Field(..., alias="sourceLanguages")
+ target_languages: List[StrictStr] = Field(..., alias="targetLanguages")
__properties = ["sourceLanguages", "targetLanguages"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> TranslationPriceSetCreateDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceSetCreateDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceSetCreateDto.parse_obj(obj)
+ return TranslationPriceSetCreateDto.model_validate(obj)
- _obj = TranslationPriceSetCreateDto.parse_obj({
+ _obj = TranslationPriceSetCreateDto.model_validate({
"source_languages": obj.get("sourceLanguages"),
"target_languages": obj.get("targetLanguages")
})
diff --git a/phrasetms_client/models/translation_price_set_dto.py b/phrasetms_client/models/translation_price_set_dto.py
index e2a22a61..023bf14f 100644
--- a/phrasetms_client/models/translation_price_set_dto.py
+++ b/phrasetms_client/models/translation_price_set_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional, Union
-from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictFloat, StrictInt, StrictStr
from phrasetms_client.models.translation_price_dto import TranslationPriceDto
class TranslationPriceSetDto(BaseModel):
@@ -29,17 +29,13 @@ class TranslationPriceSetDto(BaseModel):
source_lang: Optional[StrictStr] = Field(None, alias="sourceLang")
target_lang: Optional[StrictStr] = Field(None, alias="targetLang")
minimum_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="minimumPrice")
- prices: Optional[conlist(TranslationPriceDto)] = None
+ prices: Optional[List[TranslationPriceDto]] = None
__properties = ["sourceLang", "targetLang", "minimumPrice", "prices"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> TranslationPriceSetDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceSetDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceSetDto.parse_obj(obj)
+ return TranslationPriceSetDto.model_validate(obj)
- _obj = TranslationPriceSetDto.parse_obj({
+ _obj = TranslationPriceSetDto.model_validate({
"source_lang": obj.get("sourceLang"),
"target_lang": obj.get("targetLang"),
"minimum_price": obj.get("minimumPrice"),
diff --git a/phrasetms_client/models/translation_price_set_list_dto.py b/phrasetms_client/models/translation_price_set_list_dto.py
index e748e919..2c9a3e91 100644
--- a/phrasetms_client/models/translation_price_set_list_dto.py
+++ b/phrasetms_client/models/translation_price_set_list_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.translation_price_set_dto import TranslationPriceSetDto
class TranslationPriceSetListDto(BaseModel):
"""
TranslationPriceSetListDto
"""
- price_sets: Optional[conlist(TranslationPriceSetDto)] = Field(None, alias="priceSets")
+ price_sets: Optional[List[TranslationPriceSetDto]] = Field(None, alias="priceSets")
__properties = ["priceSets"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> TranslationPriceSetListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> TranslationPriceSetListDto:
return None
if not isinstance(obj, dict):
- return TranslationPriceSetListDto.parse_obj(obj)
+ return TranslationPriceSetListDto.model_validate(obj)
- _obj = TranslationPriceSetListDto.parse_obj({
+ _obj = TranslationPriceSetListDto.model_validate({
"price_sets": [TranslationPriceSetDto.from_dict(_item) for _item in obj.get("priceSets")] if obj.get("priceSets") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/translation_request_dto.py b/phrasetms_client/models/translation_request_dto.py
index 764a82b5..b46689a3 100644
--- a/phrasetms_client/models/translation_request_dto.py
+++ b/phrasetms_client/models/translation_request_dto.py
@@ -19,23 +19,19 @@
from typing import List
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TranslationRequestDto(BaseModel):
"""
TranslationRequestDto
"""
- source_texts: conlist(StrictStr, max_items=2147483647, min_items=1) = Field(..., alias="sourceTexts")
+ source_texts: List[StrictStr] = Field(..., alias="sourceTexts")
__properties = ["sourceTexts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TranslationRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TranslationRequestDto:
return None
if not isinstance(obj, dict):
- return TranslationRequestDto.parse_obj(obj)
+ return TranslationRequestDto.model_validate(obj)
- _obj = TranslationRequestDto.parse_obj({
+ _obj = TranslationRequestDto.model_validate({
"source_texts": obj.get("sourceTexts")
})
return _obj
diff --git a/phrasetms_client/models/translation_request_extended_dto.py b/phrasetms_client/models/translation_request_extended_dto.py
index 659eafb8..c2830181 100644
--- a/phrasetms_client/models/translation_request_extended_dto.py
+++ b/phrasetms_client/models/translation_request_extended_dto.py
@@ -19,26 +19,22 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class TranslationRequestExtendedDto(BaseModel):
"""
TranslationRequestExtendedDto
"""
- source_texts: conlist(StrictStr, max_items=2147483647, min_items=1) = Field(..., alias="sourceTexts")
+ source_texts: List[StrictStr] = Field(..., alias="sourceTexts")
var_from: StrictStr = Field(..., alias="from")
to: StrictStr = Field(...)
filename: Optional[StrictStr] = None
__properties = ["sourceTexts", "from", "to", "filename"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> TranslationRequestExtendedDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> TranslationRequestExtendedDto:
return None
if not isinstance(obj, dict):
- return TranslationRequestExtendedDto.parse_obj(obj)
+ return TranslationRequestExtendedDto.model_validate(obj)
- _obj = TranslationRequestExtendedDto.parse_obj({
+ _obj = TranslationRequestExtendedDto.model_validate({
"source_texts": obj.get("sourceTexts"),
"var_from": obj.get("from"),
"to": obj.get("to"),
diff --git a/phrasetms_client/models/translation_resources_dto.py b/phrasetms_client/models/translation_resources_dto.py
index 49de5377..f8565261 100644
--- a/phrasetms_client/models/translation_resources_dto.py
+++ b/phrasetms_client/models/translation_resources_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.machine_translate_settings_reference import MachineTranslateSettingsReference
from phrasetms_client.models.project_term_base_reference import ProjectTermBaseReference
from phrasetms_client.models.project_translation_memory_reference import ProjectTranslationMemoryReference
@@ -29,18 +29,14 @@ class TranslationResourcesDto(BaseModel):
TranslationResourcesDto
"""
machine_translate_settings: Optional[MachineTranslateSettingsReference] = Field(None, alias="machineTranslateSettings")
- translation_memories: Optional[conlist(ProjectTranslationMemoryReference)] = Field(None, alias="translationMemories")
- term_bases: Optional[conlist(ProjectTermBaseReference)] = Field(None, alias="termBases")
+ translation_memories: Optional[List[ProjectTranslationMemoryReference]] = Field(None, alias="translationMemories")
+ term_bases: Optional[List[ProjectTermBaseReference]] = Field(None, alias="termBases")
__properties = ["machineTranslateSettings", "translationMemories", "termBases"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> TranslationResourcesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -83,9 +79,9 @@ def from_dict(cls, obj: dict) -> TranslationResourcesDto:
return None
if not isinstance(obj, dict):
- return TranslationResourcesDto.parse_obj(obj)
+ return TranslationResourcesDto.model_validate(obj)
- _obj = TranslationResourcesDto.parse_obj({
+ _obj = TranslationResourcesDto.model_validate({
"machine_translate_settings": MachineTranslateSettingsReference.from_dict(obj.get("machineTranslateSettings")) if obj.get("machineTranslateSettings") is not None else None,
"translation_memories": [ProjectTranslationMemoryReference.from_dict(_item) for _item in obj.get("translationMemories")] if obj.get("translationMemories") is not None else None,
"term_bases": [ProjectTermBaseReference.from_dict(_item) for _item in obj.get("termBases")] if obj.get("termBases") is not None else None
diff --git a/phrasetms_client/models/translation_segments_reference_v2.py b/phrasetms_client/models/translation_segments_reference_v2.py
index 6c53bec9..95319053 100644
--- a/phrasetms_client/models/translation_segments_reference_v2.py
+++ b/phrasetms_client/models/translation_segments_reference_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class TranslationSegmentsReferenceV2(BaseModel):
"""
@@ -29,14 +29,10 @@ class TranslationSegmentsReferenceV2(BaseModel):
locked: Optional[StrictBool] = Field(None, description="Remove locked (true), unlocked (false) or both segments (null). Default: false")
__properties = ["confirmed", "locked"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> TranslationSegmentsReferenceV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> TranslationSegmentsReferenceV2:
return None
if not isinstance(obj, dict):
- return TranslationSegmentsReferenceV2.parse_obj(obj)
+ return TranslationSegmentsReferenceV2.model_validate(obj)
- _obj = TranslationSegmentsReferenceV2.parse_obj({
+ _obj = TranslationSegmentsReferenceV2.model_validate({
"confirmed": obj.get("confirmed"),
"locked": obj.get("locked")
})
diff --git a/phrasetms_client/models/tridion.py b/phrasetms_client/models/tridion.py
index 10bc7bcb..c2306077 100644
--- a/phrasetms_client/models/tridion.py
+++ b/phrasetms_client/models/tridion.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Tridion(AbstractConnectorDto):
@@ -35,14 +35,10 @@ class Tridion(AbstractConnectorDto):
ssh_pass_phrase: Optional[StrictStr] = Field(None, alias="sshPassPhrase")
__properties = ["name", "type", "host", "port", "userName", "password", "sshKeyName", "sshKey", "sshPassPhrase"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> Tridion:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> Tridion:
return None
if not isinstance(obj, dict):
- return Tridion.parse_obj(obj)
+ return Tridion.model_validate(obj)
- _obj = Tridion.parse_obj({
+ _obj = Tridion.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/ttx_settings_dto.py b/phrasetms_client/models/ttx_settings_dto.py
index f6500c0c..3bdb7fc8 100644
--- a/phrasetms_client/models/ttx_settings_dto.py
+++ b/phrasetms_client/models/ttx_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
class TtxSettingsDto(BaseModel):
"""
@@ -28,14 +28,10 @@ class TtxSettingsDto(BaseModel):
save_confirmed_segments: Optional[StrictBool] = Field(None, alias="saveConfirmedSegments", description="Default: true")
__properties = ["saveConfirmedSegments"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TtxSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TtxSettingsDto:
return None
if not isinstance(obj, dict):
- return TtxSettingsDto.parse_obj(obj)
+ return TtxSettingsDto.model_validate(obj)
- _obj = TtxSettingsDto.parse_obj({
+ _obj = TtxSettingsDto.model_validate({
"save_confirmed_segments": obj.get("saveConfirmedSegments")
})
return _obj
diff --git a/phrasetms_client/models/txt_settings_dto.py b/phrasetms_client/models/txt_settings_dto.py
index e03e8038..e21e74a9 100644
--- a/phrasetms_client/models/txt_settings_dto.py
+++ b/phrasetms_client/models/txt_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class TxtSettingsDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class TxtSettingsDto(BaseModel):
regexp_capturing_groups: Optional[StrictBool] = Field(None, alias="regexpCapturingGroups", description="Default: false")
__properties = ["tagRegexp", "translatableTextRegexp", "contextKey", "regexpCapturingGroups"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> TxtSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> TxtSettingsDto:
return None
if not isinstance(obj, dict):
- return TxtSettingsDto.parse_obj(obj)
+ return TxtSettingsDto.model_validate(obj)
- _obj = TxtSettingsDto.parse_obj({
+ _obj = TxtSettingsDto.model_validate({
"tag_regexp": obj.get("tagRegexp"),
"translatable_text_regexp": obj.get("translatableTextRegexp"),
"context_key": obj.get("contextKey"),
diff --git a/phrasetms_client/models/types_dto.py b/phrasetms_client/models/types_dto.py
index b0c137f3..4607425b 100644
--- a/phrasetms_client/models/types_dto.py
+++ b/phrasetms_client/models/types_dto.py
@@ -19,23 +19,19 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
class TypesDto(BaseModel):
"""
TypesDto
"""
- types: Optional[conlist(StrictStr)] = None
+ types: Optional[List[StrictStr]] = None
__properties = ["types"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> TypesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> TypesDto:
return None
if not isinstance(obj, dict):
- return TypesDto.parse_obj(obj)
+ return TypesDto.model_validate(obj)
- _obj = TypesDto.parse_obj({
+ _obj = TypesDto.model_validate({
"types": obj.get("types")
})
return _obj
diff --git a/phrasetms_client/models/typo3.py b/phrasetms_client/models/typo3.py
index b55348bc..6ca57deb 100644
--- a/phrasetms_client/models/typo3.py
+++ b/phrasetms_client/models/typo3.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Typo3(AbstractConnectorDto):
@@ -31,14 +31,10 @@ class Typo3(AbstractConnectorDto):
token: StrictStr = Field(...)
__properties = ["name", "type", "host", "sourceLang", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> Typo3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> Typo3:
return None
if not isinstance(obj, dict):
- return Typo3.parse_obj(obj)
+ return Typo3.model_validate(obj)
- _obj = Typo3.parse_obj({
+ _obj = Typo3.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/typo3_all_of.py b/phrasetms_client/models/typo3_all_of.py
index 4a1f28db..336bfcc7 100644
--- a/phrasetms_client/models/typo3_all_of.py
+++ b/phrasetms_client/models/typo3_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class Typo3AllOf(BaseModel):
"""
@@ -30,14 +30,10 @@ class Typo3AllOf(BaseModel):
token: StrictStr = Field(...)
__properties = ["host", "sourceLang", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> Typo3AllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> Typo3AllOf:
return None
if not isinstance(obj, dict):
- return Typo3AllOf.parse_obj(obj)
+ return Typo3AllOf.model_validate(obj)
- _obj = Typo3AllOf.parse_obj({
+ _obj = Typo3AllOf.model_validate({
"host": obj.get("host"),
"source_lang": obj.get("sourceLang"),
"token": obj.get("token")
diff --git a/phrasetms_client/models/uid_reference.py b/phrasetms_client/models/uid_reference.py
index 14d867f7..ddff1ccb 100644
--- a/phrasetms_client/models/uid_reference.py
+++ b/phrasetms_client/models/uid_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class UidReference(BaseModel):
@@ -30,15 +30,10 @@ class UidReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["uid"]
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +46,7 @@ def from_json(cls, json_str: str) -> UidReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
return _dict
@classmethod
@@ -61,9 +56,9 @@ def from_dict(cls, obj: dict) -> UidReference:
return None
if not isinstance(obj, dict):
- return UidReference.parse_obj(obj)
+ return UidReference.model_validate(obj)
- _obj = UidReference.parse_obj(
+ _obj = UidReference.model_validate(
{"uid": obj.get("uid") if obj.get("uid") is not None else None}
)
return _obj
diff --git a/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto.py b/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto.py
index cfd225b9..85d570bd 100644
--- a/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto.py
+++ b/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class UnmodifiedFuzzyTranslationMTNTWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class UnmodifiedFuzzyTranslationMTNTWarningDto(SegmentWarning):
trans_origin: Optional[StrictStr] = Field(None, alias="transOrigin")
__properties = ["id", "ignored", "type", "repetitionGroupId", "transOrigin"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> UnmodifiedFuzzyTranslationMTNTWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> UnmodifiedFuzzyTranslationMTNTWarningDto:
return None
if not isinstance(obj, dict):
- return UnmodifiedFuzzyTranslationMTNTWarningDto.parse_obj(obj)
+ return UnmodifiedFuzzyTranslationMTNTWarningDto.model_validate(obj)
- _obj = UnmodifiedFuzzyTranslationMTNTWarningDto.parse_obj({
+ _obj = UnmodifiedFuzzyTranslationMTNTWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto_all_of.py b/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto_all_of.py
index 3f103ba4..4caef493 100644
--- a/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto_all_of.py
+++ b/phrasetms_client/models/unmodified_fuzzy_translation_mtnt_warning_dto_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class UnmodifiedFuzzyTranslationMTNTWarningDtoAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class UnmodifiedFuzzyTranslationMTNTWarningDtoAllOf(BaseModel):
trans_origin: Optional[StrictStr] = Field(None, alias="transOrigin")
__properties = ["transOrigin"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> UnmodifiedFuzzyTranslationMTNTWarningDtoAll
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> UnmodifiedFuzzyTranslationMTNTWarningDtoAllOf:
return None
if not isinstance(obj, dict):
- return UnmodifiedFuzzyTranslationMTNTWarningDtoAllOf.parse_obj(obj)
+ return UnmodifiedFuzzyTranslationMTNTWarningDtoAllOf.model_validate(obj)
- _obj = UnmodifiedFuzzyTranslationMTNTWarningDtoAllOf.parse_obj({
+ _obj = UnmodifiedFuzzyTranslationMTNTWarningDtoAllOf.model_validate({
"trans_origin": obj.get("transOrigin")
})
return _obj
diff --git a/phrasetms_client/models/unmodified_fuzzy_translation_tm_warning_dto.py b/phrasetms_client/models/unmodified_fuzzy_translation_tm_warning_dto.py
index 8218f68f..01336cc9 100644
--- a/phrasetms_client/models/unmodified_fuzzy_translation_tm_warning_dto.py
+++ b/phrasetms_client/models/unmodified_fuzzy_translation_tm_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class UnmodifiedFuzzyTranslationTMWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class UnmodifiedFuzzyTranslationTMWarningDto(SegmentWarning):
trans_origin: Optional[StrictStr] = Field(None, alias="transOrigin")
__properties = ["id", "ignored", "type", "repetitionGroupId", "transOrigin"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> UnmodifiedFuzzyTranslationTMWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> UnmodifiedFuzzyTranslationTMWarningDto:
return None
if not isinstance(obj, dict):
- return UnmodifiedFuzzyTranslationTMWarningDto.parse_obj(obj)
+ return UnmodifiedFuzzyTranslationTMWarningDto.model_validate(obj)
- _obj = UnmodifiedFuzzyTranslationTMWarningDto.parse_obj({
+ _obj = UnmodifiedFuzzyTranslationTMWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/unmodified_fuzzy_translation_warning_dto.py b/phrasetms_client/models/unmodified_fuzzy_translation_warning_dto.py
index df2d6afd..32bc96c5 100644
--- a/phrasetms_client/models/unmodified_fuzzy_translation_warning_dto.py
+++ b/phrasetms_client/models/unmodified_fuzzy_translation_warning_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.segment_warning import SegmentWarning
class UnmodifiedFuzzyTranslationWarningDto(SegmentWarning):
@@ -29,14 +29,10 @@ class UnmodifiedFuzzyTranslationWarningDto(SegmentWarning):
trans_origin: Optional[StrictStr] = Field(None, alias="transOrigin")
__properties = ["id", "ignored", "type", "repetitionGroupId", "transOrigin"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> UnmodifiedFuzzyTranslationWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> UnmodifiedFuzzyTranslationWarningDto:
return None
if not isinstance(obj, dict):
- return UnmodifiedFuzzyTranslationWarningDto.parse_obj(obj)
+ return UnmodifiedFuzzyTranslationWarningDto.model_validate(obj)
- _obj = UnmodifiedFuzzyTranslationWarningDto.parse_obj({
+ _obj = UnmodifiedFuzzyTranslationWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/unresolved_comment_warning_dto.py b/phrasetms_client/models/unresolved_comment_warning_dto.py
index 9ae41382..997cbfcd 100644
--- a/phrasetms_client/models/unresolved_comment_warning_dto.py
+++ b/phrasetms_client/models/unresolved_comment_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class UnresolvedCommentWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class UnresolvedCommentWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> UnresolvedCommentWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> UnresolvedCommentWarningDto:
return None
if not isinstance(obj, dict):
- return UnresolvedCommentWarningDto.parse_obj(obj)
+ return UnresolvedCommentWarningDto.model_validate(obj)
- _obj = UnresolvedCommentWarningDto.parse_obj({
+ _obj = UnresolvedCommentWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/unresolved_conversation_warning_dto.py b/phrasetms_client/models/unresolved_conversation_warning_dto.py
index 6c810d3f..a4c9aa45 100644
--- a/phrasetms_client/models/unresolved_conversation_warning_dto.py
+++ b/phrasetms_client/models/unresolved_conversation_warning_dto.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.segment_warning import SegmentWarning
class UnresolvedConversationWarningDto(SegmentWarning):
@@ -28,14 +28,10 @@ class UnresolvedConversationWarningDto(SegmentWarning):
"""
__properties = ["id", "ignored", "type", "repetitionGroupId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> UnresolvedConversationWarningDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> UnresolvedConversationWarningDto:
return None
if not isinstance(obj, dict):
- return UnresolvedConversationWarningDto.parse_obj(obj)
+ return UnresolvedConversationWarningDto.model_validate(obj)
- _obj = UnresolvedConversationWarningDto.parse_obj({
+ _obj = UnresolvedConversationWarningDto.model_validate({
"id": obj.get("id"),
"ignored": obj.get("ignored"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/update_custom_field_instance_dto.py b/phrasetms_client/models/update_custom_field_instance_dto.py
index f52dc084..42092887 100644
--- a/phrasetms_client/models/update_custom_field_instance_dto.py
+++ b/phrasetms_client/models/update_custom_field_instance_dto.py
@@ -18,26 +18,23 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.uid_reference import UidReference
class UpdateCustomFieldInstanceDto(BaseModel):
"""
UpdateCustomFieldInstanceDto
"""
- selected_options: Optional[conlist(UidReference)] = Field(None, alias="selectedOptions")
- value: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ selected_options: Optional[List[UidReference]] = Field(None, alias="selectedOptions")
+ value: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
__properties = ["selectedOptions", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +47,7 @@ def from_json(cls, json_str: str) -> UpdateCustomFieldInstanceDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +67,9 @@ def from_dict(cls, obj: dict) -> UpdateCustomFieldInstanceDto:
return None
if not isinstance(obj, dict):
- return UpdateCustomFieldInstanceDto.parse_obj(obj)
+ return UpdateCustomFieldInstanceDto.model_validate(obj)
- _obj = UpdateCustomFieldInstanceDto.parse_obj({
+ _obj = UpdateCustomFieldInstanceDto.model_validate({
"selected_options": [UidReference.from_dict(_item) for _item in obj.get("selectedOptions")] if obj.get("selectedOptions") is not None else None,
"value": obj.get("value")
})
diff --git a/phrasetms_client/models/update_custom_field_instance_with_uid_dto.py b/phrasetms_client/models/update_custom_field_instance_with_uid_dto.py
index 04bb958a..72038dcf 100644
--- a/phrasetms_client/models/update_custom_field_instance_with_uid_dto.py
+++ b/phrasetms_client/models/update_custom_field_instance_with_uid_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.uid_reference import UidReference
class UpdateCustomFieldInstanceWithUidDto(BaseModel):
@@ -28,18 +29,14 @@ class UpdateCustomFieldInstanceWithUidDto(BaseModel):
"""
custom_field_instance: Optional[UidReference] = Field(None, alias="customFieldInstance")
custom_field: Optional[UidReference] = Field(None, alias="customField")
- selected_options: Optional[conlist(UidReference)] = Field(None, alias="selectedOptions")
- value: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ selected_options: Optional[List[UidReference]] = Field(None, alias="selectedOptions")
+ value: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
__properties = ["customFieldInstance", "customField", "selectedOptions", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +49,7 @@ def from_json(cls, json_str: str) -> UpdateCustomFieldInstanceWithUidDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +75,9 @@ def from_dict(cls, obj: dict) -> UpdateCustomFieldInstanceWithUidDto:
return None
if not isinstance(obj, dict):
- return UpdateCustomFieldInstanceWithUidDto.parse_obj(obj)
+ return UpdateCustomFieldInstanceWithUidDto.model_validate(obj)
- _obj = UpdateCustomFieldInstanceWithUidDto.parse_obj({
+ _obj = UpdateCustomFieldInstanceWithUidDto.model_validate({
"custom_field_instance": UidReference.from_dict(obj.get("customFieldInstance")) if obj.get("customFieldInstance") is not None else None,
"custom_field": UidReference.from_dict(obj.get("customField")) if obj.get("customField") is not None else None,
"selected_options": [UidReference.from_dict(_item) for _item in obj.get("selectedOptions")] if obj.get("selectedOptions") is not None else None,
diff --git a/phrasetms_client/models/update_custom_field_instances_dto.py b/phrasetms_client/models/update_custom_field_instances_dto.py
index d554842a..b5b158cb 100644
--- a/phrasetms_client/models/update_custom_field_instances_dto.py
+++ b/phrasetms_client/models/update_custom_field_instances_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.create_custom_field_instance_dto import CreateCustomFieldInstanceDto
from phrasetms_client.models.uid_reference import UidReference
from phrasetms_client.models.update_custom_field_instance_with_uid_dto import UpdateCustomFieldInstanceWithUidDto
@@ -28,19 +28,15 @@ class UpdateCustomFieldInstancesDto(BaseModel):
"""
UpdateCustomFieldInstancesDto
"""
- add_instances: Optional[conlist(CreateCustomFieldInstanceDto)] = Field(None, alias="addInstances")
- remove_instances: Optional[conlist(UidReference)] = Field(None, alias="removeInstances")
- update_instances: Optional[conlist(UpdateCustomFieldInstanceWithUidDto)] = Field(None, alias="updateInstances")
+ add_instances: Optional[List[CreateCustomFieldInstanceDto]] = Field(None, alias="addInstances")
+ remove_instances: Optional[List[UidReference]] = Field(None, alias="removeInstances")
+ update_instances: Optional[List[UpdateCustomFieldInstanceWithUidDto]] = Field(None, alias="updateInstances")
__properties = ["addInstances", "removeInstances", "updateInstances"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> UpdateCustomFieldInstancesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +83,9 @@ def from_dict(cls, obj: dict) -> UpdateCustomFieldInstancesDto:
return None
if not isinstance(obj, dict):
- return UpdateCustomFieldInstancesDto.parse_obj(obj)
+ return UpdateCustomFieldInstancesDto.model_validate(obj)
- _obj = UpdateCustomFieldInstancesDto.parse_obj({
+ _obj = UpdateCustomFieldInstancesDto.model_validate({
"add_instances": [CreateCustomFieldInstanceDto.from_dict(_item) for _item in obj.get("addInstances")] if obj.get("addInstances") is not None else None,
"remove_instances": [UidReference.from_dict(_item) for _item in obj.get("removeInstances")] if obj.get("removeInstances") is not None else None,
"update_instances": [UpdateCustomFieldInstanceWithUidDto.from_dict(_item) for _item in obj.get("updateInstances")] if obj.get("updateInstances") is not None else None
diff --git a/phrasetms_client/models/update_custom_file_type_dto.py b/phrasetms_client/models/update_custom_file_type_dto.py
index e5387da7..d5c3bcd4 100644
--- a/phrasetms_client/models/update_custom_file_type_dto.py
+++ b/phrasetms_client/models/update_custom_file_type_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.file_import_settings_create_dto import FileImportSettingsCreateDto
class UpdateCustomFileTypeDto(BaseModel):
@@ -32,7 +32,8 @@ class UpdateCustomFileTypeDto(BaseModel):
file_import_settings: Optional[FileImportSettingsCreateDto] = Field(None, alias="fileImportSettings")
__properties = ["name", "filenamePattern", "type", "fileImportSettings"]
- @validator('type')
+ @field_validator('type')
+ @classmethod
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -42,14 +43,10 @@ def type_validate_enum(cls, value):
raise ValueError("must be one of enum values ('html', 'json', 'xml', 'multiling_xml', 'txt')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -62,7 +59,7 @@ def from_json(cls, json_str: str) -> UpdateCustomFileTypeDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +75,9 @@ def from_dict(cls, obj: dict) -> UpdateCustomFileTypeDto:
return None
if not isinstance(obj, dict):
- return UpdateCustomFileTypeDto.parse_obj(obj)
+ return UpdateCustomFileTypeDto.model_validate(obj)
- _obj = UpdateCustomFileTypeDto.parse_obj({
+ _obj = UpdateCustomFileTypeDto.model_validate({
"name": obj.get("name"),
"filename_pattern": obj.get("filenamePattern"),
"type": obj.get("type"),
diff --git a/phrasetms_client/models/update_ignored_checks_dto.py b/phrasetms_client/models/update_ignored_checks_dto.py
index 42b63413..19303427 100644
--- a/phrasetms_client/models/update_ignored_checks_dto.py
+++ b/phrasetms_client/models/update_ignored_checks_dto.py
@@ -19,7 +19,7 @@
from typing import List
-from pydantic import BaseModel, Field, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
from phrasetms_client.models.segment_reference import SegmentReference
class UpdateIgnoredChecksDto(BaseModel):
@@ -27,10 +27,11 @@ class UpdateIgnoredChecksDto(BaseModel):
UpdateIgnoredChecksDto
"""
segment: SegmentReference = Field(...)
- warning_types: conlist(StrictStr, max_items=100, min_items=1) = Field(..., alias="warningTypes")
+ warning_types: List[StrictStr] = Field(..., alias="warningTypes")
__properties = ["segment", "warningTypes"]
- @validator('warning_types')
+ @field_validator('warning_types')
+ @classmethod
def warning_types_validate_enum(cls, value):
"""Validates the enum"""
for i in value:
@@ -38,14 +39,10 @@ def warning_types_validate_enum(cls, value):
raise ValueError("each list item must be one of ('EmptyTranslation', 'TrailingPunctuation', 'Formatting', 'JoinTags', 'MissingNumbersV3', 'MultipleSpacesV3', 'NonConformingTerm', 'NotConfirmed', 'TranslationLength', 'AbsoluteLength', 'RelativeLength', 'UnresolvedComment', 'EmptyPairTags', 'InconsistentTranslationTargetSource', 'InconsistentTranslationSourceTarget', 'ForbiddenString', 'SpellCheck', 'RepeatedWord', 'InconsistentTagContent', 'EmptyTagContent', 'Malformed', 'ForbiddenTerm', 'NewerAtLowerLevel', 'LeadingAndTrailingSpaces', 'LeadingSpaces', 'TrailingSpaces', 'TargetSourceIdentical', 'SourceOrTargetRegexp', 'UnmodifiedFuzzyTranslation', 'UnmodifiedFuzzyTranslationTM', 'UnmodifiedFuzzyTranslationMTNT', 'Moravia', 'ExtraNumbersV3', 'UnresolvedConversation', 'NestedTags', 'FuzzyInconsistencyTargetSource', 'FuzzyInconsistencySourceTarget', 'CustomQA')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -58,7 +55,7 @@ def from_json(cls, json_str: str) -> UpdateIgnoredChecksDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -74,9 +71,9 @@ def from_dict(cls, obj: dict) -> UpdateIgnoredChecksDto:
return None
if not isinstance(obj, dict):
- return UpdateIgnoredChecksDto.parse_obj(obj)
+ return UpdateIgnoredChecksDto.model_validate(obj)
- _obj = UpdateIgnoredChecksDto.parse_obj({
+ _obj = UpdateIgnoredChecksDto.model_validate({
"segment": SegmentReference.from_dict(obj.get("segment")) if obj.get("segment") is not None else None,
"warning_types": obj.get("warningTypes")
})
diff --git a/phrasetms_client/models/update_ignored_job_part_segment.py b/phrasetms_client/models/update_ignored_job_part_segment.py
index 46a3c02e..f6634d2e 100644
--- a/phrasetms_client/models/update_ignored_job_part_segment.py
+++ b/phrasetms_client/models/update_ignored_job_part_segment.py
@@ -19,7 +19,7 @@
from typing import List
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.update_ignored_segment import UpdateIgnoredSegment
class UpdateIgnoredJobPartSegment(BaseModel):
@@ -27,17 +27,13 @@ class UpdateIgnoredJobPartSegment(BaseModel):
UpdateIgnoredJobPartSegment
"""
job_part_uid: StrictStr = Field(..., alias="jobPartUid")
- segments: conlist(UpdateIgnoredSegment, max_items=500, min_items=1) = Field(...)
+ segments: List[UpdateIgnoredSegment] = Field(...)
__properties = ["jobPartUid", "segments"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> UpdateIgnoredJobPartSegment:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> UpdateIgnoredJobPartSegment:
return None
if not isinstance(obj, dict):
- return UpdateIgnoredJobPartSegment.parse_obj(obj)
+ return UpdateIgnoredJobPartSegment.model_validate(obj)
- _obj = UpdateIgnoredJobPartSegment.parse_obj({
+ _obj = UpdateIgnoredJobPartSegment.model_validate({
"job_part_uid": obj.get("jobPartUid"),
"segments": [UpdateIgnoredSegment.from_dict(_item) for _item in obj.get("segments")] if obj.get("segments") is not None else None
})
diff --git a/phrasetms_client/models/update_ignored_segment.py b/phrasetms_client/models/update_ignored_segment.py
index 855d0de6..5d9b685b 100644
--- a/phrasetms_client/models/update_ignored_segment.py
+++ b/phrasetms_client/models/update_ignored_segment.py
@@ -19,7 +19,7 @@
from typing import List
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.update_ignored_warning import UpdateIgnoredWarning
class UpdateIgnoredSegment(BaseModel):
@@ -27,17 +27,13 @@ class UpdateIgnoredSegment(BaseModel):
UpdateIgnoredSegment
"""
uid: StrictStr = Field(...)
- warnings: conlist(UpdateIgnoredWarning, max_items=100, min_items=1) = Field(...)
+ warnings: List[UpdateIgnoredWarning] = Field(...)
__properties = ["uid", "warnings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> UpdateIgnoredSegment:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> UpdateIgnoredSegment:
return None
if not isinstance(obj, dict):
- return UpdateIgnoredSegment.parse_obj(obj)
+ return UpdateIgnoredSegment.model_validate(obj)
- _obj = UpdateIgnoredSegment.parse_obj({
+ _obj = UpdateIgnoredSegment.model_validate({
"uid": obj.get("uid"),
"warnings": [UpdateIgnoredWarning.from_dict(_item) for _item in obj.get("warnings")] if obj.get("warnings") is not None else None
})
diff --git a/phrasetms_client/models/update_ignored_warning.py b/phrasetms_client/models/update_ignored_warning.py
index 927834f9..b496e301 100644
--- a/phrasetms_client/models/update_ignored_warning.py
+++ b/phrasetms_client/models/update_ignored_warning.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class UpdateIgnoredWarning(BaseModel):
"""
@@ -28,14 +28,10 @@ class UpdateIgnoredWarning(BaseModel):
id: StrictStr = Field(...)
__properties = ["id"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> UpdateIgnoredWarning:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> UpdateIgnoredWarning:
return None
if not isinstance(obj, dict):
- return UpdateIgnoredWarning.parse_obj(obj)
+ return UpdateIgnoredWarning.model_validate(obj)
- _obj = UpdateIgnoredWarning.parse_obj({
+ _obj = UpdateIgnoredWarning.model_validate({
"id": obj.get("id")
})
return _obj
diff --git a/phrasetms_client/models/update_ignored_warnings_dto.py b/phrasetms_client/models/update_ignored_warnings_dto.py
index ea8b773a..0129de9d 100644
--- a/phrasetms_client/models/update_ignored_warnings_dto.py
+++ b/phrasetms_client/models/update_ignored_warnings_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.update_ignored_job_part_segment import UpdateIgnoredJobPartSegment
class UpdateIgnoredWarningsDto(BaseModel):
"""
UpdateIgnoredWarningsDto
"""
- job_parts: conlist(UpdateIgnoredJobPartSegment, max_items=500, min_items=1) = Field(..., alias="jobParts")
+ job_parts: List[UpdateIgnoredJobPartSegment] = Field(..., alias="jobParts")
__properties = ["jobParts"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> UpdateIgnoredWarningsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> UpdateIgnoredWarningsDto:
return None
if not isinstance(obj, dict):
- return UpdateIgnoredWarningsDto.parse_obj(obj)
+ return UpdateIgnoredWarningsDto.model_validate(obj)
- _obj = UpdateIgnoredWarningsDto.parse_obj({
+ _obj = UpdateIgnoredWarningsDto.model_validate({
"job_parts": [UpdateIgnoredJobPartSegment.from_dict(_item) for _item in obj.get("jobParts")] if obj.get("jobParts") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/update_lqa_profile_dto.py b/phrasetms_client/models/update_lqa_profile_dto.py
index ebd2b991..220109b3 100644
--- a/phrasetms_client/models/update_lqa_profile_dto.py
+++ b/phrasetms_client/models/update_lqa_profile_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
from phrasetms_client.models.error_categories_dto import ErrorCategoriesDto
from phrasetms_client.models.pass_fail_threshold_dto import PassFailThresholdDto
from phrasetms_client.models.penalty_points_dto import PenaltyPointsDto
@@ -28,20 +29,16 @@ class UpdateLqaProfileDto(BaseModel):
"""
UpdateLqaProfileDto
"""
- name: constr(strict=True, max_length=255, min_length=1) = Field(...)
+ name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=1)] = Field(...)
error_categories: ErrorCategoriesDto = Field(..., alias="errorCategories")
penalty_points: Optional[PenaltyPointsDto] = Field(None, alias="penaltyPoints")
pass_fail_threshold: Optional[PassFailThresholdDto] = Field(None, alias="passFailThreshold")
__properties = ["name", "errorCategories", "penaltyPoints", "passFailThreshold"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +51,7 @@ def from_json(cls, json_str: str) -> UpdateLqaProfileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +73,9 @@ def from_dict(cls, obj: dict) -> UpdateLqaProfileDto:
return None
if not isinstance(obj, dict):
- return UpdateLqaProfileDto.parse_obj(obj)
+ return UpdateLqaProfileDto.model_validate(obj)
- _obj = UpdateLqaProfileDto.parse_obj({
+ _obj = UpdateLqaProfileDto.model_validate({
"name": obj.get("name"),
"error_categories": ErrorCategoriesDto.from_dict(obj.get("errorCategories")) if obj.get("errorCategories") is not None else None,
"penalty_points": PenaltyPointsDto.from_dict(obj.get("penaltyPoints")) if obj.get("penaltyPoints") is not None else None,
diff --git a/phrasetms_client/models/upload_result_dto.py b/phrasetms_client/models/upload_result_dto.py
index b2f132d7..2450ad3e 100644
--- a/phrasetms_client/models/upload_result_dto.py
+++ b/phrasetms_client/models/upload_result_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.connector_errors_dto import ConnectorErrorsDto
class UploadResultDto(BaseModel):
@@ -36,14 +36,10 @@ class UploadResultDto(BaseModel):
errors: Optional[ConnectorErrorsDto] = None
__properties = ["id", "name", "folder", "encodedName", "size", "error", "asyncTaskId", "errors"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -56,7 +52,7 @@ def from_json(cls, json_str: str) -> UploadResultDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -72,9 +68,9 @@ def from_dict(cls, obj: dict) -> UploadResultDto:
return None
if not isinstance(obj, dict):
- return UploadResultDto.parse_obj(obj)
+ return UploadResultDto.model_validate(obj)
- _obj = UploadResultDto.parse_obj({
+ _obj = UploadResultDto.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"folder": obj.get("folder"),
diff --git a/phrasetms_client/models/uploaded_file_dto.py b/phrasetms_client/models/uploaded_file_dto.py
index dc8528d5..0e44e2b1 100644
--- a/phrasetms_client/models/uploaded_file_dto.py
+++ b/phrasetms_client/models/uploaded_file_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
class UploadedFileDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class UploadedFileDto(BaseModel):
type: Optional[StrictStr] = None
__properties = ["uid", "name", "size", "type"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> UploadedFileDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"uid",
"name",
@@ -68,9 +64,9 @@ def from_dict(cls, obj: dict) -> UploadedFileDto:
return None
if not isinstance(obj, dict):
- return UploadedFileDto.parse_obj(obj)
+ return UploadedFileDto.model_validate(obj)
- _obj = UploadedFileDto.parse_obj({
+ _obj = UploadedFileDto.model_validate({
"uid": obj.get("uid"),
"name": obj.get("name"),
"size": obj.get("size"),
diff --git a/phrasetms_client/models/user.py b/phrasetms_client/models/user.py
index 1342e18c..1453e4d5 100644
--- a/phrasetms_client/models/user.py
+++ b/phrasetms_client/models/user.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictInt
+from pydantic import BaseModel, Field, ConfigDict, StrictInt
class User(BaseModel):
"""
@@ -28,14 +28,10 @@ class User(BaseModel):
id: StrictInt = Field(...)
__properties = ["id"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> User:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> User:
return None
if not isinstance(obj, dict):
- return User.parse_obj(obj)
+ return User.model_validate(obj)
- _obj = User.parse_obj({
+ _obj = User.model_validate({
"id": obj.get("id")
})
return _obj
diff --git a/phrasetms_client/models/user_.py b/phrasetms_client/models/user_.py
index b52d4c44..43643300 100644
--- a/phrasetms_client/models/user_.py
+++ b/phrasetms_client/models/user_.py
@@ -18,7 +18,7 @@
import json
from typing import Optional
-from pydantic import Field, StrictBool, StrictInt, StrictStr
+from pydantic import Field, ConfigDict, StrictBool, StrictInt, StrictStr
from phrasetms_client.models.provider_reference import ProviderReference
@@ -43,15 +43,10 @@ class USER(ProviderReference):
"active",
]
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -64,7 +59,7 @@ def from_json(cls, json_str: str) -> USER:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(
+ _dict = self.model_dump(
by_alias=True,
exclude={
"user_name",
@@ -84,9 +79,9 @@ def from_dict(cls, obj: dict) -> USER:
return None
if not isinstance(obj, dict):
- return USER.parse_obj(obj)
+ return USER.model_validate(obj)
- _obj = USER.parse_obj(
+ _obj = USER.model_validate(
{
"type": obj.get("type"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/user__all_of.py b/phrasetms_client/models/user__all_of.py
index ac7c7ac4..0a7047ee 100644
--- a/phrasetms_client/models/user__all_of.py
+++ b/phrasetms_client/models/user__all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class USERAllOf(BaseModel):
"""
@@ -32,14 +32,10 @@ class USERAllOf(BaseModel):
active: Optional[StrictBool] = None
__properties = ["userName", "firstName", "lastName", "email", "active"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> USERAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"user_name",
"first_name",
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> USERAllOf:
return None
if not isinstance(obj, dict):
- return USERAllOf.parse_obj(obj)
+ return USERAllOf.model_validate(obj)
- _obj = USERAllOf.parse_obj({
+ _obj = USERAllOf.model_validate({
"user_name": obj.get("userName"),
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
diff --git a/phrasetms_client/models/user_details_dto_v3.py b/phrasetms_client/models/user_details_dto_v3.py
index 2bae39d4..07e71f21 100644
--- a/phrasetms_client/models/user_details_dto_v3.py
+++ b/phrasetms_client/models/user_details_dto_v3.py
@@ -19,42 +19,48 @@
import phrasetms_client.models
from datetime import datetime
+from typing_extensions import Annotated
from typing import Optional, Union
-from pydantic import BaseModel, Field, StrictBool, StrictStr, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
from phrasetms_client.models.user_reference import UserReference
class UserDetailsDtoV3(BaseModel):
"""
User with all belonging objects
"""
- uid: constr(strict=True, max_length=255, min_length=0) = Field(...)
- user_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="userName")
- first_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="firstName")
- last_name: constr(strict=True, max_length=255, min_length=0) = Field(..., alias="lastName")
- email: constr(strict=True, max_length=255, min_length=0) = Field(...)
+ uid: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ user_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="userName")
+ first_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="firstName")
+ last_name: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(..., alias="lastName")
+ email: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
date_created: Optional[datetime] = Field(None, alias="dateCreated")
date_deleted: Optional[datetime] = Field(None, alias="dateDeleted")
created_by: Optional[UserReference] = Field(None, alias="createdBy")
role: StrictStr = Field(..., description="Enum: \"ADMIN\", \"PROJECT_MANAGER\", \"LINGUIST\", \"GUEST\", \"SUBMITTER\"")
- timezone: constr(strict=True, max_length=255, min_length=0) = Field(...)
- note: Optional[constr(strict=True, max_length=4096, min_length=0)] = None
+ timezone: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=0)] = Field(...)
+ note: Optional[Annotated[str, StringConstraints(strict=True, max_length=4096, min_length=0)]] = None
receive_newsletter: Optional[StrictBool] = Field(None, alias="receiveNewsletter")
active: Optional[StrictBool] = None
pending_email_change: Optional[StrictBool] = Field(None, alias="pendingEmailChange", description="If user has email change pending (new email not verified)")
__properties = ["uid", "userName", "firstName", "lastName", "email", "dateCreated", "dateDeleted", "createdBy", "role", "timezone", "note", "receiveNewsletter", "active", "pendingEmailChange"]
- @validator('role')
+ @field_validator('role')
+ @classmethod
def role_validate_enum(cls, value):
"""Validates the enum"""
if value not in ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER'):
raise ValueError("must be one of enum values ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
# JSON field name that stores the object type
__discriminator_property_name = 'role'
@@ -78,7 +84,7 @@ def get_discriminator_value(cls, obj: dict) -> str:
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -91,7 +97,7 @@ def from_json(cls, json_str: str) -> Union(ADMINRESPONSE, GUESTRESPONSE, LINGUIS
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
diff --git a/phrasetms_client/models/user_dto.py b/phrasetms_client/models/user_dto.py
index 15daaf8f..b04ba0fb 100644
--- a/phrasetms_client/models/user_dto.py
+++ b/phrasetms_client/models/user_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.discount_scheme_reference import DiscountSchemeReference
from phrasetms_client.models.price_list_reference import PriceListReference
from phrasetms_client.models.user_reference import UserReference
@@ -41,14 +41,15 @@ class UserDto(BaseModel):
timezone: Optional[StrictStr] = None
note: Optional[StrictStr] = None
terminologist: Optional[StrictBool] = None
- source_langs: Optional[conlist(StrictStr)] = Field(None, alias="sourceLangs")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
+ source_langs: Optional[List[StrictStr]] = Field(None, alias="sourceLangs")
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
active: Optional[StrictBool] = None
price_list: Optional[PriceListReference] = Field(None, alias="priceList")
net_rate_scheme: Optional[DiscountSchemeReference] = Field(None, alias="netRateScheme")
__properties = ["id", "uid", "userName", "firstName", "lastName", "email", "dateCreated", "dateDeleted", "createdBy", "role", "timezone", "note", "terminologist", "sourceLangs", "targetLangs", "active", "priceList", "netRateScheme"]
- @validator('role')
+ @field_validator('role')
+ @classmethod
def role_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -58,14 +59,10 @@ def role_validate_enum(cls, value):
raise ValueError("must be one of enum values ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -78,7 +75,7 @@ def from_json(cls, json_str: str) -> UserDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -100,9 +97,9 @@ def from_dict(cls, obj: dict) -> UserDto:
return None
if not isinstance(obj, dict):
- return UserDto.parse_obj(obj)
+ return UserDto.model_validate(obj)
- _obj = UserDto.parse_obj({
+ _obj = UserDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/user_password_edit_dto.py b/phrasetms_client/models/user_password_edit_dto.py
index 0a26c9e0..61f81834 100644
--- a/phrasetms_client/models/user_password_edit_dto.py
+++ b/phrasetms_client/models/user_password_edit_dto.py
@@ -13,29 +13,26 @@
from __future__ import annotations
+from typing_extensions import Annotated
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, Field, constr
+from pydantic import BaseModel, Field, ConfigDict, StringConstraints
class UserPasswordEditDto(BaseModel):
"""
UserPasswordEditDto
"""
- password: constr(strict=True, max_length=255, min_length=8) = Field(...)
+ password: Annotated[str, StringConstraints(strict=True, max_length=255, min_length=8)] = Field(...)
__properties = ["password"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +45,7 @@ def from_json(cls, json_str: str) -> UserPasswordEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +58,9 @@ def from_dict(cls, obj: dict) -> UserPasswordEditDto:
return None
if not isinstance(obj, dict):
- return UserPasswordEditDto.parse_obj(obj)
+ return UserPasswordEditDto.model_validate(obj)
- _obj = UserPasswordEditDto.parse_obj({
+ _obj = UserPasswordEditDto.model_validate({
"password": obj.get("password")
})
return _obj
diff --git a/phrasetms_client/models/user_reference.py b/phrasetms_client/models/user_reference.py
index d9b47f12..0262ea46 100644
--- a/phrasetms_client/models/user_reference.py
+++ b/phrasetms_client/models/user_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictStr, field_validator
class UserReference(BaseModel):
"""
@@ -34,7 +34,8 @@ class UserReference(BaseModel):
uid: Optional[StrictStr] = None
__properties = ["firstName", "lastName", "userName", "email", "role", "id", "uid"]
- @validator('role')
+ @field_validator('role')
+ @classmethod
def role_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -44,14 +45,10 @@ def role_validate_enum(cls, value):
raise ValueError("must be one of enum values ('SYS_ADMIN', 'SYS_ADMIN_READ', 'ADMIN', 'PROJECT_MANAGER', 'LINGUIST', 'GUEST', 'SUBMITTER')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -64,7 +61,7 @@ def from_json(cls, json_str: str) -> UserReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -77,9 +74,9 @@ def from_dict(cls, obj: dict) -> UserReference:
return None
if not isinstance(obj, dict):
- return UserReference.parse_obj(obj)
+ return UserReference.model_validate(obj)
- _obj = UserReference.parse_obj({
+ _obj = UserReference.model_validate({
"first_name": obj.get("firstName"),
"last_name": obj.get("lastName"),
"user_name": obj.get("userName"),
diff --git a/phrasetms_client/models/user_references_dto.py b/phrasetms_client/models/user_references_dto.py
index ee3f3885..106c7c5c 100644
--- a/phrasetms_client/models/user_references_dto.py
+++ b/phrasetms_client/models/user_references_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.user_reference import UserReference
class UserReferencesDto(BaseModel):
"""
UserReferencesDto
"""
- users: Optional[conlist(UserReference)] = None
+ users: Optional[List[UserReference]] = None
__properties = ["users"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> UserReferencesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> UserReferencesDto:
return None
if not isinstance(obj, dict):
- return UserReferencesDto.parse_obj(obj)
+ return UserReferencesDto.model_validate(obj)
- _obj = UserReferencesDto.parse_obj({
+ _obj = UserReferencesDto.model_validate({
"users": [UserReference.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/user_statistics_dto.py b/phrasetms_client/models/user_statistics_dto.py
index 0f42c03d..54d68fe1 100644
--- a/phrasetms_client/models/user_statistics_dto.py
+++ b/phrasetms_client/models/user_statistics_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class UserStatisticsDto(BaseModel):
"""
@@ -31,14 +31,10 @@ class UserStatisticsDto(BaseModel):
user_agent: Optional[StrictStr] = Field(None, alias="userAgent")
__properties = ["date", "ipAddress", "ipCountry", "userAgent"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> UserStatisticsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> UserStatisticsDto:
return None
if not isinstance(obj, dict):
- return UserStatisticsDto.parse_obj(obj)
+ return UserStatisticsDto.model_validate(obj)
- _obj = UserStatisticsDto.parse_obj({
+ _obj = UserStatisticsDto.model_validate({
"var_date": obj.get("date"),
"ip_address": obj.get("ipAddress"),
"ip_country": obj.get("ipCountry"),
diff --git a/phrasetms_client/models/user_statistics_list_dto.py b/phrasetms_client/models/user_statistics_list_dto.py
index f33d1f5b..9116ea98 100644
--- a/phrasetms_client/models/user_statistics_list_dto.py
+++ b/phrasetms_client/models/user_statistics_list_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.user_statistics_dto import UserStatisticsDto
class UserStatisticsListDto(BaseModel):
"""
envelope for user statistics
"""
- user_statistics: conlist(UserStatisticsDto) = Field(..., alias="userStatistics")
+ user_statistics: List[UserStatisticsDto] = Field(..., alias="userStatistics")
__properties = ["userStatistics"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> UserStatisticsListDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> UserStatisticsListDto:
return None
if not isinstance(obj, dict):
- return UserStatisticsListDto.parse_obj(obj)
+ return UserStatisticsListDto.model_validate(obj)
- _obj = UserStatisticsListDto.parse_obj({
+ _obj = UserStatisticsListDto.model_validate({
"user_statistics": [UserStatisticsDto.from_dict(_item) for _item in obj.get("userStatistics")] if obj.get("userStatistics") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/variable_dto.py b/phrasetms_client/models/variable_dto.py
index 8081f516..01bee25e 100644
--- a/phrasetms_client/models/variable_dto.py
+++ b/phrasetms_client/models/variable_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class VariableDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class VariableDto(BaseModel):
value: Optional[StrictStr] = None
__properties = ["name", "value"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> VariableDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> VariableDto:
return None
if not isinstance(obj, dict):
- return VariableDto.parse_obj(obj)
+ return VariableDto.model_validate(obj)
- _obj = VariableDto.parse_obj({
+ _obj = VariableDto.model_validate({
"name": obj.get("name"),
"value": obj.get("value")
})
diff --git a/phrasetms_client/models/vendor.py b/phrasetms_client/models/vendor.py
index 1e91aa72..a30fb734 100644
--- a/phrasetms_client/models/vendor.py
+++ b/phrasetms_client/models/vendor.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.abstract_project_dto import AbstractProjectDto
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.buyer_reference import BuyerReference
@@ -56,7 +56,7 @@ class Vendor(AbstractProjectDto):
quality_assurance_settings: Optional[Dict[str, Any]] = Field(
None, alias="qualityAssuranceSettings"
)
- workflow_steps: Optional[conlist(ProjectWorkflowStepDto)] = Field(
+ workflow_steps: Optional[List[ProjectWorkflowStepDto]] = Field(
None, alias="workflowSteps"
)
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
@@ -102,7 +102,8 @@ class Vendor(AbstractProjectDto):
"buyer",
]
- @validator("status")
+ @field_validator("status")
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -122,15 +123,10 @@ def status_validate_enum(cls, value):
)
return value
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -143,7 +139,7 @@ def from_json(cls, json_str: str) -> Vendor:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of domain
if self.domain:
_dict["domain"] = self.domain.to_dict()
@@ -204,9 +200,9 @@ def from_dict(cls, obj: dict) -> Vendor:
return None
if not isinstance(obj, dict):
- return Vendor.parse_obj(obj)
+ return Vendor.model_validate(obj)
- _obj = Vendor.parse_obj(
+ _obj = Vendor.model_validate(
{
"uid": obj.get("uid"),
"internal_id": obj.get("internalId"),
diff --git a/phrasetms_client/models/vendor_.py b/phrasetms_client/models/vendor_.py
index e1aa2a79..edefb0e1 100644
--- a/phrasetms_client/models/vendor_.py
+++ b/phrasetms_client/models/vendor_.py
@@ -18,7 +18,7 @@
import json
from typing import Optional
-from pydantic import Field, StrictInt, StrictStr
+from pydantic import Field, ConfigDict, StrictInt, StrictStr
from phrasetms_client.models.provider_reference import ProviderReference
class VENDOR(ProviderReference):
@@ -29,14 +29,10 @@ class VENDOR(ProviderReference):
default_project_owner_id: Optional[StrictInt] = Field(None, alias="defaultProjectOwnerId")
__properties = ["type", "id", "uid", "name", "defaultProjectOwnerId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> VENDOR:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
"properties",
},
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> VENDOR:
return None
if not isinstance(obj, dict):
- return VENDOR.parse_obj(obj)
+ return VENDOR.model_validate(obj)
- _obj = VENDOR.parse_obj({
+ _obj = VENDOR.model_validate({
"type": obj.get("type"),
"id": obj.get("id"),
"uid": obj.get("uid"),
diff --git a/phrasetms_client/models/vendor__all_of.py b/phrasetms_client/models/vendor__all_of.py
index 0914f796..7865e6f5 100644
--- a/phrasetms_client/models/vendor__all_of.py
+++ b/phrasetms_client/models/vendor__all_of.py
@@ -18,7 +18,7 @@
import json
from typing import Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class VENDORAllOf(BaseModel):
"""
@@ -28,14 +28,10 @@ class VENDORAllOf(BaseModel):
default_project_owner_id: Optional[StrictInt] = Field(None, alias="defaultProjectOwnerId")
__properties = ["name", "defaultProjectOwnerId"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -48,7 +44,7 @@ def from_json(cls, json_str: str) -> VENDORAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -61,9 +57,9 @@ def from_dict(cls, obj: dict) -> VENDORAllOf:
return None
if not isinstance(obj, dict):
- return VENDORAllOf.parse_obj(obj)
+ return VENDORAllOf.model_validate(obj)
- _obj = VENDORAllOf.parse_obj({
+ _obj = VENDORAllOf.model_validate({
"name": obj.get("name"),
"default_project_owner_id": obj.get("defaultProjectOwnerId"),
})
diff --git a/phrasetms_client/models/vendor_all_of.py b/phrasetms_client/models/vendor_all_of.py
index 6ffa4726..2f897bcf 100644
--- a/phrasetms_client/models/vendor_all_of.py
+++ b/phrasetms_client/models/vendor_all_of.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Any, Dict, List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
from phrasetms_client.models.business_unit_reference import BusinessUnitReference
from phrasetms_client.models.buyer_reference import BuyerReference
from phrasetms_client.models.client_reference import ClientReference
@@ -51,7 +51,7 @@ class VendorAllOf(BaseModel):
quality_assurance_settings: Optional[Dict[str, Any]] = Field(
None, alias="qualityAssuranceSettings"
)
- workflow_steps: Optional[conlist(ProjectWorkflowStepDto)] = Field(
+ workflow_steps: Optional[List[ProjectWorkflowStepDto]] = Field(
None, alias="workflowSteps"
)
analyse_settings: Optional[Dict[str, Any]] = Field(None, alias="analyseSettings")
@@ -84,7 +84,8 @@ class VendorAllOf(BaseModel):
"buyer",
]
- @validator("status")
+ @field_validator("status")
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -104,15 +105,10 @@ def status_validate_enum(cls, value):
)
return value
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -125,7 +121,7 @@ def from_json(cls, json_str: str) -> VendorAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of progress
if self.progress:
_dict["progress"] = self.progress.to_dict()
@@ -163,9 +159,9 @@ def from_dict(cls, obj: dict) -> VendorAllOf:
return None
if not isinstance(obj, dict):
- return VendorAllOf.parse_obj(obj)
+ return VendorAllOf.model_validate(obj)
- _obj = VendorAllOf.parse_obj(
+ _obj = VendorAllOf.model_validate(
{
"shared": obj.get("shared"),
"progress": ProgressDto.from_dict(obj.get("progress"))
diff --git a/phrasetms_client/models/vendor_dto.py b/phrasetms_client/models/vendor_dto.py
index 46065c5e..1a75e2dc 100644
--- a/phrasetms_client/models/vendor_dto.py
+++ b/phrasetms_client/models/vendor_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.client_reference import ClientReference
from phrasetms_client.models.discount_scheme_reference import DiscountSchemeReference
from phrasetms_client.models.domain_reference import DomainReference
@@ -37,22 +37,18 @@ class VendorDto(BaseModel):
vendor_token: Optional[StrictStr] = Field(None, alias="vendorToken")
price_list: Optional[PriceListReference] = Field(None, alias="priceList")
net_rate_scheme: Optional[DiscountSchemeReference] = Field(None, alias="netRateScheme")
- source_locales: Optional[conlist(StrictStr)] = Field(None, alias="sourceLocales")
- target_locales: Optional[conlist(StrictStr)] = Field(None, alias="targetLocales")
- clients: Optional[conlist(ClientReference)] = None
- domains: Optional[conlist(DomainReference)] = None
- sub_domains: Optional[conlist(SubDomainReference)] = Field(None, alias="subDomains")
- workflow_steps: Optional[conlist(WorkflowStepReference)] = Field(None, alias="workflowSteps")
+ source_locales: Optional[List[StrictStr]] = Field(None, alias="sourceLocales")
+ target_locales: Optional[List[StrictStr]] = Field(None, alias="targetLocales")
+ clients: Optional[List[ClientReference]] = None
+ domains: Optional[List[DomainReference]] = None
+ sub_domains: Optional[List[SubDomainReference]] = Field(None, alias="subDomains")
+ workflow_steps: Optional[List[WorkflowStepReference]] = Field(None, alias="workflowSteps")
__properties = ["id", "uid", "name", "vendorToken", "priceList", "netRateScheme", "sourceLocales", "targetLocales", "clients", "domains", "subDomains", "workflowSteps"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +61,7 @@ def from_json(cls, json_str: str) -> VendorDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -112,9 +108,9 @@ def from_dict(cls, obj: dict) -> VendorDto:
return None
if not isinstance(obj, dict):
- return VendorDto.parse_obj(obj)
+ return VendorDto.model_validate(obj)
- _obj = VendorDto.parse_obj({
+ _obj = VendorDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/vendor_reference.py b/phrasetms_client/models/vendor_reference.py
index 34f31191..8dbbdf7e 100644
--- a/phrasetms_client/models/vendor_reference.py
+++ b/phrasetms_client/models/vendor_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class VendorReference(BaseModel):
"""
@@ -30,14 +30,10 @@ class VendorReference(BaseModel):
name: Optional[StrictStr] = None
__properties = ["id", "uid", "name"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> VendorReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> VendorReference:
return None
if not isinstance(obj, dict):
- return VendorReference.parse_obj(obj)
+ return VendorReference.model_validate(obj)
- _obj = VendorReference.parse_obj({
+ _obj = VendorReference.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name")
diff --git a/phrasetms_client/models/vendor_security_settings_dto.py b/phrasetms_client/models/vendor_security_settings_dto.py
index 85e1e4ce..22f4cb3f 100644
--- a/phrasetms_client/models/vendor_security_settings_dto.py
+++ b/phrasetms_client/models/vendor_security_settings_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictBool
from phrasetms_client.models.uid_reference import UidReference
class VendorSecuritySettingsDto(BaseModel):
@@ -27,18 +27,14 @@ class VendorSecuritySettingsDto(BaseModel):
VendorSecuritySettingsDto
"""
can_change_shared_job_due_date_enabled: Optional[StrictBool] = Field(None, alias="canChangeSharedJobDueDateEnabled", description="Default: `false`")
- can_change_shared_job_due_date: Optional[conlist(UidReference)] = Field(None, alias="canChangeSharedJobDueDate")
+ can_change_shared_job_due_date: Optional[List[UidReference]] = Field(None, alias="canChangeSharedJobDueDate")
job_vendors_may_upload_references: Optional[StrictBool] = Field(None, alias="jobVendorsMayUploadReferences", description="Default: `false`")
__properties = ["canChangeSharedJobDueDateEnabled", "canChangeSharedJobDueDate", "jobVendorsMayUploadReferences"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> VendorSecuritySettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -71,9 +67,9 @@ def from_dict(cls, obj: dict) -> VendorSecuritySettingsDto:
return None
if not isinstance(obj, dict):
- return VendorSecuritySettingsDto.parse_obj(obj)
+ return VendorSecuritySettingsDto.model_validate(obj)
- _obj = VendorSecuritySettingsDto.parse_obj({
+ _obj = VendorSecuritySettingsDto.model_validate({
"can_change_shared_job_due_date_enabled": obj.get("canChangeSharedJobDueDateEnabled"),
"can_change_shared_job_due_date": [UidReference.from_dict(_item) for _item in obj.get("canChangeSharedJobDueDate")] if obj.get("canChangeSharedJobDueDate") is not None else None,
"job_vendors_may_upload_references": obj.get("jobVendorsMayUploadReferences")
diff --git a/phrasetms_client/models/vendor_user_reference.py b/phrasetms_client/models/vendor_user_reference.py
index 559496f8..4da4696a 100644
--- a/phrasetms_client/models/vendor_user_reference.py
+++ b/phrasetms_client/models/vendor_user_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.organization_reference import OrganizationReference
class VendorUserReference(BaseModel):
@@ -34,14 +34,10 @@ class VendorUserReference(BaseModel):
organization: Optional[OrganizationReference] = None
__properties = ["uid", "vendorUid", "username", "firstName", "lastName", "organization"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -54,7 +50,7 @@ def from_json(cls, json_str: str) -> VendorUserReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> VendorUserReference:
return None
if not isinstance(obj, dict):
- return VendorUserReference.parse_obj(obj)
+ return VendorUserReference.model_validate(obj)
- _obj = VendorUserReference.parse_obj({
+ _obj = VendorUserReference.model_validate({
"uid": obj.get("uid"),
"vendor_uid": obj.get("vendorUid"),
"username": obj.get("username"),
diff --git a/phrasetms_client/models/verity_weights_dto.py b/phrasetms_client/models/verity_weights_dto.py
index 570d901a..e5724c28 100644
--- a/phrasetms_client/models/verity_weights_dto.py
+++ b/phrasetms_client/models/verity_weights_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.toggleable_weight_dto import ToggleableWeightDto
class VerityWeightsDto(BaseModel):
@@ -30,14 +30,10 @@ class VerityWeightsDto(BaseModel):
culture_specific_reference: Optional[ToggleableWeightDto] = Field(None, alias="cultureSpecificReference")
__properties = ["verity", "cultureSpecificReference"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> VerityWeightsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> VerityWeightsDto:
return None
if not isinstance(obj, dict):
- return VerityWeightsDto.parse_obj(obj)
+ return VerityWeightsDto.model_validate(obj)
- _obj = VerityWeightsDto.parse_obj({
+ _obj = VerityWeightsDto.model_validate({
"verity": ToggleableWeightDto.from_dict(obj.get("verity")) if obj.get("verity") is not None else None,
"culture_specific_reference": ToggleableWeightDto.from_dict(obj.get("cultureSpecificReference")) if obj.get("cultureSpecificReference") is not None else None
})
diff --git a/phrasetms_client/models/void.py b/phrasetms_client/models/void.py
index db44588f..54b09c14 100644
--- a/phrasetms_client/models/void.py
+++ b/phrasetms_client/models/void.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool
+from pydantic import BaseModel, ConfigDict, StrictBool
from phrasetms_client.models.qa_check_dto_v2 import QACheckDtoV2
class VOID(QACheckDtoV2):
@@ -31,14 +31,10 @@ class VOID(QACheckDtoV2):
instant: Optional[StrictBool] = None
__properties = ["type", "name", "ignorable", "enabled", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> VOID:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> VOID:
return None
if not isinstance(obj, dict):
- return VOID.parse_obj(obj)
+ return VOID.model_validate(obj)
- _obj = VOID.parse_obj({
+ _obj = VOID.model_validate({
"type": obj.get("type"),
"name": obj.get("name"),
"ignorable": obj.get("ignorable"),
diff --git a/phrasetms_client/models/void_all_of.py b/phrasetms_client/models/void_all_of.py
index 3a6c2ab4..1f2a1533 100644
--- a/phrasetms_client/models/void_all_of.py
+++ b/phrasetms_client/models/void_all_of.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictBool
+from pydantic import BaseModel, ConfigDict, StrictBool
class VOIDAllOf(BaseModel):
"""
@@ -30,14 +30,10 @@ class VOIDAllOf(BaseModel):
instant: Optional[StrictBool] = None
__properties = ["ignorable", "enabled", "instant"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> VOIDAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -63,9 +59,9 @@ def from_dict(cls, obj: dict) -> VOIDAllOf:
return None
if not isinstance(obj, dict):
- return VOIDAllOf.parse_obj(obj)
+ return VOIDAllOf.model_validate(obj)
- _obj = VOIDAllOf.parse_obj({
+ _obj = VOIDAllOf.model_validate({
"ignorable": obj.get("ignorable"),
"enabled": obj.get("enabled"),
"instant": obj.get("instant")
diff --git a/phrasetms_client/models/web_editor_link_dto_v2.py b/phrasetms_client/models/web_editor_link_dto_v2.py
index 74115484..99d06d58 100644
--- a/phrasetms_client/models/web_editor_link_dto_v2.py
+++ b/phrasetms_client/models/web_editor_link_dto_v2.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, StrictStr, conlist
+from pydantic import BaseModel, ConfigDict, StrictStr
from phrasetms_client.models.error_detail_dto_v2 import ErrorDetailDtoV2
class WebEditorLinkDtoV2(BaseModel):
@@ -27,17 +27,13 @@ class WebEditorLinkDtoV2(BaseModel):
WebEditorLinkDtoV2
"""
url: Optional[StrictStr] = None
- warnings: Optional[conlist(ErrorDetailDtoV2)] = None
+ warnings: Optional[List[ErrorDetailDtoV2]] = None
__properties = ["url", "warnings"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -50,7 +46,7 @@ def from_json(cls, json_str: str) -> WebEditorLinkDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -70,9 +66,9 @@ def from_dict(cls, obj: dict) -> WebEditorLinkDtoV2:
return None
if not isinstance(obj, dict):
- return WebEditorLinkDtoV2.parse_obj(obj)
+ return WebEditorLinkDtoV2.model_validate(obj)
- _obj = WebEditorLinkDtoV2.parse_obj({
+ _obj = WebEditorLinkDtoV2.model_validate({
"url": obj.get("url"),
"warnings": [ErrorDetailDtoV2.from_dict(_item) for _item in obj.get("warnings")] if obj.get("warnings") is not None else None
})
diff --git a/phrasetms_client/models/web_hook_dto_v2.py b/phrasetms_client/models/web_hook_dto_v2.py
index 5213c5ea..f42ff5d5 100644
--- a/phrasetms_client/models/web_hook_dto_v2.py
+++ b/phrasetms_client/models/web_hook_dto_v2.py
@@ -18,8 +18,18 @@
import json
from datetime import datetime
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, constr, validator
+from pydantic import (
+ BaseModel,
+ Field,
+ ConfigDict,
+ StrictBool,
+ StrictInt,
+ StrictStr,
+ StringConstraints,
+ field_validator,
+)
from phrasetms_client.models.user_reference import UserReference
class WebHookDtoV2(BaseModel):
@@ -30,8 +40,8 @@ class WebHookDtoV2(BaseModel):
id: Optional[StrictStr] = None
uid: Optional[StrictStr] = None
url: StrictStr = Field(...)
- events: Optional[conlist(StrictStr)] = None
- secret_token: Optional[constr(strict=True, max_length=255, min_length=1)] = Field(None, alias="secretToken")
+ events: Optional[List[StrictStr]] = None
+ secret_token: Optional[Annotated[str, StringConstraints(strict=True, max_length=255, min_length=1)]] = Field(None, alias="secretToken")
hidden: Optional[StrictBool] = Field(None, description="Default: false")
status: Optional[StrictStr] = None
failed_attempts: Optional[StrictInt] = Field(None, alias="failedAttempts")
@@ -41,7 +51,8 @@ class WebHookDtoV2(BaseModel):
last_modified_by: Optional[UserReference] = Field(None, alias="lastModifiedBy")
__properties = ["name", "id", "uid", "url", "events", "secretToken", "hidden", "status", "failedAttempts", "created", "createdBy", "lastModified", "lastModifiedBy"]
- @validator('events')
+ @field_validator('events')
+ @classmethod
def events_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -52,7 +63,8 @@ def events_validate_enum(cls, value):
raise ValueError("each list item must be one of ('JOB_STATUS_CHANGED', 'JOB_CREATED', 'JOB_DELETED', 'JOB_ASSIGNED', 'JOB_DUE_DATE_CHANGED', 'JOB_UPDATED', 'JOB_TARGET_UPDATED', 'JOB_EXPORTED', 'JOB_UNEXPORTED', 'PROJECT_CREATED', 'PROJECT_DELETED', 'PROJECT_STATUS_CHANGED', 'PROJECT_DUE_DATE_CHANGED', 'SHARED_PROJECT_ASSIGNED', 'PROJECT_METADATA_UPDATED', 'PRE_TRANSLATION_FINISHED', 'ANALYSIS_CREATED', 'CONTINUOUS_JOB_UPDATED', 'PROJECT_TEMPLATE_CREATED', 'PROJECT_TEMPLATE_UPDATED', 'PROJECT_TEMPLATE_DELETED')")
return value
- @validator('status')
+ @field_validator('status')
+ @classmethod
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -62,14 +74,10 @@ def status_validate_enum(cls, value):
raise ValueError("must be one of enum values ('ENABLED', 'DISABLED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -82,7 +90,7 @@ def from_json(cls, json_str: str) -> WebHookDtoV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -101,9 +109,9 @@ def from_dict(cls, obj: dict) -> WebHookDtoV2:
return None
if not isinstance(obj, dict):
- return WebHookDtoV2.parse_obj(obj)
+ return WebHookDtoV2.model_validate(obj)
- _obj = WebHookDtoV2.parse_obj({
+ _obj = WebHookDtoV2.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"uid": obj.get("uid"),
diff --git a/phrasetms_client/models/webhook_call_dto.py b/phrasetms_client/models/webhook_call_dto.py
index ece4e8dc..fcfd1fe3 100644
--- a/phrasetms_client/models/webhook_call_dto.py
+++ b/phrasetms_client/models/webhook_call_dto.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator
from phrasetms_client.models.uid_reference import UidReference
class WebhookCallDto(BaseModel):
@@ -41,7 +41,8 @@ class WebhookCallDto(BaseModel):
error_message: Optional[StrictStr] = Field(None, alias="errorMessage")
__properties = ["uid", "parentUid", "eventUid", "webhookSettings", "createdAt", "url", "forced", "lastForcedAt", "body", "triggerEvent", "retryAttempt", "statusCode", "errorMessage"]
- @validator('trigger_event')
+ @field_validator('trigger_event')
+ @classmethod
def trigger_event_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -51,14 +52,10 @@ def trigger_event_validate_enum(cls, value):
raise ValueError("must be one of enum values ('JOB_STATUS_CHANGED', 'JOB_CREATED', 'JOB_DELETED', 'JOB_ASSIGNED', 'JOB_DUE_DATE_CHANGED', 'JOB_UPDATED', 'JOB_TARGET_UPDATED', 'JOB_EXPORTED', 'JOB_UNEXPORTED', 'PROJECT_CREATED', 'PROJECT_DELETED', 'PROJECT_STATUS_CHANGED', 'PROJECT_DUE_DATE_CHANGED', 'SHARED_PROJECT_ASSIGNED', 'PROJECT_METADATA_UPDATED', 'PRE_TRANSLATION_FINISHED', 'ANALYSIS_CREATED', 'CONTINUOUS_JOB_UPDATED', 'PROJECT_TEMPLATE_CREATED', 'PROJECT_TEMPLATE_UPDATED', 'PROJECT_TEMPLATE_DELETED')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -71,7 +68,7 @@ def from_json(cls, json_str: str) -> WebhookCallDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -87,9 +84,9 @@ def from_dict(cls, obj: dict) -> WebhookCallDto:
return None
if not isinstance(obj, dict):
- return WebhookCallDto.parse_obj(obj)
+ return WebhookCallDto.model_validate(obj)
- _obj = WebhookCallDto.parse_obj({
+ _obj = WebhookCallDto.model_validate({
"uid": obj.get("uid"),
"parent_uid": obj.get("parentUid"),
"event_uid": obj.get("eventUid"),
diff --git a/phrasetms_client/models/webhook_preview_dto.py b/phrasetms_client/models/webhook_preview_dto.py
index d9987b27..ed379501 100644
--- a/phrasetms_client/models/webhook_preview_dto.py
+++ b/phrasetms_client/models/webhook_preview_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, StrictStr
+from pydantic import BaseModel, ConfigDict, StrictStr
class WebhookPreviewDto(BaseModel):
"""
@@ -29,14 +29,10 @@ class WebhookPreviewDto(BaseModel):
preview: Optional[StrictStr] = None
__properties = ["event", "preview"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> WebhookPreviewDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -62,9 +58,9 @@ def from_dict(cls, obj: dict) -> WebhookPreviewDto:
return None
if not isinstance(obj, dict):
- return WebhookPreviewDto.parse_obj(obj)
+ return WebhookPreviewDto.model_validate(obj)
- _obj = WebhookPreviewDto.parse_obj({
+ _obj = WebhookPreviewDto.model_validate({
"event": obj.get("event"),
"preview": obj.get("preview")
})
diff --git a/phrasetms_client/models/webhook_previews_dto.py b/phrasetms_client/models/webhook_previews_dto.py
index 63070534..bd3f363b 100644
--- a/phrasetms_client/models/webhook_previews_dto.py
+++ b/phrasetms_client/models/webhook_previews_dto.py
@@ -19,24 +19,20 @@
from typing import List, Optional
-from pydantic import BaseModel, conlist
+from pydantic import BaseModel, ConfigDict
from phrasetms_client.models.webhook_preview_dto import WebhookPreviewDto
class WebhookPreviewsDto(BaseModel):
"""
WebhookPreviewsDto
"""
- previews: Optional[conlist(WebhookPreviewDto)] = None
+ previews: Optional[List[WebhookPreviewDto]] = None
__properties = ["previews"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> WebhookPreviewsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> WebhookPreviewsDto:
return None
if not isinstance(obj, dict):
- return WebhookPreviewsDto.parse_obj(obj)
+ return WebhookPreviewsDto.model_validate(obj)
- _obj = WebhookPreviewsDto.parse_obj({
+ _obj = WebhookPreviewsDto.model_validate({
"previews": [WebhookPreviewDto.from_dict(_item) for _item in obj.get("previews")] if obj.get("previews") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/wild_card_search_by_job_request_dto_v3.py b/phrasetms_client/models/wild_card_search_by_job_request_dto_v3.py
index 35f16e80..688317df 100644
--- a/phrasetms_client/models/wild_card_search_by_job_request_dto_v3.py
+++ b/phrasetms_client/models/wild_card_search_by_job_request_dto_v3.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class WildCardSearchByJobRequestDtoV3(BaseModel):
"""
@@ -27,18 +28,14 @@ class WildCardSearchByJobRequestDtoV3(BaseModel):
"""
query: StrictStr = Field(...)
reverse: Optional[StrictBool] = Field(None, description="Default: false")
- count: Optional[conint(strict=True, le=50, ge=1)] = None
+ count: Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None
offset: Optional[StrictInt] = None
__properties = ["query", "reverse", "count", "offset"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +48,7 @@ def from_json(cls, json_str: str) -> WildCardSearchByJobRequestDtoV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +61,9 @@ def from_dict(cls, obj: dict) -> WildCardSearchByJobRequestDtoV3:
return None
if not isinstance(obj, dict):
- return WildCardSearchByJobRequestDtoV3.parse_obj(obj)
+ return WildCardSearchByJobRequestDtoV3.model_validate(obj)
- _obj = WildCardSearchByJobRequestDtoV3.parse_obj({
+ _obj = WildCardSearchByJobRequestDtoV3.model_validate({
"query": obj.get("query"),
"reverse": obj.get("reverse"),
"count": obj.get("count"),
diff --git a/phrasetms_client/models/wild_card_search_request_dto.py b/phrasetms_client/models/wild_card_search_request_dto.py
index 408897e1..e7bc104d 100644
--- a/phrasetms_client/models/wild_card_search_request_dto.py
+++ b/phrasetms_client/models/wild_card_search_request_dto.py
@@ -18,8 +18,9 @@
import json
+from typing_extensions import Annotated
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictInt, StrictStr, conint, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictInt, StrictStr
class WildCardSearchRequestDto(BaseModel):
"""
@@ -27,20 +28,16 @@ class WildCardSearchRequestDto(BaseModel):
"""
query: Optional[StrictStr] = None
source_lang: StrictStr = Field(..., alias="sourceLang")
- target_langs: Optional[conlist(StrictStr)] = Field(None, alias="targetLangs")
- count: Optional[conint(strict=True, le=50, ge=1)] = None
+ target_langs: Optional[List[StrictStr]] = Field(None, alias="targetLangs")
+ count: Optional[Annotated[int, Field(strict=True, le=50, ge=1)]] = None
offset: Optional[StrictInt] = None
- source_langs: Optional[conlist(StrictStr)] = Field(None, alias="sourceLangs")
+ source_langs: Optional[List[StrictStr]] = Field(None, alias="sourceLangs")
__properties = ["query", "sourceLang", "targetLangs", "count", "offset", "sourceLangs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +50,7 @@ def from_json(cls, json_str: str) -> WildCardSearchRequestDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +63,9 @@ def from_dict(cls, obj: dict) -> WildCardSearchRequestDto:
return None
if not isinstance(obj, dict):
- return WildCardSearchRequestDto.parse_obj(obj)
+ return WildCardSearchRequestDto.model_validate(obj)
- _obj = WildCardSearchRequestDto.parse_obj({
+ _obj = WildCardSearchRequestDto.model_validate({
"query": obj.get("query"),
"source_lang": obj.get("sourceLang"),
"target_langs": obj.get("targetLangs"),
diff --git a/phrasetms_client/models/wordpress.py b/phrasetms_client/models/wordpress.py
index 7786f069..29386cf9 100644
--- a/phrasetms_client/models/wordpress.py
+++ b/phrasetms_client/models/wordpress.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.abstract_connector_dto import AbstractConnectorDto
class Wordpress(AbstractConnectorDto):
@@ -32,14 +32,10 @@ class Wordpress(AbstractConnectorDto):
token: StrictStr = Field(..., description="Memsource plugin token")
__properties = ["name", "type", "basicAuthUserName", "basicAuthPassword", "host", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> Wordpress:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> Wordpress:
return None
if not isinstance(obj, dict):
- return Wordpress.parse_obj(obj)
+ return Wordpress.model_validate(obj)
- _obj = Wordpress.parse_obj({
+ _obj = Wordpress.model_validate({
"name": obj.get("name"),
"type": obj.get("type"),
"basic_auth_user_name": obj.get("basicAuthUserName"),
diff --git a/phrasetms_client/models/wordpress_all_of.py b/phrasetms_client/models/wordpress_all_of.py
index 2823fbcc..883ec3c1 100644
--- a/phrasetms_client/models/wordpress_all_of.py
+++ b/phrasetms_client/models/wordpress_all_of.py
@@ -19,7 +19,7 @@
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
class WordpressAllOf(BaseModel):
"""
@@ -31,14 +31,10 @@ class WordpressAllOf(BaseModel):
token: StrictStr = Field(..., description="Memsource plugin token")
__properties = ["basicAuthUserName", "basicAuthPassword", "host", "token"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -51,7 +47,7 @@ def from_json(cls, json_str: str) -> WordpressAllOf:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -64,9 +60,9 @@ def from_dict(cls, obj: dict) -> WordpressAllOf:
return None
if not isinstance(obj, dict):
- return WordpressAllOf.parse_obj(obj)
+ return WordpressAllOf.model_validate(obj)
- _obj = WordpressAllOf.parse_obj({
+ _obj = WordpressAllOf.model_validate({
"basic_auth_user_name": obj.get("basicAuthUserName"),
"basic_auth_password": obj.get("basicAuthPassword"),
"host": obj.get("host"),
diff --git a/phrasetms_client/models/workflow_changes_dto.py b/phrasetms_client/models/workflow_changes_dto.py
index 791f4d5e..1fe76e49 100644
--- a/phrasetms_client/models/workflow_changes_dto.py
+++ b/phrasetms_client/models/workflow_changes_dto.py
@@ -19,24 +19,20 @@
from typing import List
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.uid_reference import UidReference
class WorkflowChangesDto(BaseModel):
"""
WorkflowChangesDto
"""
- jobs: conlist(UidReference, max_items=100, min_items=1) = Field(...)
+ jobs: List[UidReference] = Field(...)
__properties = ["jobs"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -49,7 +45,7 @@ def from_json(cls, json_str: str) -> WorkflowChangesDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -69,9 +65,9 @@ def from_dict(cls, obj: dict) -> WorkflowChangesDto:
return None
if not isinstance(obj, dict):
- return WorkflowChangesDto.parse_obj(obj)
+ return WorkflowChangesDto.model_validate(obj)
- _obj = WorkflowChangesDto.parse_obj({
+ _obj = WorkflowChangesDto.model_validate({
"jobs": [UidReference.from_dict(_item) for _item in obj.get("jobs")] if obj.get("jobs") is not None else None
})
return _obj
diff --git a/phrasetms_client/models/workflow_step_configuration.py b/phrasetms_client/models/workflow_step_configuration.py
index a6ffd60b..281c4606 100644
--- a/phrasetms_client/models/workflow_step_configuration.py
+++ b/phrasetms_client/models/workflow_step_configuration.py
@@ -19,7 +19,7 @@
from datetime import datetime
from typing import List, Optional
-from pydantic import BaseModel, Field, StrictStr, conlist
+from pydantic import BaseModel, Field, ConfigDict, StrictStr
from phrasetms_client.models.notify_provider_dto import NotifyProviderDto
from phrasetms_client.models.providers_per_language import ProvidersPerLanguage
@@ -28,19 +28,15 @@ class WorkflowStepConfiguration(BaseModel):
WorkflowStepConfiguration
"""
id: Optional[StrictStr] = None
- assignments: conlist(ProvidersPerLanguage) = Field(...)
+ assignments: List[ProvidersPerLanguage] = Field(...)
due: Optional[datetime] = Field(None, description="Use ISO 8601 date format.")
notify_provider: Optional[NotifyProviderDto] = Field(None, alias="notifyProvider")
__properties = ["id", "assignments", "due", "notifyProvider"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> WorkflowStepConfiguration:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -76,9 +72,9 @@ def from_dict(cls, obj: dict) -> WorkflowStepConfiguration:
return None
if not isinstance(obj, dict):
- return WorkflowStepConfiguration.parse_obj(obj)
+ return WorkflowStepConfiguration.model_validate(obj)
- _obj = WorkflowStepConfiguration.parse_obj({
+ _obj = WorkflowStepConfiguration.model_validate({
"id": obj.get("id"),
"assignments": [ProvidersPerLanguage.from_dict(_item) for _item in obj.get("assignments")] if obj.get("assignments") is not None else None,
"due": obj.get("due"),
diff --git a/phrasetms_client/models/workflow_step_dto.py b/phrasetms_client/models/workflow_step_dto.py
index 83020d88..aecbc470 100644
--- a/phrasetms_client/models/workflow_step_dto.py
+++ b/phrasetms_client/models/workflow_step_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class WorkflowStepDto(BaseModel):
"""
@@ -33,14 +33,10 @@ class WorkflowStepDto(BaseModel):
lqa_enabled: Optional[StrictBool] = Field(None, alias="lqaEnabled")
__properties = ["id", "uid", "name", "abbr", "order", "lqaEnabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -53,7 +49,7 @@ def from_json(cls, json_str: str) -> WorkflowStepDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -66,9 +62,9 @@ def from_dict(cls, obj: dict) -> WorkflowStepDto:
return None
if not isinstance(obj, dict):
- return WorkflowStepDto.parse_obj(obj)
+ return WorkflowStepDto.model_validate(obj)
- _obj = WorkflowStepDto.parse_obj({
+ _obj = WorkflowStepDto.model_validate({
"id": obj.get("id"),
"uid": obj.get("uid"),
"name": obj.get("name"),
diff --git a/phrasetms_client/models/workflow_step_reference.py b/phrasetms_client/models/workflow_step_reference.py
index 1e4070bf..66b9fc0d 100644
--- a/phrasetms_client/models/workflow_step_reference.py
+++ b/phrasetms_client/models/workflow_step_reference.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class WorkflowStepReference(BaseModel):
"""
@@ -32,14 +32,10 @@ class WorkflowStepReference(BaseModel):
lqa_enabled: Optional[StrictBool] = Field(None, alias="lqaEnabled")
__properties = ["name", "id", "uid", "order", "lqaEnabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> WorkflowStepReference:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> WorkflowStepReference:
return None
if not isinstance(obj, dict):
- return WorkflowStepReference.parse_obj(obj)
+ return WorkflowStepReference.model_validate(obj)
- _obj = WorkflowStepReference.parse_obj({
+ _obj = WorkflowStepReference.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"uid": obj.get("uid"),
diff --git a/phrasetms_client/models/workflow_step_reference_v2.py b/phrasetms_client/models/workflow_step_reference_v2.py
index 2fc6b2d3..9136c56e 100644
--- a/phrasetms_client/models/workflow_step_reference_v2.py
+++ b/phrasetms_client/models/workflow_step_reference_v2.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class WorkflowStepReferenceV2(BaseModel):
"""
@@ -32,14 +32,10 @@ class WorkflowStepReferenceV2(BaseModel):
lqa_enabled: Optional[StrictBool] = Field(None, alias="lqaEnabled")
__properties = ["name", "uid", "id", "order", "lqaEnabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> WorkflowStepReferenceV2:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> WorkflowStepReferenceV2:
return None
if not isinstance(obj, dict):
- return WorkflowStepReferenceV2.parse_obj(obj)
+ return WorkflowStepReferenceV2.model_validate(obj)
- _obj = WorkflowStepReferenceV2.parse_obj({
+ _obj = WorkflowStepReferenceV2.model_validate({
"name": obj.get("name"),
"uid": obj.get("uid"),
"id": obj.get("id"),
diff --git a/phrasetms_client/models/workflow_step_reference_v3.py b/phrasetms_client/models/workflow_step_reference_v3.py
index e1dc62e5..8c4a041f 100644
--- a/phrasetms_client/models/workflow_step_reference_v3.py
+++ b/phrasetms_client/models/workflow_step_reference_v3.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictInt, StrictStr
class WorkflowStepReferenceV3(BaseModel):
"""
@@ -32,14 +32,10 @@ class WorkflowStepReferenceV3(BaseModel):
lqa_enabled: Optional[StrictBool] = Field(None, alias="lqaEnabled")
__properties = ["name", "id", "uid", "order", "lqaEnabled"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -52,7 +48,7 @@ def from_json(cls, json_str: str) -> WorkflowStepReferenceV3:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -65,9 +61,9 @@ def from_dict(cls, obj: dict) -> WorkflowStepReferenceV3:
return None
if not isinstance(obj, dict):
- return WorkflowStepReferenceV3.parse_obj(obj)
+ return WorkflowStepReferenceV3.model_validate(obj)
- _obj = WorkflowStepReferenceV3.parse_obj({
+ _obj = WorkflowStepReferenceV3.model_validate({
"name": obj.get("name"),
"id": obj.get("id"),
"uid": obj.get("uid"),
diff --git a/phrasetms_client/models/workflow_step_settings_dto.py b/phrasetms_client/models/workflow_step_settings_dto.py
index 91d6d645..54289858 100644
--- a/phrasetms_client/models/workflow_step_settings_dto.py
+++ b/phrasetms_client/models/workflow_step_settings_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.project_template_notify_provider_dto import ProjectTemplateNotifyProviderDto
from phrasetms_client.models.project_template_workflow_settings_assigned_to_dto import ProjectTemplateWorkflowSettingsAssignedToDto
from phrasetms_client.models.uid_reference import UidReference
@@ -30,19 +30,15 @@ class WorkflowStepSettingsDto(BaseModel):
WorkflowStepSettingsDto
"""
workflow_step: Optional[WorkflowStepReference] = Field(None, alias="workflowStep")
- assigned_to: Optional[conlist(ProjectTemplateWorkflowSettingsAssignedToDto)] = Field(None, alias="assignedTo")
+ assigned_to: Optional[List[ProjectTemplateWorkflowSettingsAssignedToDto]] = Field(None, alias="assignedTo")
notify_provider: Optional[ProjectTemplateNotifyProviderDto] = Field(None, alias="notifyProvider")
lqa_profile: Optional[UidReference] = Field(None, alias="lqaProfile")
__properties = ["workflowStep", "assignedTo", "notifyProvider", "lqaProfile"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> WorkflowStepSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -84,9 +80,9 @@ def from_dict(cls, obj: dict) -> WorkflowStepSettingsDto:
return None
if not isinstance(obj, dict):
- return WorkflowStepSettingsDto.parse_obj(obj)
+ return WorkflowStepSettingsDto.model_validate(obj)
- _obj = WorkflowStepSettingsDto.parse_obj({
+ _obj = WorkflowStepSettingsDto.model_validate({
"workflow_step": WorkflowStepReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"assigned_to": [ProjectTemplateWorkflowSettingsAssignedToDto.from_dict(_item) for _item in obj.get("assignedTo")] if obj.get("assignedTo") is not None else None,
"notify_provider": ProjectTemplateNotifyProviderDto.from_dict(obj.get("notifyProvider")) if obj.get("notifyProvider") is not None else None,
diff --git a/phrasetms_client/models/workflow_step_settings_edit_dto.py b/phrasetms_client/models/workflow_step_settings_edit_dto.py
index 5db2bc12..09d028f3 100644
--- a/phrasetms_client/models/workflow_step_settings_edit_dto.py
+++ b/phrasetms_client/models/workflow_step_settings_edit_dto.py
@@ -19,7 +19,7 @@
from typing import List, Optional
-from pydantic import BaseModel, Field, conlist
+from pydantic import BaseModel, Field, ConfigDict
from phrasetms_client.models.id_reference import IdReference
from phrasetms_client.models.project_template_notify_provider_dto import ProjectTemplateNotifyProviderDto
from phrasetms_client.models.project_template_workflow_settings_assigned_to_dto import ProjectTemplateWorkflowSettingsAssignedToDto
@@ -30,19 +30,15 @@ class WorkflowStepSettingsEditDto(BaseModel):
WorkflowStepSettingsEditDto
"""
workflow_step: Optional[IdReference] = Field(None, alias="workflowStep")
- assigned_to: Optional[conlist(ProjectTemplateWorkflowSettingsAssignedToDto)] = Field(None, alias="assignedTo")
+ assigned_to: Optional[List[ProjectTemplateWorkflowSettingsAssignedToDto]] = Field(None, alias="assignedTo")
notify_provider: Optional[ProjectTemplateNotifyProviderDto] = Field(None, alias="notifyProvider")
lqa_profile: Optional[UidReference] = Field(None, alias="lqaProfile")
__properties = ["workflowStep", "assignedTo", "notifyProvider", "lqaProfile"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -55,7 +51,7 @@ def from_json(cls, json_str: str) -> WorkflowStepSettingsEditDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -84,9 +80,9 @@ def from_dict(cls, obj: dict) -> WorkflowStepSettingsEditDto:
return None
if not isinstance(obj, dict):
- return WorkflowStepSettingsEditDto.parse_obj(obj)
+ return WorkflowStepSettingsEditDto.model_validate(obj)
- _obj = WorkflowStepSettingsEditDto.parse_obj({
+ _obj = WorkflowStepSettingsEditDto.model_validate({
"workflow_step": IdReference.from_dict(obj.get("workflowStep")) if obj.get("workflowStep") is not None else None,
"assigned_to": [ProjectTemplateWorkflowSettingsAssignedToDto.from_dict(_item) for _item in obj.get("assignedTo")] if obj.get("assignedTo") is not None else None,
"notify_provider": ProjectTemplateNotifyProviderDto.from_dict(obj.get("notifyProvider")) if obj.get("notifyProvider") is not None else None,
diff --git a/phrasetms_client/models/xlf2_settings_dto.py b/phrasetms_client/models/xlf2_settings_dto.py
index 28cdcf69..e3f40c52 100644
--- a/phrasetms_client/models/xlf2_settings_dto.py
+++ b/phrasetms_client/models/xlf2_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class Xlf2SettingsDto(BaseModel):
"""
@@ -47,14 +47,10 @@ class Xlf2SettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["icuSubFilter", "importNotes", "saveConfirmedSegments", "segmentation", "lineBreakTags", "preserveWhitespace", "copySourceToTargetIfNotImported", "respectTranslateAttr", "skipImportRules", "importAsConfirmedRules", "importAsLockedRules", "exportAttrsWhenConfirmedAndLocked", "exportAttrsWhenConfirmedAndNotLocked", "exportAttrsWhenNotConfirmedAndLocked", "exportAttrsWhenNotConfirmedAndNotLocked", "contextKeyXPath", "preserveCharEntities", "xslUrl", "xslFile", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -67,7 +63,7 @@ def from_json(cls, json_str: str) -> Xlf2SettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -80,9 +76,9 @@ def from_dict(cls, obj: dict) -> Xlf2SettingsDto:
return None
if not isinstance(obj, dict):
- return Xlf2SettingsDto.parse_obj(obj)
+ return Xlf2SettingsDto.model_validate(obj)
- _obj = Xlf2SettingsDto.parse_obj({
+ _obj = Xlf2SettingsDto.model_validate({
"icu_sub_filter": obj.get("icuSubFilter"),
"import_notes": obj.get("importNotes"),
"save_confirmed_segments": obj.get("saveConfirmedSegments"),
diff --git a/phrasetms_client/models/xlf_settings_dto.py b/phrasetms_client/models/xlf_settings_dto.py
index da11ff6c..d0e36520 100644
--- a/phrasetms_client/models/xlf_settings_dto.py
+++ b/phrasetms_client/models/xlf_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr
class XlfSettingsDto(BaseModel):
"""
@@ -49,14 +49,10 @@ class XlfSettingsDto(BaseModel):
tag_regexp: Optional[StrictStr] = Field(None, alias="tagRegexp")
__properties = ["icuSubFilter", "importNotes", "segmentation", "skipImportRules", "importAsConfirmedRules", "importAsLockedRules", "exportAttrsWhenConfirmedAndLocked", "exportAttrsWhenConfirmedAndNotLocked", "exportAttrsWhenNotConfirmedAndLocked", "exportAttrsWhenNotConfirmedAndNotLocked", "saveConfirmedSegments", "lineBreakTags", "preserveWhitespace", "contextType", "preserveCharEntities", "copySourceToTargetIfNotImported", "importXPath", "importAsConfirmedXPath", "importAsLockedXPath", "xslUrl", "xslFile", "tagRegexp"]
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -69,7 +65,7 @@ def from_json(cls, json_str: str) -> XlfSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -82,9 +78,9 @@ def from_dict(cls, obj: dict) -> XlfSettingsDto:
return None
if not isinstance(obj, dict):
- return XlfSettingsDto.parse_obj(obj)
+ return XlfSettingsDto.model_validate(obj)
- _obj = XlfSettingsDto.parse_obj({
+ _obj = XlfSettingsDto.model_validate({
"icu_sub_filter": obj.get("icuSubFilter"),
"import_notes": obj.get("importNotes"),
"segmentation": obj.get("segmentation"),
diff --git a/phrasetms_client/models/xls_settings_dto.py b/phrasetms_client/models/xls_settings_dto.py
index 3013be10..4fd4aaf5 100644
--- a/phrasetms_client/models/xls_settings_dto.py
+++ b/phrasetms_client/models/xls_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class XlsSettingsDto(BaseModel):
"""
@@ -35,7 +35,8 @@ class XlsSettingsDto(BaseModel):
specified_columns: Optional[StrictStr] = Field(None, alias="specifiedColumns")
__properties = ["sheetNames", "hidden", "comments", "other", "cellFlow", "htmlSubfilter", "tagRegexp", "specifiedColumns"]
- @validator('cell_flow')
+ @field_validator('cell_flow')
+ @classmethod
def cell_flow_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -45,14 +46,10 @@ def cell_flow_validate_enum(cls, value):
raise ValueError("must be one of enum values ('DownRight', 'RightDown', 'DownLeft', 'LeftDown')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -65,7 +62,7 @@ def from_json(cls, json_str: str) -> XlsSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -78,9 +75,9 @@ def from_dict(cls, obj: dict) -> XlsSettingsDto:
return None
if not isinstance(obj, dict):
- return XlsSettingsDto.parse_obj(obj)
+ return XlsSettingsDto.model_validate(obj)
- _obj = XlsSettingsDto.parse_obj({
+ _obj = XlsSettingsDto.model_validate({
"sheet_names": obj.get("sheetNames"),
"hidden": obj.get("hidden"),
"comments": obj.get("comments"),
diff --git a/phrasetms_client/models/xml_settings_dto.py b/phrasetms_client/models/xml_settings_dto.py
index 4faa13b3..bb6ba11b 100644
--- a/phrasetms_client/models/xml_settings_dto.py
+++ b/phrasetms_client/models/xml_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class XmlSettingsDto(BaseModel):
"""
@@ -56,7 +56,8 @@ class XmlSettingsDto(BaseModel):
icu_sub_filter: Optional[StrictBool] = Field(None, alias="icuSubFilter", description="Default: `false`")
__properties = ["rulesFormat", "includeElementsPlain", "excludeElementsPlain", "includeAttributesPlain", "excludeAttributesPlain", "inlineElementsNonTranslatablePlain", "inlineElementsPlain", "inlineElementsAutoPlain", "htmlSubfilterElementsPlain", "entities", "lockElementsPlain", "lockAttributesPlain", "includeXPath", "inlineElementsXpath", "inlineElementsNonTranslatableXPath", "inlineElementsAutoXPath", "htmlSubfilterElementsXpath", "lockXPath", "segmentation", "tagRegexp", "contextNoteXpath", "maxLenXPath", "preserveWhitespaceXPath", "preserveCharEntities", "contextKeyXPath", "xslUrl", "xslFile", "importComments", "icuSubFilter"]
- @validator('rules_format')
+ @field_validator('rules_format')
+ @classmethod
def rules_format_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -66,14 +67,10 @@ def rules_format_validate_enum(cls, value):
raise ValueError("must be one of enum values ('PLAIN', 'XPATH')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -86,7 +83,7 @@ def from_json(cls, json_str: str) -> XmlSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -99,9 +96,9 @@ def from_dict(cls, obj: dict) -> XmlSettingsDto:
return None
if not isinstance(obj, dict):
- return XmlSettingsDto.parse_obj(obj)
+ return XmlSettingsDto.model_validate(obj)
- _obj = XmlSettingsDto.parse_obj({
+ _obj = XmlSettingsDto.model_validate({
"rules_format": obj.get("rulesFormat"),
"include_elements_plain": obj.get("includeElementsPlain"),
"exclude_elements_plain": obj.get("excludeElementsPlain"),
diff --git a/phrasetms_client/models/yaml_settings_dto.py b/phrasetms_client/models/yaml_settings_dto.py
index 7a498ed3..cf051eda 100644
--- a/phrasetms_client/models/yaml_settings_dto.py
+++ b/phrasetms_client/models/yaml_settings_dto.py
@@ -19,7 +19,7 @@
from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr, validator
+from pydantic import BaseModel, Field, ConfigDict, StrictBool, StrictStr, field_validator
class YamlSettingsDto(BaseModel):
"""
@@ -38,7 +38,8 @@ class YamlSettingsDto(BaseModel):
icu_sub_filter: Optional[StrictBool] = Field(None, alias="icuSubFilter", description="Default: `false`")
__properties = ["htmlSubFilter", "tagRegexp", "includeKeyRegexp", "excludeValueRegexp", "contextPath", "contextKeyPath", "markdownSubfilter", "updateRootElementLang", "localeFormat", "indentEmptyLinesInString", "icuSubFilter"]
- @validator('locale_format')
+ @field_validator('locale_format')
+ @classmethod
def locale_format_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
@@ -48,14 +49,10 @@ def locale_format_validate_enum(cls, value):
raise ValueError("must be one of enum values ('MEMSOURCE', 'RFC_5646', 'ANDROID_QUALIFIER', 'ANDROID_QUALIFIER_BCP')")
return value
- class Config:
- """Pydantic configuration"""
- allow_population_by_field_name = True
- validate_assignment = True
-
+ model_config = ConfigDict(populate_by_name=True, validate_assignment=True)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
+ return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
@@ -68,7 +65,7 @@ def from_json(cls, json_str: str) -> YamlSettingsDto:
def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True,
+ _dict = self.model_dump(by_alias=True,
exclude={
},
exclude_none=True)
@@ -81,9 +78,9 @@ def from_dict(cls, obj: dict) -> YamlSettingsDto:
return None
if not isinstance(obj, dict):
- return YamlSettingsDto.parse_obj(obj)
+ return YamlSettingsDto.model_validate(obj)
- _obj = YamlSettingsDto.parse_obj({
+ _obj = YamlSettingsDto.model_validate({
"html_sub_filter": obj.get("htmlSubFilter"),
"tag_regexp": obj.get("tagRegexp"),
"include_key_regexp": obj.get("includeKeyRegexp"),
diff --git a/requirements.txt b/requirements.txt
index 74ede174..d731b74a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.25.3
-pydantic >= 1.10.5, < 2
+pydantic >= 2.0.0
aenum >= 3.1.11
diff --git a/setup.py b/setup.py
index d8a328e7..7f6e7a90 100644
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@
NAME = "phrasetms-client"
VERSION = "0.3.14"
PYTHON_REQUIRES = ">=3.7"
-REQUIRES = ["urllib3 >= 1.25.3", "python-dateutil", "pydantic >= 1.10.5, < 2", "aenum"]
+REQUIRES = ["urllib3 >= 1.25.3", "python-dateutil", "pydantic >= 2.0.0", "aenum"]
setup(
name=NAME,