Skip to content

Commit 1b88faa

Browse files
microsoft-graph-devx-bot[bot]dependabot[bot]Microsoft Graph DevX ToolingMIchaelMainer
authored
feat(generation): update request builders and models (#1377)
* chore(deps-dev): bump typing-extensions from 4.14.1 to 4.15.0 Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.14.1 to 4.15.0. - [Release notes](https://github.com/python/typing_extensions/releases) - [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md) - [Commits](python/typing_extensions@4.14.1...4.15.0) --- updated-dependencies: - dependency-name: typing-extensions dependency-version: 4.15.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump cffi from 1.17.1 to 2.0.0 Bumps [cffi](https://github.com/python-cffi/cffi) from 1.17.1 to 2.0.0. - [Release notes](https://github.com/python-cffi/cffi/releases) - [Commits](python-cffi/cffi@v1.17.1...v2.0.0) --- updated-dependencies: - dependency-name: cffi dependency-version: 2.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump msgraph-core from 1.3.5 to 1.3.8 Bumps [msgraph-core](https://github.com/microsoftgraph/msgraph-sdk-python-core) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/microsoftgraph/msgraph-sdk-python-core/releases) - [Changelog](https://github.com/microsoftgraph/msgraph-sdk-python-core/blob/main/CHANGELOG.md) - [Commits](microsoftgraph/msgraph-sdk-python-core@v1.3.5...v1.3.8) --- updated-dependencies: - dependency-name: msgraph-core dependency-version: 1.3.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump platformdirs from 4.3.8 to 4.4.0 Bumps [platformdirs](https://github.com/tox-dev/platformdirs) from 4.3.8 to 4.4.0. - [Release notes](https://github.com/tox-dev/platformdirs/releases) - [Changelog](https://github.com/tox-dev/platformdirs/blob/main/CHANGES.rst) - [Commits](tox-dev/platformdirs@4.3.8...4.4.0) --- updated-dependencies: - dependency-name: platformdirs dependency-version: 4.4.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump mypy from 1.17.1 to 1.18.2 Bumps [mypy](https://github.com/python/mypy) from 1.17.1 to 1.18.2. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](python/mypy@v1.17.1...v1.18.2) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.18.2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump pycparser from 2.22 to 2.23 Bumps [pycparser](https://github.com/eliben/pycparser) from 2.22 to 2.23. - [Release notes](https://github.com/eliben/pycparser/releases) - [Changelog](https://github.com/eliben/pycparser/blob/main/CHANGES) - [Commits](eliben/pycparser@release_v2.22...release_v2.23) --- updated-dependencies: - dependency-name: pycparser dependency-version: '2.23' dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): bump github/codeql-action from 3 to 4 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v3...v4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): bump actions/upload-artifact from 4 to 5 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump the open-telemetry group with 3 updates Bumps the open-telemetry group with 3 updates: [opentelemetry-api](https://github.com/open-telemetry/opentelemetry-python), [opentelemetry-sdk](https://github.com/open-telemetry/opentelemetry-python) and [opentelemetry-semantic-conventions](https://github.com/open-telemetry/opentelemetry-python). Updates `opentelemetry-api` from 1.36.0 to 1.37.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-python@v1.36.0...v1.37.0) Updates `opentelemetry-sdk` from 1.36.0 to 1.37.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-python@v1.36.0...v1.37.0) Updates `opentelemetry-semantic-conventions` from 0.57b0 to 0.58b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python/commits) --- updated-dependencies: - dependency-name: opentelemetry-api dependency-version: 1.37.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: open-telemetry - dependency-name: opentelemetry-sdk dependency-version: 1.37.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: open-telemetry - dependency-name: opentelemetry-semantic-conventions dependency-version: 0.58b0 dependency-type: direct:development dependency-group: open-telemetry ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump the kiota group with 7 updates Bumps the kiota group with 7 updates: | Package | From | To | | --- | --- | --- | | [microsoft-kiota-serialization-json](https://github.com/microsoft/kiota-python) | `1.9.6` | `1.9.7` | | [microsoft-kiota-serialization-text](https://github.com/microsoft/kiota-python) | `1.9.6` | `1.9.7` | | [microsoft-kiota-serialization-form](https://github.com/microsoft/kiota-python) | `1.9.6` | `1.9.7` | | [microsoft-kiota-serialization-multipart](https://github.com/microsoft/kiota-python) | `1.9.6` | `1.9.7` | | [microsoft-kiota-abstractions](https://github.com/microsoft/kiota-python) | `1.9.6` | `1.9.7` | | [microsoft-kiota-authentication-azure](https://github.com/microsoft/kiota-python) | `1.9.6` | `1.9.7` | | [microsoft-kiota-http](https://github.com/microsoft/kiota-python) | `1.9.6` | `1.9.7` | Updates `microsoft-kiota-serialization-json` from 1.9.6 to 1.9.7 - [Release notes](https://github.com/microsoft/kiota-python/releases) - [Changelog](https://github.com/microsoft/kiota-python/blob/main/release-please-config.json) - [Commits](microsoft/kiota-python@microsoft-kiota-serialization-json-v1.9.6...microsoft-kiota-serialization-json-v1.9.7) Updates `microsoft-kiota-serialization-text` from 1.9.6 to 1.9.7 - [Release notes](https://github.com/microsoft/kiota-python/releases) - [Changelog](https://github.com/microsoft/kiota-python/blob/main/release-please-config.json) - [Commits](microsoft/kiota-python@microsoft-kiota-serialization-text-v1.9.6...microsoft-kiota-serialization-text-v1.9.7) Updates `microsoft-kiota-serialization-form` from 1.9.6 to 1.9.7 - [Release notes](https://github.com/microsoft/kiota-python/releases) - [Changelog](https://github.com/microsoft/kiota-python/blob/main/release-please-config.json) - [Commits](microsoft/kiota-python@microsoft-kiota-serialization-form-v1.9.6...microsoft-kiota-serialization-form-v1.9.7) Updates `microsoft-kiota-serialization-multipart` from 1.9.6 to 1.9.7 - [Release notes](https://github.com/microsoft/kiota-python/releases) - [Changelog](https://github.com/microsoft/kiota-python/blob/main/release-please-config.json) - [Commits](microsoft/kiota-python@microsoft-kiota-serialization-multipart-v1.9.6...microsoft-kiota-serialization-multipart-v1.9.7) Updates `microsoft-kiota-abstractions` from 1.9.6 to 1.9.7 - [Release notes](https://github.com/microsoft/kiota-python/releases) - [Changelog](https://github.com/microsoft/kiota-python/blob/main/release-please-config.json) - [Commits](microsoft/kiota-python@microsoft-kiota-abstractions-v1.9.6...microsoft-kiota-abstractions-v1.9.7) Updates `microsoft-kiota-authentication-azure` from 1.9.6 to 1.9.7 - [Release notes](https://github.com/microsoft/kiota-python/releases) - [Changelog](https://github.com/microsoft/kiota-python/blob/main/release-please-config.json) - [Commits](microsoft/kiota-python@microsoft-kiota-authentication-azure-v1.9.6...microsoft-kiota-authentication-azure-v1.9.7) Updates `microsoft-kiota-http` from 1.9.6 to 1.9.7 - [Release notes](https://github.com/microsoft/kiota-python/releases) - [Changelog](https://github.com/microsoft/kiota-python/blob/main/release-please-config.json) - [Commits](microsoft/kiota-python@microsoft-kiota-http-v1.9.6...microsoft-kiota-http-v1.9.7) --- updated-dependencies: - dependency-name: microsoft-kiota-serialization-json dependency-version: 1.9.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-serialization-text dependency-version: 1.9.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-serialization-form dependency-version: 1.9.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-serialization-multipart dependency-version: 1.9.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-abstractions dependency-version: 1.9.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-authentication-azure dependency-version: 1.9.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-http dependency-version: 1.9.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump the azure-identity group with 2 updates Bumps the azure-identity group with 2 updates: [azure-identity](https://github.com/Azure/azure-sdk-for-python) and [azure-core](https://github.com/Azure/azure-sdk-for-python). Updates `azure-identity` from 1.24.0 to 1.25.0 - [Release notes](https://github.com/Azure/azure-sdk-for-python/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md) - [Commits](Azure/azure-sdk-for-python@azure-identity_1.24.0...azure-identity_1.25.0) Updates `azure-core` from 1.35.0 to 1.35.1 - [Release notes](https://github.com/Azure/azure-sdk-for-python/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md) - [Commits](Azure/azure-sdk-for-python@azure-core_1.35.0...azure-core_1.35.1) --- updated-dependencies: - dependency-name: azure-identity dependency-version: 1.25.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: azure-identity - dependency-name: azure-core dependency-version: 1.35.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: azure-identity ... Signed-off-by: dependabot[bot] <support@github.com> * feat(generation): update request builders and models Update generated files with build 202235 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Michael Mainer (from Dev Box) <8527305+MIchaelMainer@users.noreply.github.com>
1 parent 7bb6b44 commit 1b88faa

File tree

84 files changed

+5984
-152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+5984
-152
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@v3
53+
uses: github/codeql-action/init@v4
5454
with:
5555
languages: ${{ matrix.language }}
5656
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -64,7 +64,7 @@ jobs:
6464
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6565
# If this step fails, then you should remove it and run the build manually (see below)
6666
- name: Autobuild
67-
uses: github/codeql-action/autobuild@v3
67+
uses: github/codeql-action/autobuild@v4
6868

6969
# ℹ️ Command-line programs to run using the OS shell.
7070
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -77,6 +77,6 @@ jobs:
7777
# ./location_of_script_within_repo/buildscript.sh
7878

7979
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v3
80+
uses: github/codeql-action/analyze@v4
8181
with:
8282
category: "/language:${{matrix.language}}"

.github/workflows/validate-public-api-surface.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ jobs:
3434
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3535
- name: Upload patch file as artifact
3636
if: always()
37-
uses: actions/upload-artifact@v4
37+
uses: actions/upload-artifact@v5
3838
continue-on-error: true
3939
with:
4040
name: patch
4141
path: '*.patch'
4242
- name: Upload explanations file as artifact
4343
if: always()
44-
uses: actions/upload-artifact@v4
44+
uses: actions/upload-artifact@v5
4545
continue-on-error: true
4646
with:
4747
name: explanations

msgraph/generated/base_graph_service_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def permission_grants(self) -> PermissionGrantsRequestBuilder:
610610
@property
611611
def places(self) -> PlacesRequestBuilder:
612612
"""
613-
The places property
613+
Provides operations to manage the collection of place entities.
614614
"""
615615
from .places.places_request_builder import PlacesRequestBuilder
616616

msgraph/generated/education/classes/item/assignment_settings/assignment_settings_request_builder.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
if TYPE_CHECKING:
1717
from .....models.education_assignment_settings import EducationAssignmentSettings
1818
from .....models.o_data_errors.o_data_error import ODataError
19+
from .default_grading_scheme.default_grading_scheme_request_builder import DefaultGradingSchemeRequestBuilder
1920
from .grading_categories.grading_categories_request_builder import GradingCategoriesRequestBuilder
21+
from .grading_schemes.grading_schemes_request_builder import GradingSchemesRequestBuilder
2022

2123
class AssignmentSettingsRequestBuilder(BaseRequestBuilder):
2224
"""
@@ -140,6 +142,15 @@ def with_url(self,raw_url: str) -> AssignmentSettingsRequestBuilder:
140142
raise TypeError("raw_url cannot be null.")
141143
return AssignmentSettingsRequestBuilder(self.request_adapter, raw_url)
142144

145+
@property
146+
def default_grading_scheme(self) -> DefaultGradingSchemeRequestBuilder:
147+
"""
148+
Provides operations to manage the defaultGradingScheme property of the microsoft.graph.educationAssignmentSettings entity.
149+
"""
150+
from .default_grading_scheme.default_grading_scheme_request_builder import DefaultGradingSchemeRequestBuilder
151+
152+
return DefaultGradingSchemeRequestBuilder(self.request_adapter, self.path_parameters)
153+
143154
@property
144155
def grading_categories(self) -> GradingCategoriesRequestBuilder:
145156
"""
@@ -149,6 +160,15 @@ def grading_categories(self) -> GradingCategoriesRequestBuilder:
149160

150161
return GradingCategoriesRequestBuilder(self.request_adapter, self.path_parameters)
151162

163+
@property
164+
def grading_schemes(self) -> GradingSchemesRequestBuilder:
165+
"""
166+
Provides operations to manage the gradingSchemes property of the microsoft.graph.educationAssignmentSettings entity.
167+
"""
168+
from .grading_schemes.grading_schemes_request_builder import GradingSchemesRequestBuilder
169+
170+
return GradingSchemesRequestBuilder(self.request_adapter, self.path_parameters)
171+
152172
@dataclass
153173
class AssignmentSettingsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
154174
"""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
from __future__ import annotations
2+
from collections.abc import Callable
3+
from dataclasses import dataclass, field
4+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
5+
from kiota_abstractions.base_request_configuration import RequestConfiguration
6+
from kiota_abstractions.default_query_parameters import QueryParameters
7+
from kiota_abstractions.get_path_parameters import get_path_parameters
8+
from kiota_abstractions.method import Method
9+
from kiota_abstractions.request_adapter import RequestAdapter
10+
from kiota_abstractions.request_information import RequestInformation
11+
from kiota_abstractions.request_option import RequestOption
12+
from kiota_abstractions.serialization import Parsable, ParsableFactory
13+
from typing import Any, Optional, TYPE_CHECKING, Union
14+
from warnings import warn
15+
16+
if TYPE_CHECKING:
17+
from ......models.education_grading_scheme import EducationGradingScheme
18+
from ......models.o_data_errors.o_data_error import ODataError
19+
20+
class DefaultGradingSchemeRequestBuilder(BaseRequestBuilder):
21+
"""
22+
Provides operations to manage the defaultGradingScheme property of the microsoft.graph.educationAssignmentSettings entity.
23+
"""
24+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25+
"""
26+
Instantiates a new DefaultGradingSchemeRequestBuilder and sets the default values.
27+
param path_parameters: The raw url or the url-template parameters for the request.
28+
param request_adapter: The request adapter to use to execute the requests.
29+
Returns: None
30+
"""
31+
super().__init__(request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}/assignmentSettings/defaultGradingScheme{?%24expand,%24select}", path_parameters)
32+
33+
async def get(self,request_configuration: Optional[RequestConfiguration[DefaultGradingSchemeRequestBuilderGetQueryParameters]] = None) -> Optional[EducationGradingScheme]:
34+
"""
35+
The default grading scheme for assignments created in this class.
36+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37+
Returns: Optional[EducationGradingScheme]
38+
"""
39+
request_info = self.to_get_request_information(
40+
request_configuration
41+
)
42+
from ......models.o_data_errors.o_data_error import ODataError
43+
44+
error_mapping: dict[str, type[ParsableFactory]] = {
45+
"XXX": ODataError,
46+
}
47+
if not self.request_adapter:
48+
raise Exception("Http core is null")
49+
from ......models.education_grading_scheme import EducationGradingScheme
50+
51+
return await self.request_adapter.send_async(request_info, EducationGradingScheme, error_mapping)
52+
53+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DefaultGradingSchemeRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
54+
"""
55+
The default grading scheme for assignments created in this class.
56+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
57+
Returns: RequestInformation
58+
"""
59+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
60+
request_info.configure(request_configuration)
61+
request_info.headers.try_add("Accept", "application/json")
62+
return request_info
63+
64+
def with_url(self,raw_url: str) -> DefaultGradingSchemeRequestBuilder:
65+
"""
66+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
67+
param raw_url: The raw URL to use for the request builder.
68+
Returns: DefaultGradingSchemeRequestBuilder
69+
"""
70+
if raw_url is None:
71+
raise TypeError("raw_url cannot be null.")
72+
return DefaultGradingSchemeRequestBuilder(self.request_adapter, raw_url)
73+
74+
@dataclass
75+
class DefaultGradingSchemeRequestBuilderGetQueryParameters():
76+
"""
77+
The default grading scheme for assignments created in this class.
78+
"""
79+
def get_query_parameter(self,original_name: str) -> str:
80+
"""
81+
Maps the query parameters names to their encoded names for the URI template parsing.
82+
param original_name: The original query parameter name in the class.
83+
Returns: str
84+
"""
85+
if original_name is None:
86+
raise TypeError("original_name cannot be null.")
87+
if original_name == "expand":
88+
return "%24expand"
89+
if original_name == "select":
90+
return "%24select"
91+
return original_name
92+
93+
# Expand related entities
94+
expand: Optional[list[str]] = None
95+
96+
# Select properties to be returned
97+
select: Optional[list[str]] = None
98+
99+
100+
@dataclass
101+
class DefaultGradingSchemeRequestBuilderGetRequestConfiguration(RequestConfiguration[DefaultGradingSchemeRequestBuilderGetQueryParameters]):
102+
"""
103+
Configuration for the request such as headers, query parameters, and middleware options.
104+
"""
105+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
106+
107+
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
from __future__ import annotations
2+
from collections.abc import Callable
3+
from dataclasses import dataclass, field
4+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
5+
from kiota_abstractions.base_request_configuration import RequestConfiguration
6+
from kiota_abstractions.default_query_parameters import QueryParameters
7+
from kiota_abstractions.get_path_parameters import get_path_parameters
8+
from kiota_abstractions.method import Method
9+
from kiota_abstractions.request_adapter import RequestAdapter
10+
from kiota_abstractions.request_information import RequestInformation
11+
from kiota_abstractions.request_option import RequestOption
12+
from kiota_abstractions.serialization import Parsable, ParsableFactory
13+
from typing import Any, Optional, TYPE_CHECKING, Union
14+
from warnings import warn
15+
16+
if TYPE_CHECKING:
17+
from .......models.o_data_errors.o_data_error import ODataError
18+
19+
class CountRequestBuilder(BaseRequestBuilder):
20+
"""
21+
Provides operations to count the resources in the collection.
22+
"""
23+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
24+
"""
25+
Instantiates a new CountRequestBuilder and sets the default values.
26+
param path_parameters: The raw url or the url-template parameters for the request.
27+
param request_adapter: The request adapter to use to execute the requests.
28+
Returns: None
29+
"""
30+
super().__init__(request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}/assignmentSettings/gradingSchemes/$count{?%24filter,%24search}", path_parameters)
31+
32+
async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]:
33+
"""
34+
Get the number of the resource
35+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
36+
Returns: Optional[int]
37+
"""
38+
request_info = self.to_get_request_information(
39+
request_configuration
40+
)
41+
from .......models.o_data_errors.o_data_error import ODataError
42+
43+
error_mapping: dict[str, type[ParsableFactory]] = {
44+
"XXX": ODataError,
45+
}
46+
if not self.request_adapter:
47+
raise Exception("Http core is null")
48+
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
49+
50+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
51+
"""
52+
Get the number of the resource
53+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
54+
Returns: RequestInformation
55+
"""
56+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
57+
request_info.configure(request_configuration)
58+
request_info.headers.try_add("Accept", "text/plain;q=0.9")
59+
return request_info
60+
61+
def with_url(self,raw_url: str) -> CountRequestBuilder:
62+
"""
63+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
64+
param raw_url: The raw URL to use for the request builder.
65+
Returns: CountRequestBuilder
66+
"""
67+
if raw_url is None:
68+
raise TypeError("raw_url cannot be null.")
69+
return CountRequestBuilder(self.request_adapter, raw_url)
70+
71+
@dataclass
72+
class CountRequestBuilderGetQueryParameters():
73+
"""
74+
Get the number of the resource
75+
"""
76+
def get_query_parameter(self,original_name: str) -> str:
77+
"""
78+
Maps the query parameters names to their encoded names for the URI template parsing.
79+
param original_name: The original query parameter name in the class.
80+
Returns: str
81+
"""
82+
if original_name is None:
83+
raise TypeError("original_name cannot be null.")
84+
if original_name == "filter":
85+
return "%24filter"
86+
if original_name == "search":
87+
return "%24search"
88+
return original_name
89+
90+
# Filter items by property values
91+
filter: Optional[str] = None
92+
93+
# Search items by search phrases
94+
search: Optional[str] = None
95+
96+
97+
@dataclass
98+
class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]):
99+
"""
100+
Configuration for the request such as headers, query parameters, and middleware options.
101+
"""
102+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
103+
104+

0 commit comments

Comments
 (0)