Skip to content

Commit 66f35d6

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 194896
1 parent 1e3fd3f commit 66f35d6

File tree

152 files changed

+6109
-224
lines changed

Some content is hidden

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

152 files changed

+6109
-224
lines changed

msgraph_beta/generated/admin/people/people_request_builder.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from ...models.people_admin_settings import PeopleAdminSettings
1919
from .item_insights.item_insights_request_builder import ItemInsightsRequestBuilder
2020
from .name_pronunciation.name_pronunciation_request_builder import NamePronunciationRequestBuilder
21+
from .photo_update_settings.photo_update_settings_request_builder import PhotoUpdateSettingsRequestBuilder
2122
from .profile_card_properties.profile_card_properties_request_builder import ProfileCardPropertiesRequestBuilder
2223
from .profile_property_settings.profile_property_settings_request_builder import ProfilePropertySettingsRequestBuilder
2324
from .profile_sources.profile_sources_request_builder import ProfileSourcesRequestBuilder
@@ -176,6 +177,15 @@ def name_pronunciation(self) -> NamePronunciationRequestBuilder:
176177

177178
return NamePronunciationRequestBuilder(self.request_adapter, self.path_parameters)
178179

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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 an operationalInsightsConnection object.
54+
Read the properties and relationships of a resourceConnection 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-operationalinsightsconnection-get?view=graph-rest-beta
57+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-get?view=graph-rest-beta
5858
"""
5959
request_info = self.to_get_request_information(
6060
request_configuration
@@ -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 an operationalInsightsConnection object.
109+
Read the properties and relationships of a resourceConnection 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 an operationalInsightsConnection object.
153+
Read the properties and relationships of a resourceConnection 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: 3 additions & 3 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 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.
39+
Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
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-azureaddevice-delete?view=graph-rest-beta
42+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-delete?view=graph-rest-beta
4343
"""
4444
request_info = self.to_delete_request_information(
4545
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 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.
102+
Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
103103
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
104104
Returns: RequestInformation
105105
"""

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

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

3434
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
3535
"""
36-
Delete a contentApproval object.
36+
Delete a complianceChange object.
3737
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3838
Returns: None
39-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-delete?view=graph-rest-beta
39+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-delete?view=graph-rest-beta
4040
"""
4141
request_info = self.to_delete_request_information(
4242
request_configuration
@@ -52,10 +52,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query
5252

5353
async def get(self,request_configuration: Optional[RequestConfiguration[ComplianceChangeItemRequestBuilderGetQueryParameters]] = None) -> Optional[ComplianceChange]:
5454
"""
55-
Read the properties and relationships of a contentApproval object.
55+
Read the properties and relationships of a complianceChange object.
5656
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5757
Returns: Optional[ComplianceChange]
58-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-get?view=graph-rest-beta
58+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-get?view=graph-rest-beta
5959
"""
6060
request_info = self.to_get_request_information(
6161
request_configuration
@@ -97,7 +97,7 @@ async def patch(self,body: ComplianceChange, request_configuration: Optional[Req
9797

9898
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
9999
"""
100-
Delete a contentApproval object.
100+
Delete a complianceChange object.
101101
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
102102
Returns: RequestInformation
103103
"""
@@ -108,7 +108,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo
108108

109109
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ComplianceChangeItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
110110
"""
111-
Read the properties and relationships of a contentApproval object.
111+
Read the properties and relationships of a complianceChange object.
112112
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
113113
Returns: RequestInformation
114114
"""
@@ -161,7 +161,7 @@ class ComplianceChangeItemRequestBuilderDeleteRequestConfiguration(RequestConfig
161161
@dataclass
162162
class ComplianceChangeItemRequestBuilderGetQueryParameters():
163163
"""
164-
Read the properties and relationships of a contentApproval object.
164+
Read the properties and relationships of a complianceChange object.
165165
"""
166166
def get_query_parameter(self,original_name: str) -> str:
167167
"""

0 commit comments

Comments
 (0)