Skip to content

Commit 148b755

Browse files
authored
Merge pull request #758 from microsoftgraph/beta/pipelinebuild/181777
Generated beta models and request builders
2 parents 9526224 + d9b4d35 commit 148b755

File tree

115 files changed

+999
-381
lines changed

Some content is hidden

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

115 files changed

+999
-381
lines changed
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
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.name_pronunciation_settings import NamePronunciationSettings
18+
from ....models.o_data_errors.o_data_error import ODataError
19+
20+
class NamePronunciationRequestBuilder(BaseRequestBuilder):
21+
"""
22+
Provides operations to manage the namePronunciation property of the microsoft.graph.peopleAdminSettings entity.
23+
"""
24+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25+
"""
26+
Instantiates a new NamePronunciationRequestBuilder 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}/admin/people/namePronunciation{?%24expand,%24select}", path_parameters)
32+
33+
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
34+
"""
35+
Delete navigation property namePronunciation for admin
36+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37+
Returns: None
38+
"""
39+
request_info = self.to_delete_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+
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)
50+
51+
async def get(self,request_configuration: Optional[RequestConfiguration[NamePronunciationRequestBuilderGetQueryParameters]] = None) -> Optional[NamePronunciationSettings]:
52+
"""
53+
Read the properties and relationships of a namePronunciationSettings object.
54+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
55+
Returns: Optional[NamePronunciationSettings]
56+
Find more info here: https://learn.microsoft.com/graph/api/namepronunciationsettings-get?view=graph-rest-beta
57+
"""
58+
request_info = self.to_get_request_information(
59+
request_configuration
60+
)
61+
from ....models.o_data_errors.o_data_error import ODataError
62+
63+
error_mapping: dict[str, type[ParsableFactory]] = {
64+
"XXX": ODataError,
65+
}
66+
if not self.request_adapter:
67+
raise Exception("Http core is null")
68+
from ....models.name_pronunciation_settings import NamePronunciationSettings
69+
70+
return await self.request_adapter.send_async(request_info, NamePronunciationSettings, error_mapping)
71+
72+
async def patch(self,body: NamePronunciationSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[NamePronunciationSettings]:
73+
"""
74+
Update the properties of a namePronunciationSettings object.
75+
param body: The request body
76+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
77+
Returns: Optional[NamePronunciationSettings]
78+
Find more info here: https://learn.microsoft.com/graph/api/namepronunciationsettings-update?view=graph-rest-beta
79+
"""
80+
if body is None:
81+
raise TypeError("body cannot be null.")
82+
request_info = self.to_patch_request_information(
83+
body, request_configuration
84+
)
85+
from ....models.o_data_errors.o_data_error import ODataError
86+
87+
error_mapping: dict[str, type[ParsableFactory]] = {
88+
"XXX": ODataError,
89+
}
90+
if not self.request_adapter:
91+
raise Exception("Http core is null")
92+
from ....models.name_pronunciation_settings import NamePronunciationSettings
93+
94+
return await self.request_adapter.send_async(request_info, NamePronunciationSettings, error_mapping)
95+
96+
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
97+
"""
98+
Delete navigation property namePronunciation for admin
99+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
100+
Returns: RequestInformation
101+
"""
102+
request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters)
103+
request_info.configure(request_configuration)
104+
request_info.headers.try_add("Accept", "application/json")
105+
return request_info
106+
107+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[NamePronunciationRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
108+
"""
109+
Read the properties and relationships of a namePronunciationSettings object.
110+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
111+
Returns: RequestInformation
112+
"""
113+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
114+
request_info.configure(request_configuration)
115+
request_info.headers.try_add("Accept", "application/json")
116+
return request_info
117+
118+
def to_patch_request_information(self,body: NamePronunciationSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
119+
"""
120+
Update the properties of a namePronunciationSettings object.
121+
param body: The request body
122+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
123+
Returns: RequestInformation
124+
"""
125+
if body is None:
126+
raise TypeError("body cannot be null.")
127+
request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters)
128+
request_info.configure(request_configuration)
129+
request_info.headers.try_add("Accept", "application/json")
130+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
131+
return request_info
132+
133+
def with_url(self,raw_url: str) -> NamePronunciationRequestBuilder:
134+
"""
135+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
136+
param raw_url: The raw URL to use for the request builder.
137+
Returns: NamePronunciationRequestBuilder
138+
"""
139+
if raw_url is None:
140+
raise TypeError("raw_url cannot be null.")
141+
return NamePronunciationRequestBuilder(self.request_adapter, raw_url)
142+
143+
@dataclass
144+
class NamePronunciationRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
145+
"""
146+
Configuration for the request such as headers, query parameters, and middleware options.
147+
"""
148+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
149+
150+
@dataclass
151+
class NamePronunciationRequestBuilderGetQueryParameters():
152+
"""
153+
Read the properties and relationships of a namePronunciationSettings object.
154+
"""
155+
def get_query_parameter(self,original_name: str) -> str:
156+
"""
157+
Maps the query parameters names to their encoded names for the URI template parsing.
158+
param original_name: The original query parameter name in the class.
159+
Returns: str
160+
"""
161+
if original_name is None:
162+
raise TypeError("original_name cannot be null.")
163+
if original_name == "expand":
164+
return "%24expand"
165+
if original_name == "select":
166+
return "%24select"
167+
return original_name
168+
169+
# Expand related entities
170+
expand: Optional[list[str]] = None
171+
172+
# Select properties to be returned
173+
select: Optional[list[str]] = None
174+
175+
176+
@dataclass
177+
class NamePronunciationRequestBuilderGetRequestConfiguration(RequestConfiguration[NamePronunciationRequestBuilderGetQueryParameters]):
178+
"""
179+
Configuration for the request such as headers, query parameters, and middleware options.
180+
"""
181+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
182+
183+
@dataclass
184+
class NamePronunciationRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]):
185+
"""
186+
Configuration for the request such as headers, query parameters, and middleware options.
187+
"""
188+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
189+
190+

msgraph_beta/generated/admin/people/people_request_builder.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from ...models.o_data_errors.o_data_error import ODataError
1818
from ...models.people_admin_settings import PeopleAdminSettings
1919
from .item_insights.item_insights_request_builder import ItemInsightsRequestBuilder
20+
from .name_pronunciation.name_pronunciation_request_builder import NamePronunciationRequestBuilder
2021
from .profile_card_properties.profile_card_properties_request_builder import ProfileCardPropertiesRequestBuilder
2122
from .pronouns.pronouns_request_builder import PronounsRequestBuilder
2223

@@ -151,6 +152,15 @@ def item_insights(self) -> ItemInsightsRequestBuilder:
151152

152153
return ItemInsightsRequestBuilder(self.request_adapter, self.path_parameters)
153154

155+
@property
156+
def name_pronunciation(self) -> NamePronunciationRequestBuilder:
157+
"""
158+
Provides operations to manage the namePronunciation property of the microsoft.graph.peopleAdminSettings entity.
159+
"""
160+
from .name_pronunciation.name_pronunciation_request_builder import NamePronunciationRequestBuilder
161+
162+
return NamePronunciationRequestBuilder(self.request_adapter, self.path_parameters)
163+
154164
@property
155165
def profile_card_properties(self) -> ProfileCardPropertiesRequestBuilder:
156166
"""

msgraph_beta/generated/admin/windows/updates/resource_connections/item/resource_connection_item_request_builder.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d
3232

3333
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
3434
"""
35-
Delete an operationalInsightsConnection object.
35+
Delete a resourceConnection object.
3636
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3737
Returns: None
38-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-delete?view=graph-rest-beta
38+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-delete?view=graph-rest-beta
3939
"""
4040
request_info = self.to_delete_request_information(
4141
request_configuration
@@ -51,10 +51,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query
5151

5252
async def get(self,request_configuration: Optional[RequestConfiguration[ResourceConnectionItemRequestBuilderGetQueryParameters]] = None) -> Optional[ResourceConnection]:
5353
"""
54-
Read the properties and relationships of a resourceConnection object.
54+
Read the properties and relationships of an operationalInsightsConnection object.
5555
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5656
Returns: Optional[ResourceConnection]
57-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-get?view=graph-rest-beta
57+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-get?view=graph-rest-beta
5858
"""
5959
request_info = self.to_get_request_information(
6060
request_configuration
@@ -95,7 +95,7 @@ async def patch(self,body: ResourceConnection, request_configuration: Optional[R
9595

9696
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
9797
"""
98-
Delete an operationalInsightsConnection object.
98+
Delete a resourceConnection object.
9999
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
100100
Returns: RequestInformation
101101
"""
@@ -106,7 +106,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo
106106

107107
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ResourceConnectionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
108108
"""
109-
Read the properties and relationships of a resourceConnection object.
109+
Read the properties and relationships of an operationalInsightsConnection object.
110110
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
111111
Returns: RequestInformation
112112
"""
@@ -150,7 +150,7 @@ class ResourceConnectionItemRequestBuilderDeleteRequestConfiguration(RequestConf
150150
@dataclass
151151
class ResourceConnectionItemRequestBuilderGetQueryParameters():
152152
"""
153-
Read the properties and relationships of a resourceConnection object.
153+
Read the properties and relationships of an operationalInsightsConnection object.
154154
"""
155155
def get_query_parameter(self,original_name: str) -> str:
156156
"""

msgraph_beta/generated/admin/windows/updates/updatable_assets/item/updatable_asset_item_request_builder.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d
3636

3737
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
3838
"""
39-
Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
39+
Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
4040
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
4141
Returns: None
42-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-delete?view=graph-rest-beta
42+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-delete?view=graph-rest-beta
4343
"""
4444
request_info = self.to_delete_request_information(
4545
request_configuration
@@ -55,10 +55,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query
5555

5656
async def get(self,request_configuration: Optional[RequestConfiguration[UpdatableAssetItemRequestBuilderGetQueryParameters]] = None) -> Optional[UpdatableAsset]:
5757
"""
58-
Read the properties and relationships of an updatableAssetGroup object.
58+
Read the properties of an azureADDevice object.
5959
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6060
Returns: Optional[UpdatableAsset]
61-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-get?view=graph-rest-beta
61+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-get?view=graph-rest-beta
6262
"""
6363
request_info = self.to_get_request_information(
6464
request_configuration
@@ -99,7 +99,7 @@ async def patch(self,body: UpdatableAsset, request_configuration: Optional[Reque
9999

100100
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
101101
"""
102-
Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
102+
Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
103103
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
104104
Returns: RequestInformation
105105
"""
@@ -110,7 +110,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo
110110

111111
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[UpdatableAssetItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
112112
"""
113-
Read the properties and relationships of an updatableAssetGroup object.
113+
Read the properties of an azureADDevice object.
114114
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
115115
Returns: RequestInformation
116116
"""
@@ -190,7 +190,7 @@ class UpdatableAssetItemRequestBuilderDeleteRequestConfiguration(RequestConfigur
190190
@dataclass
191191
class UpdatableAssetItemRequestBuilderGetQueryParameters():
192192
"""
193-
Read the properties and relationships of an updatableAssetGroup object.
193+
Read the properties of an azureADDevice object.
194194
"""
195195
def get_query_parameter(self,original_name: str) -> str:
196196
"""

msgraph_beta/generated/admin/windows/updates/update_policies/item/compliance_changes/item/compliance_change_item_request_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Complian
7373

7474
async def patch(self,body: ComplianceChange, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ComplianceChange]:
7575
"""
76-
Update the properties of a complianceChange object.
76+
Update the properties of a contentApproval object.
7777
param body: The request body
7878
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
7979
Returns: Optional[ComplianceChange]
80-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-update?view=graph-rest-beta
80+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-update?view=graph-rest-beta
8181
"""
8282
if body is None:
8383
raise TypeError("body cannot be null.")
@@ -119,7 +119,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
119119

120120
def to_patch_request_information(self,body: ComplianceChange, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
121121
"""
122-
Update the properties of a complianceChange object.
122+
Update the properties of a contentApproval object.
123123
param body: The request body
124124
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
125125
Returns: RequestInformation

0 commit comments

Comments
 (0)