11from enum import Enum
22from typing import Annotated
33from typing import Any
4- from typing import Optional
54
65from pydantic import Field
76from pydantic import PlainSerializer
@@ -19,30 +18,30 @@ class Method(str, Enum):
1918 patch = "PATCH"
2019 delete = "DELETE"
2120
22- method : Optional [ Method ] = None
21+ method : Method | None = None
2322 """The HTTP method of the current operation."""
2423
25- bulk_id : Optional [ str ] = None
24+ bulk_id : str | None = None
2625 """The transient identifier of a newly created resource, unique within a
2726 bulk request and created by the client."""
2827
29- version : Optional [ str ] = None
28+ version : str | None = None
3029 """The current resource version."""
3130
32- path : Optional [ str ] = None
31+ path : str | None = None
3332 """The resource's relative path to the SCIM service provider's root."""
3433
35- data : Optional [ Any ] = None
34+ data : Any | None = None
3635 """The resource data as it would appear for a single SCIM POST, PUT, or
3736 PATCH operation."""
3837
39- location : Optional [ str ] = None
38+ location : str | None = None
4039 """The resource endpoint URL."""
4140
42- response : Optional [ Any ] = None
41+ response : Any | None = None
4342 """The HTTP response body for the specified request operation."""
4443
45- status : Annotated [Optional [ int ] , PlainSerializer (_int_to_str )] = None
44+ status : Annotated [int | None , PlainSerializer (_int_to_str )] = None
4645 """The HTTP response status code for the requested operation."""
4746
4847
@@ -58,12 +57,12 @@ class BulkRequest(Message):
5857 "urn:ietf:params:scim:api:messages:2.0:BulkRequest"
5958 ]
6059
61- fail_on_errors : Optional [ int ] = None
60+ fail_on_errors : int | None = None
6261 """An integer specifying the number of errors that the service provider
6362 will accept before the operation is terminated and an error response is
6463 returned."""
6564
66- operations : Optional [ list [BulkOperation ]] = Field (
65+ operations : list [BulkOperation ] | None = Field (
6766 None , serialization_alias = "Operations"
6867 )
6968 """Defines operations within a bulk job."""
@@ -81,7 +80,7 @@ class BulkResponse(Message):
8180 "urn:ietf:params:scim:api:messages:2.0:BulkResponse"
8281 ]
8382
84- operations : Optional [ list [BulkOperation ]] = Field (
83+ operations : list [BulkOperation ] | None = Field (
8584 None , serialization_alias = "Operations"
8685 )
8786 """Defines operations within a bulk job."""
0 commit comments