Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ regula/documentreader/webclient/gen/models/barcode_type.py
regula/documentreader/webclient/gen/models/bc_pdf417_info.py
regula/documentreader/webclient/gen/models/bc_roidetect.py
regula/documentreader/webclient/gen/models/binary_data.py
regula/documentreader/webclient/gen/models/bsiv2_item.py
regula/documentreader/webclient/gen/models/bsiv2_result.py
regula/documentreader/webclient/gen/models/byte_array_item.py
regula/documentreader/webclient/gen/models/byte_array_result.py
regula/documentreader/webclient/gen/models/candidates_list_item.py
Expand Down
6 changes: 6 additions & 0 deletions regula/documentreader/webclient/gen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
"AuthenticityCheckResultListInner",
"AuthenticityResult",
"AuthenticityResultType",
"BSIV2Item",
"BSIV2Result",
"BarCodeModuleType",
"BarcodePositionItem",
"BarcodePositionResult",
Expand Down Expand Up @@ -301,6 +303,8 @@
from regula.documentreader.webclient.gen.models.authenticity_check_result_list_inner import AuthenticityCheckResultListInner as AuthenticityCheckResultListInner
from regula.documentreader.webclient.gen.models.authenticity_result import AuthenticityResult as AuthenticityResult
from regula.documentreader.webclient.gen.models.authenticity_result_type import AuthenticityResultType as AuthenticityResultType
from regula.documentreader.webclient.gen.models.bsiv2_item import BSIV2Item as BSIV2Item
from regula.documentreader.webclient.gen.models.bsiv2_result import BSIV2Result as BSIV2Result
from regula.documentreader.webclient.gen.models.bar_code_module_type import BarCodeModuleType as BarCodeModuleType
from regula.documentreader.webclient.gen.models.barcode_position_item import BarcodePositionItem as BarcodePositionItem
from regula.documentreader.webclient.gen.models.barcode_position_result import BarcodePositionResult as BarcodePositionResult
Expand Down Expand Up @@ -575,6 +579,8 @@
from regula.documentreader.webclient.gen.models.authenticity_check_result_list_inner import AuthenticityCheckResultListInner as AuthenticityCheckResultListInner
from regula.documentreader.webclient.gen.models.authenticity_result import AuthenticityResult as AuthenticityResult
from regula.documentreader.webclient.gen.models.authenticity_result_type import AuthenticityResultType as AuthenticityResultType
from regula.documentreader.webclient.gen.models.bsiv2_item import BSIV2Item as BSIV2Item
from regula.documentreader.webclient.gen.models.bsiv2_result import BSIV2Result as BSIV2Result
from regula.documentreader.webclient.gen.models.bar_code_module_type import BarCodeModuleType as BarCodeModuleType
from regula.documentreader.webclient.gen.models.barcode_position_item import BarcodePositionItem as BarcodePositionItem
from regula.documentreader.webclient.gen.models.barcode_position_result import BarcodePositionResult as BarcodePositionResult
Expand Down
4 changes: 4 additions & 0 deletions regula/documentreader/webclient/gen/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
from regula.documentreader.webclient.gen.models.authenticity_check_result_list_inner import AuthenticityCheckResultListInner
from regula.documentreader.webclient.gen.models.authenticity_result import AuthenticityResult
from regula.documentreader.webclient.gen.models.authenticity_result_type import AuthenticityResultType
from regula.documentreader.webclient.gen.models.bsiv2_item import BSIV2Item
from regula.documentreader.webclient.gen.models.bsiv2_result import BSIV2Result
from regula.documentreader.webclient.gen.models.bar_code_module_type import BarCodeModuleType
from regula.documentreader.webclient.gen.models.barcode_position_item import BarcodePositionItem
from regula.documentreader.webclient.gen.models.barcode_position_result import BarcodePositionResult
Expand Down Expand Up @@ -272,6 +274,8 @@
from regula.documentreader.webclient.gen.models.authenticity_check_result_list_inner import AuthenticityCheckResultListInner
from regula.documentreader.webclient.gen.models.authenticity_result import AuthenticityResult
from regula.documentreader.webclient.gen.models.authenticity_result_type import AuthenticityResultType
from regula.documentreader.webclient.gen.models.bsiv2_item import BSIV2Item
from regula.documentreader.webclient.gen.models.bsiv2_result import BSIV2Result
from regula.documentreader.webclient.gen.models.bar_code_module_type import BarCodeModuleType
from regula.documentreader.webclient.gen.models.barcode_position_item import BarcodePositionItem
from regula.documentreader.webclient.gen.models.barcode_position_result import BarcodePositionResult
Expand Down
82 changes: 82 additions & 0 deletions regula/documentreader/webclient/gen/models/bsiv2_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# coding: utf-8

"""
Generated by: https://openapi-generator.tech
"""

from __future__ import annotations
import pprint
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
from pydantic import SkipValidation, Field

class BSIV2Item(BaseModel):
"""
BSIV2Item
""" # noqa: E501
xml_buffer: SkipValidation[str] = Field(alias="XML_buffer")
__properties: ClassVar[List[str]] = ["XML_buffer"]

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
arbitrary_types_allowed=True,
use_enum_values=True
)


def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BSIV2Item from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BSIV2Item from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({
"XML_buffer": obj.get("XML_buffer")
})
return _obj


89 changes: 89 additions & 0 deletions regula/documentreader/webclient/gen/models/bsiv2_result.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# coding: utf-8

"""
Generated by: https://openapi-generator.tech
"""

from __future__ import annotations
import pprint
import re # noqa: F401
import json

from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from regula.documentreader.webclient.gen.models.result import Result
from regula.documentreader.webclient.gen.models.result_item import ResultItem
from typing import Optional, Set
from typing_extensions import Self
from pydantic import SkipValidation, Field

class BSIV2Result(ResultItem):
"""
BSIV2Result
""" # noqa: E501
xml_buffer: SkipValidation[str] = Field(alias="XML_buffer")
__properties: ClassVar[List[str]] = ["buf_length", "light", "list_idx", "page_idx", "result_type", "XML_buffer"]

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
arbitrary_types_allowed=True,
use_enum_values=True
)


def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BSIV2Result from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BSIV2Result from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({
"buf_length": obj.get("buf_length"),
"light": obj.get("light"),
"list_idx": obj.get("list_idx"),
"page_idx": obj.get("page_idx"),
"result_type": obj.get("result_type"),
"XML_buffer": obj.get("XML_buffer")
})
return _obj


Loading