Skip to content

Commit a2b59df

Browse files
box-sdk-buildbox-sdk-build
andauthored
feat(boxsdkgen): add failure related fields to DocGenJob (box/box-openapi#598) (#1446)
Co-authored-by: box-sdk-build <box-sdk-build@box.com>
1 parent c660533 commit a2b59df

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "78a8dc0", "specHash": "576cd17", "version": "4.9.0" }
1+
{ "engineHash": "4de40e1", "specHash": "e0ffc4a", "version": "4.9.0" }

box_sdk_gen/schemas/v2025_r0/doc_gen_job_full_v2025_r0.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
DocGenJobV2025R0StatusField,
2121
)
2222

23+
from box_sdk_gen.schemas.v2025_r0.doc_gen_job_v2025_r0 import (
24+
DocGenJobV2025R0FailuresField,
25+
)
26+
2327
from box_sdk_gen.schemas.v2025_r0.doc_gen_job_v2025_r0 import DocGenJobV2025R0
2428

2529
from box_sdk_gen.schemas.v2025_r0.user_base_v2025_r0 import UserBaseV2025R0
@@ -49,6 +53,7 @@ def __init__(
4953
created_at: Optional[str] = None,
5054
output_file: Optional[FileReferenceV2025R0] = None,
5155
output_file_version: Optional[FileVersionBaseV2025R0] = None,
56+
failures: Optional[DocGenJobV2025R0FailuresField] = None,
5257
type: DocGenJobBaseV2025R0TypeField = DocGenJobBaseV2025R0TypeField.DOCGEN_JOB,
5358
**kwargs
5459
):
@@ -63,6 +68,8 @@ def __init__(
6368
:type id: str
6469
:param created_at: Time of job creation., defaults to None
6570
:type created_at: Optional[str], optional
71+
:param failures: Errors and warnings that occurred during document generation., defaults to None
72+
:type failures: Optional[DocGenJobV2025R0FailuresField], optional
6673
:param type: The value will always be `docgen_job`., defaults to DocGenJobBaseV2025R0TypeField.DOCGEN_JOB
6774
:type type: DocGenJobBaseV2025R0TypeField, optional
6875
"""
@@ -75,6 +82,7 @@ def __init__(
7582
id=id,
7683
output_file=output_file,
7784
output_file_version=output_file_version,
85+
failures=failures,
7886
type=type,
7987
**kwargs
8088
)

box_sdk_gen/schemas/v2025_r0/doc_gen_job_v2025_r0.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from enum import Enum
22

3+
from typing import List
4+
5+
from box_sdk_gen.internal.base_object import BaseObject
6+
37
from typing import Optional
48

59
from box_sdk_gen.schemas.v2025_r0.doc_gen_job_base_v2025_r0 import (
@@ -29,6 +33,19 @@ class DocGenJobV2025R0StatusField(str, Enum):
2933
PENDING = 'pending'
3034

3135

36+
class DocGenJobV2025R0FailuresField(BaseObject):
37+
def __init__(self, errors: List[str], warnings: List[str], **kwargs):
38+
"""
39+
:param errors: A list of errors that occurred during document generation.
40+
:type errors: List[str]
41+
:param warnings: A list of warnings that occurred during document generation.
42+
:type warnings: List[str]
43+
"""
44+
super().__init__(**kwargs)
45+
self.errors = errors
46+
self.warnings = warnings
47+
48+
3249
class DocGenJobV2025R0(DocGenJobBaseV2025R0):
3350
_discriminator = 'type', {'docgen_job'}
3451

@@ -43,6 +60,7 @@ def __init__(
4360
*,
4461
output_file: Optional[FileReferenceV2025R0] = None,
4562
output_file_version: Optional[FileVersionBaseV2025R0] = None,
63+
failures: Optional[DocGenJobV2025R0FailuresField] = None,
4664
type: DocGenJobBaseV2025R0TypeField = DocGenJobBaseV2025R0TypeField.DOCGEN_JOB,
4765
**kwargs
4866
):
@@ -53,6 +71,8 @@ def __init__(
5371
:type output_type: str
5472
:param id: The unique identifier that represent a Box Doc Gen job.
5573
:type id: str
74+
:param failures: Errors and warnings that occurred during document generation., defaults to None
75+
:type failures: Optional[DocGenJobV2025R0FailuresField], optional
5676
:param type: The value will always be `docgen_job`., defaults to DocGenJobBaseV2025R0TypeField.DOCGEN_JOB
5777
:type type: DocGenJobBaseV2025R0TypeField, optional
5878
"""
@@ -64,3 +84,4 @@ def __init__(
6484
self.output_type = output_type
6585
self.output_file = output_file
6686
self.output_file_version = output_file_version
87+
self.failures = failures

0 commit comments

Comments
 (0)