Skip to content

Commit 3a7f339

Browse files
microsoft-graph-devx-bot[bot]dependabot[bot]Microsoft Graph DevX ToolingMIchaelMainer
authored
feat(generation): update request builders and models (#973)
* chore(deps): bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout 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 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): 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-dev): bump charset-normalizer from 3.4.3 to 3.4.4 Bumps [charset-normalizer](https://github.com/jawah/charset_normalizer) from 3.4.3 to 3.4.4. - [Release notes](https://github.com/jawah/charset_normalizer/releases) - [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md) - [Commits](jawah/charset_normalizer@3.4.3...3.4.4) --- updated-dependencies: - dependency-name: charset-normalizer dependency-version: 3.4.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * 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 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 multidict from 6.6.4 to 6.7.0 Bumps [multidict](https://github.com/aio-libs/multidict) from 6.6.4 to 6.7.0. - [Release notes](https://github.com/aio-libs/multidict/releases) - [Changelog](https://github.com/aio-libs/multidict/blob/master/CHANGES.rst) - [Commits](aio-libs/multidict@v6.6.4...v6.7.0) --- updated-dependencies: - dependency-name: multidict dependency-version: 6.7.0 dependency-type: direct:development update-type: version-update:semver-minor ... 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 azure-identity group across 1 directory with 2 updates Bumps the azure-identity group with 2 updates in the / directory: [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.23.1 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.23.1...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> * 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.5` | `1.9.6` | | [microsoft-kiota-serialization-text](https://github.com/microsoft/kiota-python) | `1.9.5` | `1.9.6` | | [microsoft-kiota-serialization-form](https://github.com/microsoft/kiota-python) | `1.9.5` | `1.9.6` | | [microsoft-kiota-serialization-multipart](https://github.com/microsoft/kiota-python) | `1.9.5` | `1.9.6` | | [microsoft-kiota-abstractions](https://github.com/microsoft/kiota-python) | `1.9.5` | `1.9.6` | | [microsoft-kiota-authentication-azure](https://github.com/microsoft/kiota-python) | `1.9.5` | `1.9.6` | | [microsoft-kiota-http](https://github.com/microsoft/kiota-python) | `1.9.5` | `1.9.6` | Updates `microsoft-kiota-serialization-json` from 1.9.5 to 1.9.6 - [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.5...microsoft-kiota-serialization-json-v1.9.6) Updates `microsoft-kiota-serialization-text` from 1.9.5 to 1.9.6 - [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.5...microsoft-kiota-serialization-text-v1.9.6) Updates `microsoft-kiota-serialization-form` from 1.9.5 to 1.9.6 - [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.5...microsoft-kiota-serialization-form-v1.9.6) Updates `microsoft-kiota-serialization-multipart` from 1.9.5 to 1.9.6 - [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.5...microsoft-kiota-serialization-multipart-v1.9.6) Updates `microsoft-kiota-abstractions` from 1.9.5 to 1.9.6 - [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.5...microsoft-kiota-abstractions-v1.9.6) Updates `microsoft-kiota-authentication-azure` from 1.9.5 to 1.9.6 - [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.5...microsoft-kiota-authentication-azure-v1.9.6) Updates `microsoft-kiota-http` from 1.9.5 to 1.9.6 - [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.5...microsoft-kiota-http-v1.9.6) --- updated-dependencies: - dependency-name: microsoft-kiota-serialization-json dependency-version: 1.9.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-serialization-text dependency-version: 1.9.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-serialization-form dependency-version: 1.9.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-serialization-multipart dependency-version: 1.9.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-abstractions dependency-version: 1.9.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-authentication-azure dependency-version: 1.9.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota - dependency-name: microsoft-kiota-http dependency-version: 1.9.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: kiota ... 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 8d8a51b commit 3a7f339

File tree

509 files changed

+52663
-3507
lines changed

Some content is hidden

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

509 files changed

+52663
-3507
lines changed

.github/workflows/codeql.yml

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

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

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

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

msgraph_beta/generated/base_graph_service_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ def permission_grants(self) -> PermissionGrantsRequestBuilder:
942942
@property
943943
def places(self) -> PlacesRequestBuilder:
944944
"""
945-
The places property
945+
Provides operations to manage the collection of place entities.
946946
"""
947947
from .places.places_request_builder import PlacesRequestBuilder
948948

msgraph_beta/generated/device_management/android_managed_store_account_enterprise_settings/android_managed_store_account_enterprise_settings_request_builder.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
from .approve_apps.approve_apps_request_builder import ApproveAppsRequestBuilder
2121
from .complete_signup.complete_signup_request_builder import CompleteSignupRequestBuilder
2222
from .create_google_play_web_token.create_google_play_web_token_request_builder import CreateGooglePlayWebTokenRequestBuilder
23+
from .request_enterprise_upgrade_url.request_enterprise_upgrade_url_request_builder import RequestEnterpriseUpgradeUrlRequestBuilder
2324
from .request_signup_url.request_signup_url_request_builder import RequestSignupUrlRequestBuilder
25+
from .retrieve_store_layout.retrieve_store_layout_request_builder import RetrieveStoreLayoutRequestBuilder
2426
from .set_android_device_owner_fully_managed_enrollment_state.set_android_device_owner_fully_managed_enrollment_state_request_builder import SetAndroidDeviceOwnerFullyManagedEnrollmentStateRequestBuilder
27+
from .set_store_layout.set_store_layout_request_builder import SetStoreLayoutRequestBuilder
2528
from .sync_apps.sync_apps_request_builder import SyncAppsRequestBuilder
2629
from .unbind.unbind_request_builder import UnbindRequestBuilder
2730

@@ -182,6 +185,15 @@ def create_google_play_web_token(self) -> CreateGooglePlayWebTokenRequestBuilder
182185

183186
return CreateGooglePlayWebTokenRequestBuilder(self.request_adapter, self.path_parameters)
184187

188+
@property
189+
def request_enterprise_upgrade_url(self) -> RequestEnterpriseUpgradeUrlRequestBuilder:
190+
"""
191+
Provides operations to call the requestEnterpriseUpgradeUrl method.
192+
"""
193+
from .request_enterprise_upgrade_url.request_enterprise_upgrade_url_request_builder import RequestEnterpriseUpgradeUrlRequestBuilder
194+
195+
return RequestEnterpriseUpgradeUrlRequestBuilder(self.request_adapter, self.path_parameters)
196+
185197
@property
186198
def request_signup_url(self) -> RequestSignupUrlRequestBuilder:
187199
"""
@@ -191,6 +203,15 @@ def request_signup_url(self) -> RequestSignupUrlRequestBuilder:
191203

192204
return RequestSignupUrlRequestBuilder(self.request_adapter, self.path_parameters)
193205

206+
@property
207+
def retrieve_store_layout(self) -> RetrieveStoreLayoutRequestBuilder:
208+
"""
209+
Provides operations to call the retrieveStoreLayout method.
210+
"""
211+
from .retrieve_store_layout.retrieve_store_layout_request_builder import RetrieveStoreLayoutRequestBuilder
212+
213+
return RetrieveStoreLayoutRequestBuilder(self.request_adapter, self.path_parameters)
214+
194215
@property
195216
def set_android_device_owner_fully_managed_enrollment_state(self) -> SetAndroidDeviceOwnerFullyManagedEnrollmentStateRequestBuilder:
196217
"""
@@ -200,6 +221,15 @@ def set_android_device_owner_fully_managed_enrollment_state(self) -> SetAndroidD
200221

201222
return SetAndroidDeviceOwnerFullyManagedEnrollmentStateRequestBuilder(self.request_adapter, self.path_parameters)
202223

224+
@property
225+
def set_store_layout(self) -> SetStoreLayoutRequestBuilder:
226+
"""
227+
Provides operations to call the setStoreLayout method.
228+
"""
229+
from .set_store_layout.set_store_layout_request_builder import SetStoreLayoutRequestBuilder
230+
231+
return SetStoreLayoutRequestBuilder(self.request_adapter, self.path_parameters)
232+
203233
@property
204234
def sync_apps(self) -> SyncAppsRequestBuilder:
205235
"""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
from __future__ import annotations
2+
from collections.abc import Callable
3+
from dataclasses import dataclass, field
4+
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
5+
from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton
6+
from typing import Any, Optional, TYPE_CHECKING, Union
7+
8+
@dataclass
9+
class RequestEnterpriseUpgradeUrlPostResponse(AdditionalDataHolder, BackedModel, Parsable):
10+
# Stores model information.
11+
backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False)
12+
13+
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
14+
additional_data: dict[str, Any] = field(default_factory=dict)
15+
# The value property
16+
value: Optional[str] = None
17+
18+
@staticmethod
19+
def create_from_discriminator_value(parse_node: ParseNode) -> RequestEnterpriseUpgradeUrlPostResponse:
20+
"""
21+
Creates a new instance of the appropriate class based on discriminator value
22+
param parse_node: The parse node to use to read the discriminator value and create the object
23+
Returns: RequestEnterpriseUpgradeUrlPostResponse
24+
"""
25+
if parse_node is None:
26+
raise TypeError("parse_node cannot be null.")
27+
return RequestEnterpriseUpgradeUrlPostResponse()
28+
29+
def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
30+
"""
31+
The deserialization information for the current model
32+
Returns: dict[str, Callable[[ParseNode], None]]
33+
"""
34+
fields: dict[str, Callable[[Any], None]] = {
35+
"value": lambda n : setattr(self, 'value', n.get_str_value()),
36+
}
37+
return fields
38+
39+
def serialize(self,writer: SerializationWriter) -> None:
40+
"""
41+
Serializes information the current object
42+
param writer: Serialization writer to use to serialize this model
43+
Returns: None
44+
"""
45+
if writer is None:
46+
raise TypeError("writer cannot be null.")
47+
writer.write_str_value("value", self.value)
48+
writer.write_additional_data_value(self.additional_data)
49+
50+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
from .request_enterprise_upgrade_url_post_response import RequestEnterpriseUpgradeUrlPostResponse
19+
20+
class RequestEnterpriseUpgradeUrlRequestBuilder(BaseRequestBuilder):
21+
"""
22+
Provides operations to call the requestEnterpriseUpgradeUrl method.
23+
"""
24+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25+
"""
26+
Instantiates a new RequestEnterpriseUpgradeUrlRequestBuilder 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}/deviceManagement/androidManagedStoreAccountEnterpriseSettings/requestEnterpriseUpgradeUrl", path_parameters)
32+
33+
async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[RequestEnterpriseUpgradeUrlPostResponse]:
34+
"""
35+
Invoke action requestEnterpriseUpgradeUrl
36+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37+
Returns: Optional[RequestEnterpriseUpgradeUrlPostResponse]
38+
"""
39+
request_info = self.to_post_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 .request_enterprise_upgrade_url_post_response import RequestEnterpriseUpgradeUrlPostResponse
50+
51+
return await self.request_adapter.send_async(request_info, RequestEnterpriseUpgradeUrlPostResponse, error_mapping)
52+
53+
def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
54+
"""
55+
Invoke action requestEnterpriseUpgradeUrl
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.POST, 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) -> RequestEnterpriseUpgradeUrlRequestBuilder:
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: RequestEnterpriseUpgradeUrlRequestBuilder
69+
"""
70+
if raw_url is None:
71+
raise TypeError("raw_url cannot be null.")
72+
return RequestEnterpriseUpgradeUrlRequestBuilder(self.request_adapter, raw_url)
73+
74+
@dataclass
75+
class RequestEnterpriseUpgradeUrlRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]):
76+
"""
77+
Configuration for the request such as headers, query parameters, and middleware options.
78+
"""
79+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
80+
81+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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.android_managed_store_layout_type import AndroidManagedStoreLayoutType
18+
from ....models.o_data_errors.o_data_error import ODataError
19+
20+
class RetrieveStoreLayoutRequestBuilder(BaseRequestBuilder):
21+
"""
22+
Provides operations to call the retrieveStoreLayout method.
23+
"""
24+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25+
"""
26+
Instantiates a new RetrieveStoreLayoutRequestBuilder 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}/deviceManagement/androidManagedStoreAccountEnterpriseSettings/retrieveStoreLayout()", path_parameters)
32+
33+
async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AndroidManagedStoreLayoutType]:
34+
"""
35+
Gets the Managed Google Play store layout type from Google EMM API.
36+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37+
Returns: Optional[AndroidManagedStoreLayoutType]
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.android_managed_store_layout_type import AndroidManagedStoreLayoutType
50+
51+
return await self.request_adapter.send_primitive_async(request_info, "AndroidManagedStoreLayoutType", error_mapping)
52+
53+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
54+
"""
55+
Gets the Managed Google Play store layout type from Google EMM API.
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) -> RetrieveStoreLayoutRequestBuilder:
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: RetrieveStoreLayoutRequestBuilder
69+
"""
70+
if raw_url is None:
71+
raise TypeError("raw_url cannot be null.")
72+
return RetrieveStoreLayoutRequestBuilder(self.request_adapter, raw_url)
73+
74+
@dataclass
75+
class RetrieveStoreLayoutRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]):
76+
"""
77+
Configuration for the request such as headers, query parameters, and middleware options.
78+
"""
79+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
80+
81+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
from __future__ import annotations
2+
from collections.abc import Callable
3+
from dataclasses import dataclass, field
4+
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
5+
from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton
6+
from typing import Any, Optional, TYPE_CHECKING, Union
7+
8+
if TYPE_CHECKING:
9+
from ....models.android_managed_store_layout_type import AndroidManagedStoreLayoutType
10+
11+
@dataclass
12+
class SetStoreLayoutPostRequestBody(AdditionalDataHolder, BackedModel, Parsable):
13+
# Stores model information.
14+
backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False)
15+
16+
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
17+
additional_data: dict[str, Any] = field(default_factory=dict)
18+
# The store layout types for Managed Google Play. Values correspond directly to the store layout types of Google enterprise objects.
19+
store_layout_type: Optional[AndroidManagedStoreLayoutType] = None
20+
21+
@staticmethod
22+
def create_from_discriminator_value(parse_node: ParseNode) -> SetStoreLayoutPostRequestBody:
23+
"""
24+
Creates a new instance of the appropriate class based on discriminator value
25+
param parse_node: The parse node to use to read the discriminator value and create the object
26+
Returns: SetStoreLayoutPostRequestBody
27+
"""
28+
if parse_node is None:
29+
raise TypeError("parse_node cannot be null.")
30+
return SetStoreLayoutPostRequestBody()
31+
32+
def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
33+
"""
34+
The deserialization information for the current model
35+
Returns: dict[str, Callable[[ParseNode], None]]
36+
"""
37+
from ....models.android_managed_store_layout_type import AndroidManagedStoreLayoutType
38+
39+
from ....models.android_managed_store_layout_type import AndroidManagedStoreLayoutType
40+
41+
fields: dict[str, Callable[[Any], None]] = {
42+
"storeLayoutType": lambda n : setattr(self, 'store_layout_type', n.get_enum_value(AndroidManagedStoreLayoutType)),
43+
}
44+
return fields
45+
46+
def serialize(self,writer: SerializationWriter) -> None:
47+
"""
48+
Serializes information the current object
49+
param writer: Serialization writer to use to serialize this model
50+
Returns: None
51+
"""
52+
if writer is None:
53+
raise TypeError("writer cannot be null.")
54+
writer.write_enum_value("storeLayoutType", self.store_layout_type)
55+
writer.write_additional_data_value(self.additional_data)
56+
57+

0 commit comments

Comments
 (0)