Skip to content

Commit 4cd4397

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 213120
1 parent bd81dec commit 4cd4397

File tree

603 files changed

+51275
-484
lines changed

Some content is hidden

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

603 files changed

+51275
-484
lines changed

msgraph_beta/generated/application_templates/application_templates_request_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def by_application_template_id(self,application_template_id: str) -> Application
4848

4949
async def get(self,request_configuration: Optional[RequestConfiguration[ApplicationTemplatesRequestBuilderGetQueryParameters]] = None) -> Optional[ApplicationTemplateCollectionResponse]:
5050
"""
51-
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license.
51+
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response.
5252
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5353
Returns: Optional[ApplicationTemplateCollectionResponse]
5454
Find more info here: https://learn.microsoft.com/graph/api/applicationtemplate-list?view=graph-rest-beta
@@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Applicat
6969

7070
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ApplicationTemplatesRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
7171
"""
72-
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license.
72+
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response.
7373
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
7474
Returns: RequestInformation
7575
"""
@@ -100,7 +100,7 @@ def count(self) -> CountRequestBuilder:
100100
@dataclass
101101
class ApplicationTemplatesRequestBuilderGetQueryParameters():
102102
"""
103-
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license.
103+
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response.
104104
"""
105105
def get_query_parameter(self,original_name: str) -> str:
106106
"""

msgraph_beta/generated/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ async def post(self,body: AcquireAccessTokenPostRequestBody, request_configurati
3838
Returns: None
3939
Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronization-acquireaccesstoken?view=graph-rest-beta
4040
"""
41+
warn("This action acquires an access token via Oauth Code Grant Flow. Code Grant will be completely deprecated so this action will be obsolete. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
4142
if body is None:
4243
raise TypeError("body cannot be null.")
4344
request_info = self.to_post_request_information(
@@ -59,6 +60,7 @@ def to_post_request_information(self,body: AcquireAccessTokenPostRequestBody, re
5960
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6061
Returns: RequestInformation
6162
"""
63+
warn("This action acquires an access token via Oauth Code Grant Flow. Code Grant will be completely deprecated so this action will be obsolete. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
6264
if body is None:
6365
raise TypeError("body cannot be null.")
6466
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
@@ -73,6 +75,7 @@ def with_url(self,raw_url: str) -> AcquireAccessTokenRequestBuilder:
7375
param raw_url: The raw URL to use for the request builder.
7476
Returns: AcquireAccessTokenRequestBuilder
7577
"""
78+
warn("This action acquires an access token via Oauth Code Grant Flow. Code Grant will be completely deprecated so this action will be obsolete. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
7679
if raw_url is None:
7780
raise TypeError("raw_url cannot be null.")
7881
return AcquireAccessTokenRequestBuilder(self.request_adapter, raw_url)

msgraph_beta/generated/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ async def post(self,body: ValidateCredentialsPostRequestBody, request_configurat
3838
Returns: None
3939
Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronizationjob-validatecredentials?view=graph-rest-beta
4040
"""
41+
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
4142
if body is None:
4243
raise TypeError("body cannot be null.")
4344
request_info = self.to_post_request_information(
@@ -59,6 +60,7 @@ def to_post_request_information(self,body: ValidateCredentialsPostRequestBody, r
5960
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6061
Returns: RequestInformation
6162
"""
63+
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
6264
if body is None:
6365
raise TypeError("body cannot be null.")
6466
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
@@ -73,6 +75,7 @@ def with_url(self,raw_url: str) -> ValidateCredentialsRequestBuilder:
7375
param raw_url: The raw URL to use for the request builder.
7476
Returns: ValidateCredentialsRequestBuilder
7577
"""
78+
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
7679
if raw_url is None:
7780
raise TypeError("raw_url cannot be null.")
7881
return ValidateCredentialsRequestBuilder(self.request_adapter, raw_url)

msgraph_beta/generated/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ async def post(self,body: ValidateCredentialsPostRequestBody, request_configurat
3737
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3838
Returns: None
3939
"""
40+
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
4041
if body is None:
4142
raise TypeError("body cannot be null.")
4243
request_info = self.to_post_request_information(
@@ -58,6 +59,7 @@ def to_post_request_information(self,body: ValidateCredentialsPostRequestBody, r
5859
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5960
Returns: RequestInformation
6061
"""
62+
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
6163
if body is None:
6264
raise TypeError("body cannot be null.")
6365
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
@@ -72,6 +74,7 @@ def with_url(self,raw_url: str) -> ValidateCredentialsRequestBuilder:
7274
param raw_url: The raw URL to use for the request builder.
7375
Returns: ValidateCredentialsRequestBuilder
7476
"""
77+
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
7578
if raw_url is None:
7679
raise TypeError("raw_url cannot be null.")
7780
return ValidateCredentialsRequestBuilder(self.request_adapter, raw_url)

msgraph_beta/generated/applications/item/synchronization/secrets/count/count_request_builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
3535
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3636
Returns: Optional[int]
3737
"""
38+
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
3839
request_info = self.to_get_request_information(
3940
request_configuration
4041
)
@@ -53,6 +54,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
5354
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5455
Returns: RequestInformation
5556
"""
57+
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
5658
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
5759
request_info.configure(request_configuration)
5860
request_info.headers.try_add("Accept", "text/plain;q=0.9")
@@ -64,6 +66,7 @@ def with_url(self,raw_url: str) -> CountRequestBuilder:
6466
param raw_url: The raw URL to use for the request builder.
6567
Returns: CountRequestBuilder
6668
"""
69+
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
6770
if raw_url is None:
6871
raise TypeError("raw_url cannot be null.")
6972
return CountRequestBuilder(self.request_adapter, raw_url)

msgraph_beta/generated/applications/item/synchronization/secrets/secrets_request_builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ async def put(self,body: SecretsPutRequestBody, request_configuration: Optional[
3939
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
4040
Returns: Optional[SecretsPutResponse]
4141
"""
42+
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
4243
if body is None:
4344
raise TypeError("body cannot be null.")
4445
request_info = self.to_put_request_information(
@@ -62,6 +63,7 @@ def to_put_request_information(self,body: SecretsPutRequestBody, request_configu
6263
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6364
Returns: RequestInformation
6465
"""
66+
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
6567
if body is None:
6668
raise TypeError("body cannot be null.")
6769
request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters)
@@ -76,6 +78,7 @@ def with_url(self,raw_url: str) -> SecretsRequestBuilder:
7678
param raw_url: The raw URL to use for the request builder.
7779
Returns: SecretsRequestBuilder
7880
"""
81+
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
7982
if raw_url is None:
8083
raise TypeError("raw_url cannot be null.")
8184
return SecretsRequestBuilder(self.request_adapter, raw_url)

msgraph_beta/generated/chats/item/chat_item_request_builder.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from .send_activity_notification.send_activity_notification_request_builder import SendActivityNotificationRequestBuilder
3232
from .start_migration.start_migration_request_builder import StartMigrationRequestBuilder
3333
from .tabs.tabs_request_builder import TabsRequestBuilder
34+
from .targeted_messages.targeted_messages_request_builder import TargetedMessagesRequestBuilder
3435
from .unhide_for_user.unhide_for_user_request_builder import UnhideForUserRequestBuilder
3536

3637
class ChatItemRequestBuilder(BaseRequestBuilder):
@@ -292,6 +293,15 @@ def tabs(self) -> TabsRequestBuilder:
292293

293294
return TabsRequestBuilder(self.request_adapter, self.path_parameters)
294295

296+
@property
297+
def targeted_messages(self) -> TargetedMessagesRequestBuilder:
298+
"""
299+
Provides operations to manage the targetedMessages property of the microsoft.graph.chat entity.
300+
"""
301+
from .targeted_messages.targeted_messages_request_builder import TargetedMessagesRequestBuilder
302+
303+
return TargetedMessagesRequestBuilder(self.request_adapter, self.path_parameters)
304+
295305
@property
296306
def unhide_for_user(self) -> UnhideForUserRequestBuilder:
297307
"""
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}/chats/{chat%2Did}/targetedMessages/$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)