File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ Changelog
66Added
77^^^^^
88- Implement :meth: `Schema.get_attribute <scim2_models.Schema.get_attribute> `.
9+ - Implement :meth: `ListResponse.start_index_0 <scim2_models.ListResponse.start_index_0> `
10+ and :meth: `ListResponse.start_index_1 <scim2_models.ListResponse.start_index_1> `
11+ and :meth: `SearchRequest.start_index_0 <scim2_models.SearchRequest.start_index_0> `
12+ and :meth: `SearchRequest.start_index_1 <scim2_models.SearchRequest.start_index_1> `.
913
1014[0.2.10] - 2024-12-02
1115---------------------
Original file line number Diff line number Diff line change @@ -121,3 +121,17 @@ def check_results_number(
121121 )
122122
123123 return obj
124+
125+ @property
126+ def start_index_0 (self ):
127+ """The 0 indexed start index."""
128+ return self .start_index - 1 if self .start_index is not None else None
129+
130+ @property
131+ def stop_index_0 (self ):
132+ """The 0 indexed stop index."""
133+ return (
134+ self .start_index_0 + self .count
135+ if self .start_index_0 is not None and self .count is not None
136+ else None
137+ )
Original file line number Diff line number Diff line change @@ -76,3 +76,17 @@ def attributes_validator(self):
7676 )
7777
7878 return self
79+
80+ @property
81+ def start_index_0 (self ):
82+ """The 0 indexed start index."""
83+ return self .start_index - 1 if self .start_index is not None else None
84+
85+ @property
86+ def stop_index_0 (self ):
87+ """The 0 indexed stop index."""
88+ return (
89+ self .start_index_0 + self .count
90+ if self .start_index_0 is not None and self .count is not None
91+ else None
92+ )
You can’t perform that action at this time.
0 commit comments