Skip to content

Commit e5b93f3

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 207061
1 parent 1af0da5 commit e5b93f3

File tree

159 files changed

+8726
-98
lines changed

Some content is hidden

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

159 files changed

+8726
-98
lines changed

msgraph_beta/generated/access_reviews/item/access_review_item_request_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[AccessRe
8080

8181
async def patch(self,body: AccessReview, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AccessReview]:
8282
"""
83-
In the Microsoft Entra access reviews feature, update an existing accessReview object to change one or more of its properties. This API is not intended to change the reviewers or decisions of a review. To change the reviewers, use the addReviewer or removeReviewer APIs. To stop an already-started one-time review, or an already-started instance of a recurring review, early, use the stop API. To apply the decisions to the target group or app access rights, use the apply API.
83+
In the Microsoft Entra access reviews feature, update an existing accessReview object to change one or more of its properties. This API is not intended to change the reviewers or decisions of a review. To change the reviewers, use the addReviewer or removeReviewer APIs. To stop an already-started one-time review, or an already-started instance of a recurring review, early, use the stop API. To apply the decisions to the target group or app access rights, use the apply API.
8484
param body: The request body
8585
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
8686
Returns: Optional[AccessReview]
@@ -126,7 +126,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
126126

127127
def to_patch_request_information(self,body: AccessReview, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
128128
"""
129-
In the Microsoft Entra access reviews feature, update an existing accessReview object to change one or more of its properties. This API is not intended to change the reviewers or decisions of a review. To change the reviewers, use the addReviewer or removeReviewer APIs. To stop an already-started one-time review, or an already-started instance of a recurring review, early, use the stop API. To apply the decisions to the target group or app access rights, use the apply API.
129+
In the Microsoft Entra access reviews feature, update an existing accessReview object to change one or more of its properties. This API is not intended to change the reviewers or decisions of a review. To change the reviewers, use the addReviewer or removeReviewer APIs. To stop an already-started one-time review, or an already-started instance of a recurring review, early, use the stop API. To apply the decisions to the target group or app access rights, use the apply API.
130130
param body: The request body
131131
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
132132
Returns: RequestInformation

msgraph_beta/generated/admin/exchange/exchange_request_builder.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from ...models.o_data_errors.o_data_error import ODataError
1919
from .mailboxes.mailboxes_request_builder import MailboxesRequestBuilder
2020
from .message_traces.message_traces_request_builder import MessageTracesRequestBuilder
21+
from .tracing.tracing_request_builder import TracingRequestBuilder
2122

2223
class ExchangeRequestBuilder(BaseRequestBuilder):
2324
"""
@@ -165,6 +166,15 @@ def message_traces(self) -> MessageTracesRequestBuilder:
165166

166167
return MessageTracesRequestBuilder(self.request_adapter, self.path_parameters)
167168

169+
@property
170+
def tracing(self) -> TracingRequestBuilder:
171+
"""
172+
Provides operations to manage the tracing property of the microsoft.graph.exchangeAdmin entity.
173+
"""
174+
from .tracing.tracing_request_builder import TracingRequestBuilder
175+
176+
return TracingRequestBuilder(self.request_adapter, self.path_parameters)
177+
168178
@dataclass
169179
class ExchangeRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
170180
"""
Lines changed: 107 additions & 0 deletions
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.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}/admin/exchange/tracing/messageTraces/$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+
warn("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15", DeprecationWarning)
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+
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
50+
51+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
52+
"""
53+
Get the number of the resource
54+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
55+
Returns: RequestInformation
56+
"""
57+
warn("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15", DeprecationWarning)
58+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
59+
request_info.configure(request_configuration)
60+
request_info.headers.try_add("Accept", "text/plain;q=0.9")
61+
return request_info
62+
63+
def with_url(self,raw_url: str) -> CountRequestBuilder:
64+
"""
65+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
66+
param raw_url: The raw URL to use for the request builder.
67+
Returns: CountRequestBuilder
68+
"""
69+
warn("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15", DeprecationWarning)
70+
if raw_url is None:
71+
raise TypeError("raw_url cannot be null.")
72+
return CountRequestBuilder(self.request_adapter, raw_url)
73+
74+
@dataclass
75+
class CountRequestBuilderGetQueryParameters():
76+
"""
77+
Get the number of the resource
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 == "filter":
88+
return "%24filter"
89+
if original_name == "search":
90+
return "%24search"
91+
return original_name
92+
93+
# Filter items by property values
94+
filter: Optional[str] = None
95+
96+
# Search items by search phrases
97+
search: Optional[str] = None
98+
99+
100+
@dataclass
101+
class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]):
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+

0 commit comments

Comments
 (0)