Skip to content

Commit 7e05af6

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 172211
1 parent 150c3d6 commit 7e05af6

File tree

156 files changed

+8079
-195
lines changed

Some content is hidden

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

156 files changed

+8079
-195
lines changed

msgraph_beta/generated/access_reviews/access_reviews_request_builder.py

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

4949
async def get(self,request_configuration: Optional[RequestConfiguration[AccessReviewsRequestBuilderGetQueryParameters]] = None) -> Optional[AccessReviewCollectionResponse]:
5050
"""
51-
Retrieve the accessReview objects for a particular businessFlowTemplate. A list of zero or more accessReview objects are returned, for each one-time and recurring access review that was created with that business flow template. Note that business flow template IDs are case sensitive. If many access reviews match the filter, to improve efficiency and avoid timeouts, retrieve the result set in pages, by including both the $top query parameter with a page size, for example 100, and the $skip=0 query parameter in the request. These parameters can be included even when you do not anticipate that the request will span multiple pages. When a result set spans multiple pages, Microsoft Graph returns that page with an @odata.nextLink property in the response that contains a URL to the next page of results. If that property is present, continue making additional requests with the @odata.nextLink URL in each response, until all the results are returned, as described in paging Microsoft Graph data in your app. The accessReview objects returned by this API will not include nested structure properties such as settings, or relationships. To retrieve an access review settings or relationships, use the get accessReview API.
51+
Retrieve the accessReview objects for a particular businessFlowTemplate. A list of zero or more accessReview objects are returned, for each one-time and recurring access review that was created with that business flow template. Business flow template IDs are case sensitive. If many access reviews match the filter, to improve efficiency and avoid timeouts, retrieve the result set in pages, by including both the $top query parameter with a page size, for example 100, and the $skip=0 query parameter in the request. These parameters can be included even when you don't anticipate that the request spans multiple pages. When a result set spans multiple pages, Microsoft Graph returns that page with an @odata.nextLink property in the response that contains a URL to the next page of results. If that property is present, continue making requests with the @odata.nextLink URL in each response, until all the results are returned, as described in paging Microsoft Graph data in your app. The accessReview objects returned by this API don't include nested structure properties such as settings, or relationships. To retrieve an access review settings or relationships, use the get accessReview API.
5252
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5353
Returns: Optional[AccessReviewCollectionResponse]
5454
Find more info here: https://learn.microsoft.com/graph/api/accessreview-list?view=graph-rest-beta
@@ -93,7 +93,7 @@ async def post(self,body: AccessReview, request_configuration: Optional[RequestC
9393

9494
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AccessReviewsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
9595
"""
96-
Retrieve the accessReview objects for a particular businessFlowTemplate. A list of zero or more accessReview objects are returned, for each one-time and recurring access review that was created with that business flow template. Note that business flow template IDs are case sensitive. If many access reviews match the filter, to improve efficiency and avoid timeouts, retrieve the result set in pages, by including both the $top query parameter with a page size, for example 100, and the $skip=0 query parameter in the request. These parameters can be included even when you do not anticipate that the request will span multiple pages. When a result set spans multiple pages, Microsoft Graph returns that page with an @odata.nextLink property in the response that contains a URL to the next page of results. If that property is present, continue making additional requests with the @odata.nextLink URL in each response, until all the results are returned, as described in paging Microsoft Graph data in your app. The accessReview objects returned by this API will not include nested structure properties such as settings, or relationships. To retrieve an access review settings or relationships, use the get accessReview API.
96+
Retrieve the accessReview objects for a particular businessFlowTemplate. A list of zero or more accessReview objects are returned, for each one-time and recurring access review that was created with that business flow template. Business flow template IDs are case sensitive. If many access reviews match the filter, to improve efficiency and avoid timeouts, retrieve the result set in pages, by including both the $top query parameter with a page size, for example 100, and the $skip=0 query parameter in the request. These parameters can be included even when you don't anticipate that the request spans multiple pages. When a result set spans multiple pages, Microsoft Graph returns that page with an @odata.nextLink property in the response that contains a URL to the next page of results. If that property is present, continue making requests with the @odata.nextLink URL in each response, until all the results are returned, as described in paging Microsoft Graph data in your app. The accessReview objects returned by this API don't include nested structure properties such as settings, or relationships. To retrieve an access review settings or relationships, use the get accessReview API.
9797
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
9898
Returns: RequestInformation
9999
"""
@@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder:
139139
@dataclass
140140
class AccessReviewsRequestBuilderGetQueryParameters():
141141
"""
142-
Retrieve the accessReview objects for a particular businessFlowTemplate. A list of zero or more accessReview objects are returned, for each one-time and recurring access review that was created with that business flow template. Note that business flow template IDs are case sensitive. If many access reviews match the filter, to improve efficiency and avoid timeouts, retrieve the result set in pages, by including both the $top query parameter with a page size, for example 100, and the $skip=0 query parameter in the request. These parameters can be included even when you do not anticipate that the request will span multiple pages. When a result set spans multiple pages, Microsoft Graph returns that page with an @odata.nextLink property in the response that contains a URL to the next page of results. If that property is present, continue making additional requests with the @odata.nextLink URL in each response, until all the results are returned, as described in paging Microsoft Graph data in your app. The accessReview objects returned by this API will not include nested structure properties such as settings, or relationships. To retrieve an access review settings or relationships, use the get accessReview API.
142+
Retrieve the accessReview objects for a particular businessFlowTemplate. A list of zero or more accessReview objects are returned, for each one-time and recurring access review that was created with that business flow template. Business flow template IDs are case sensitive. If many access reviews match the filter, to improve efficiency and avoid timeouts, retrieve the result set in pages, by including both the $top query parameter with a page size, for example 100, and the $skip=0 query parameter in the request. These parameters can be included even when you don't anticipate that the request spans multiple pages. When a result set spans multiple pages, Microsoft Graph returns that page with an @odata.nextLink property in the response that contains a URL to the next page of results. If that property is present, continue making requests with the @odata.nextLink URL in each response, until all the results are returned, as described in paging Microsoft Graph data in your app. The accessReview objects returned by this API don't include nested structure properties such as settings, or relationships. To retrieve an access review settings or relationships, use the get accessReview API.
143143
"""
144144
def get_query_parameter(self,original_name: str) -> str:
145145
"""

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query
5454

5555
async def get(self,request_configuration: Optional[RequestConfiguration[UpdatableAssetItemRequestBuilderGetQueryParameters]] = None) -> Optional[UpdatableAsset]:
5656
"""
57-
Read the properties and relationships of an updatableAsset object.
57+
Read the properties and relationships of an updatableAssetGroup object.
5858
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5959
Returns: Optional[UpdatableAsset]
60-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-get?view=graph-rest-beta
60+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-get?view=graph-rest-beta
6161
"""
6262
request_info = self.to_get_request_information(
6363
request_configuration
@@ -109,7 +109,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo
109109

110110
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[UpdatableAssetItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
111111
"""
112-
Read the properties and relationships of an updatableAsset object.
112+
Read the properties and relationships of an updatableAssetGroup object.
113113
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
114114
Returns: RequestInformation
115115
"""
@@ -189,7 +189,7 @@ class UpdatableAssetItemRequestBuilderDeleteRequestConfiguration(RequestConfigur
189189
@dataclass
190190
class UpdatableAssetItemRequestBuilderGetQueryParameters():
191191
"""
192-
Read the properties and relationships of an updatableAsset object.
192+
Read the properties and relationships of an updatableAssetGroup object.
193193
"""
194194
def get_query_parameter(self,original_name: str) -> str:
195195
"""

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
@@ -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 a complianceChange object.
35+
Delete a contentApproval 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-compliancechange-delete?view=graph-rest-beta
38+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-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[ComplianceChangeItemRequestBuilderGetQueryParameters]] = None) -> Optional[ComplianceChange]:
5353
"""
54-
Read the properties and relationships of a complianceChange object.
54+
Read the properties and relationships of a contentApproval object.
5555
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5656
Returns: Optional[ComplianceChange]
57-
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-get?view=graph-rest-beta
57+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-get?view=graph-rest-beta
5858
"""
5959
request_info = self.to_get_request_information(
6060
request_configuration
@@ -96,7 +96,7 @@ async def patch(self,body: ComplianceChange, request_configuration: Optional[Req
9696

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

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

msgraph_beta/generated/administrative_units/item/administrative_unit_item_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 .check_member_groups.check_member_groups_request_builder import CheckMemberGroupsRequestBuilder
1919
from .check_member_objects.check_member_objects_request_builder import CheckMemberObjectsRequestBuilder
20+
from .deleted_members.deleted_members_request_builder import DeletedMembersRequestBuilder
2021
from .extensions.extensions_request_builder import ExtensionsRequestBuilder
2122
from .get_member_groups.get_member_groups_request_builder import GetMemberGroupsRequestBuilder
2223
from .get_member_objects.get_member_objects_request_builder import GetMemberObjectsRequestBuilder
@@ -166,6 +167,15 @@ def check_member_objects(self) -> CheckMemberObjectsRequestBuilder:
166167

167168
return CheckMemberObjectsRequestBuilder(self.request_adapter, self.path_parameters)
168169

170+
@property
171+
def deleted_members(self) -> DeletedMembersRequestBuilder:
172+
"""
173+
Provides operations to manage the deletedMembers property of the microsoft.graph.administrativeUnit entity.
174+
"""
175+
from .deleted_members.deleted_members_request_builder import DeletedMembersRequestBuilder
176+
177+
return DeletedMembersRequestBuilder(self.request_adapter, self.path_parameters)
178+
169179
@property
170180
def extensions(self) -> ExtensionsRequestBuilder:
171181
"""
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
from __future__ import annotations
2+
from dataclasses import dataclass, field
3+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
4+
from kiota_abstractions.base_request_configuration import RequestConfiguration
5+
from kiota_abstractions.default_query_parameters import QueryParameters
6+
from kiota_abstractions.get_path_parameters import get_path_parameters
7+
from kiota_abstractions.method import Method
8+
from kiota_abstractions.request_adapter import RequestAdapter
9+
from kiota_abstractions.request_information import RequestInformation
10+
from kiota_abstractions.request_option import RequestOption
11+
from kiota_abstractions.serialization import Parsable, ParsableFactory
12+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
13+
from warnings import warn
14+
15+
if TYPE_CHECKING:
16+
from .....models.o_data_errors.o_data_error import ODataError
17+
18+
class CountRequestBuilder(BaseRequestBuilder):
19+
"""
20+
Provides operations to count the resources in the collection.
21+
"""
22+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
23+
"""
24+
Instantiates a new CountRequestBuilder and sets the default values.
25+
param path_parameters: The raw url or the url-template parameters for the request.
26+
param request_adapter: The request adapter to use to execute the requests.
27+
Returns: None
28+
"""
29+
super().__init__(request_adapter, "{+baseurl}/administrativeUnits/{administrativeUnit%2Did}/deletedMembers/$count{?%24filter,%24search}", path_parameters)
30+
31+
async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]:
32+
"""
33+
Get the number of the resource
34+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
35+
Returns: Optional[int]
36+
"""
37+
request_info = self.to_get_request_information(
38+
request_configuration
39+
)
40+
from .....models.o_data_errors.o_data_error import ODataError
41+
42+
error_mapping: Dict[str, type[ParsableFactory]] = {
43+
"XXX": ODataError,
44+
}
45+
if not self.request_adapter:
46+
raise Exception("Http core is null")
47+
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
48+
49+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
50+
"""
51+
Get the number of the resource
52+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
53+
Returns: RequestInformation
54+
"""
55+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
56+
request_info.configure(request_configuration)
57+
request_info.headers.try_add("Accept", "text/plain;q=0.9")
58+
return request_info
59+
60+
def with_url(self,raw_url: str) -> CountRequestBuilder:
61+
"""
62+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
63+
param raw_url: The raw URL to use for the request builder.
64+
Returns: CountRequestBuilder
65+
"""
66+
if raw_url is None:
67+
raise TypeError("raw_url cannot be null.")
68+
return CountRequestBuilder(self.request_adapter, raw_url)
69+
70+
@dataclass
71+
class CountRequestBuilderGetQueryParameters():
72+
"""
73+
Get the number of the resource
74+
"""
75+
def get_query_parameter(self,original_name: str) -> str:
76+
"""
77+
Maps the query parameters names to their encoded names for the URI template parsing.
78+
param original_name: The original query parameter name in the class.
79+
Returns: str
80+
"""
81+
if original_name is None:
82+
raise TypeError("original_name cannot be null.")
83+
if original_name == "filter":
84+
return "%24filter"
85+
if original_name == "search":
86+
return "%24search"
87+
return original_name
88+
89+
# Filter items by property values
90+
filter: Optional[str] = None
91+
92+
# Search items by search phrases
93+
search: Optional[str] = None
94+
95+
96+
@dataclass
97+
class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]):
98+
"""
99+
Configuration for the request such as headers, query parameters, and middleware options.
100+
"""
101+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
102+
103+

0 commit comments

Comments
 (0)