|
10 | 10 | Do not edit the class manually. |
11 | 11 | """ # noqa: E501 |
12 | 12 |
|
13 | | -from typing import Any, Dict, List, Optional, Tuple, Union |
| 13 | +from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Tuple, Union |
14 | 14 |
|
15 | 15 | from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr |
16 | 16 | from typing_extensions import Annotated |
17 | 17 |
|
18 | 18 | from defectdojo_api_generated.api_client import ApiClient, RequestSerialized |
19 | 19 | from defectdojo_api_generated.api_response import ApiResponse |
| 20 | +from defectdojo_api_generated.helpers import IteratorResult, get_all_pages |
20 | 21 | from defectdojo_api_generated.models.credential_mapping import CredentialMapping |
21 | 22 | from defectdojo_api_generated.models.credential_mapping_request import CredentialMappingRequest |
22 | 23 | from defectdojo_api_generated.models.paginated_credential_mapping_list import PaginatedCredentialMappingList |
23 | 24 | from defectdojo_api_generated.models.paginated_delete_preview_list import PaginatedDeletePreviewList |
24 | 25 | from defectdojo_api_generated.models.patched_credential_mapping_request import PatchedCredentialMappingRequest |
25 | 26 | from defectdojo_api_generated.rest import RESTResponseType |
26 | 27 |
|
| 28 | +if TYPE_CHECKING: |
| 29 | + """placeholder for IteratorResult types if any""" |
| 30 | + from defectdojo_api_generated.models import CredentialMapping, DeletePreview |
| 31 | + |
27 | 32 |
|
28 | 33 | class CredentialMappingsApi: |
29 | 34 | """NOTE: This class is auto generated by OpenAPI Generator |
@@ -523,6 +528,30 @@ def _credential_mappings_delete_preview_list_serialize( |
523 | 528 | _request_auth=_request_auth, |
524 | 529 | ) |
525 | 530 |
|
| 531 | + def credential_mappings_delete_preview_list_iterator( |
| 532 | + self, |
| 533 | + id: Annotated[StrictInt, Field(description='A unique integer value identifying this cred_ mapping.')], |
| 534 | + limit: Annotated[Optional[StrictInt], Field(description='Number of results to return per page.')] = None, |
| 535 | + offset: Annotated[ |
| 536 | + Optional[StrictInt], Field(description='The initial index from which to return the results.') |
| 537 | + ] = None, |
| 538 | + _request_timeout: Union[ |
| 539 | + None, |
| 540 | + Annotated[StrictFloat, Field(gt=0)], |
| 541 | + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
| 542 | + ] = None, |
| 543 | + _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 544 | + _content_type: Optional[StrictStr] = None, |
| 545 | + _headers: Optional[Dict[StrictStr, Any]] = None, |
| 546 | + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 547 | + ) -> 'Generator[IteratorResult[DeletePreview, PaginatedDeletePreviewList], None, None]': |
| 548 | + _params = locals() |
| 549 | + for page in get_all_pages( |
| 550 | + self.api_client, CredentialMappingsApi.credential_mappings_delete_preview_list, **_params |
| 551 | + ): |
| 552 | + for result in page.results: |
| 553 | + yield IteratorResult(result=result, page=page) |
| 554 | + |
526 | 555 | def credential_mappings_destroy( |
527 | 556 | self, |
528 | 557 | id: Annotated[StrictInt, Field(description='A unique integer value identifying this cred_ mapping.')], |
@@ -1080,6 +1109,34 @@ def _credential_mappings_list_serialize( |
1080 | 1109 | _request_auth=_request_auth, |
1081 | 1110 | ) |
1082 | 1111 |
|
| 1112 | + def credential_mappings_list_iterator( |
| 1113 | + self, |
| 1114 | + cred_id: Optional[StrictInt] = None, |
| 1115 | + engagement: Optional[StrictInt] = None, |
| 1116 | + finding: Optional[StrictInt] = None, |
| 1117 | + is_authn_provider: Optional[StrictBool] = None, |
| 1118 | + limit: Annotated[Optional[StrictInt], Field(description='Number of results to return per page.')] = None, |
| 1119 | + offset: Annotated[ |
| 1120 | + Optional[StrictInt], Field(description='The initial index from which to return the results.') |
| 1121 | + ] = None, |
| 1122 | + product: Optional[StrictInt] = None, |
| 1123 | + test: Optional[StrictInt] = None, |
| 1124 | + url: Optional[StrictStr] = None, |
| 1125 | + _request_timeout: Union[ |
| 1126 | + None, |
| 1127 | + Annotated[StrictFloat, Field(gt=0)], |
| 1128 | + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
| 1129 | + ] = None, |
| 1130 | + _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1131 | + _content_type: Optional[StrictStr] = None, |
| 1132 | + _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1133 | + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1134 | + ) -> 'Generator[IteratorResult[CredentialMapping, PaginatedCredentialMappingList], None, None]': |
| 1135 | + _params = locals() |
| 1136 | + for page in get_all_pages(self.api_client, CredentialMappingsApi.credential_mappings_list, **_params): |
| 1137 | + for result in page.results: |
| 1138 | + yield IteratorResult(result=result, page=page) |
| 1139 | + |
1083 | 1140 | def credential_mappings_partial_update( |
1084 | 1141 | self, |
1085 | 1142 | id: Annotated[StrictInt, Field(description='A unique integer value identifying this cred_ mapping.')], |
|
0 commit comments