Skip to content

Commit d6c8321

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 178264
1 parent 778045e commit d6c8321

File tree

225 files changed

+7524
-290
lines changed

Some content is hidden

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

225 files changed

+7524
-290
lines changed

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

Lines changed: 6 additions & 6 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 complianceChange object.
36+
Delete a contentApproval 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-compliancechange-delete?view=graph-rest-beta
39+
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-delete?view=graph-rest-beta
4040
"""
4141
request_info = self.to_delete_request_information(
4242
request_configuration
@@ -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.")
@@ -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 complianceChange object.
100+
Delete a contentApproval object.
101101
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
102102
Returns: RequestInformation
103103
"""
@@ -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

msgraph_beta/generated/administrative_units/item/check_member_groups/check_member_groups_request_builder.py

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

3434
async def post(self,body: CheckMemberGroupsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CheckMemberGroupsPostResponse]:
3535
"""
36-
Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct.
36+
Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct.
3737
param body: The request body
3838
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3939
Returns: Optional[CheckMemberGroupsPostResponse]
@@ -57,7 +57,7 @@ async def post(self,body: CheckMemberGroupsPostRequestBody, request_configuratio
5757

5858
def to_post_request_information(self,body: CheckMemberGroupsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
5959
"""
60-
Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct.
60+
Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct.
6161
param body: The request body
6262
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6363
Returns: RequestInformation

msgraph_beta/generated/app/calls/item/participants/invite/invite_request_builder.py

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

3434
async def post(self,body: InvitePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[InviteParticipantsOperation]:
3535
"""
36-
Invite participants to the active call. For more information about how to handle operations, see commsOperation.
36+
Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
3737
param body: The request body
3838
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3939
Returns: Optional[InviteParticipantsOperation]
40-
Find more info here: https://learn.microsoft.com/graph/api/participant-invite?view=graph-rest-beta
40+
Find more info here: https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-beta
4141
"""
4242
if body is None:
4343
raise TypeError("body cannot be null.")
@@ -57,7 +57,7 @@ async def post(self,body: InvitePostRequestBody, request_configuration: Optional
5757

5858
def to_post_request_information(self,body: InvitePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
5959
"""
60-
Invite participants to the active call. For more information about how to handle operations, see commsOperation.
60+
Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled.
6161
param body: The request body
6262
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6363
Returns: RequestInformation

msgraph_beta/generated/app_role_assignments/app_role_assignments_request_builder.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
from ..models.app_role_assignment_collection_response import AppRoleAssignmentCollectionResponse
1919
from ..models.o_data_errors.o_data_error import ODataError
2020
from .count.count_request_builder import CountRequestBuilder
21+
from .delta.delta_request_builder import DeltaRequestBuilder
22+
from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder
23+
from .get_user_owned_objects.get_user_owned_objects_request_builder import GetUserOwnedObjectsRequestBuilder
2124
from .item.app_role_assignment_item_request_builder import AppRoleAssignmentItemRequestBuilder
25+
from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder
2226

2327
class AppRoleAssignmentsRequestBuilder(BaseRequestBuilder):
2428
"""
@@ -135,6 +139,42 @@ def count(self) -> CountRequestBuilder:
135139

136140
return CountRequestBuilder(self.request_adapter, self.path_parameters)
137141

142+
@property
143+
def delta(self) -> DeltaRequestBuilder:
144+
"""
145+
Provides operations to call the delta method.
146+
"""
147+
from .delta.delta_request_builder import DeltaRequestBuilder
148+
149+
return DeltaRequestBuilder(self.request_adapter, self.path_parameters)
150+
151+
@property
152+
def get_by_ids(self) -> GetByIdsRequestBuilder:
153+
"""
154+
Provides operations to call the getByIds method.
155+
"""
156+
from .get_by_ids.get_by_ids_request_builder import GetByIdsRequestBuilder
157+
158+
return GetByIdsRequestBuilder(self.request_adapter, self.path_parameters)
159+
160+
@property
161+
def get_user_owned_objects(self) -> GetUserOwnedObjectsRequestBuilder:
162+
"""
163+
Provides operations to call the getUserOwnedObjects method.
164+
"""
165+
from .get_user_owned_objects.get_user_owned_objects_request_builder import GetUserOwnedObjectsRequestBuilder
166+
167+
return GetUserOwnedObjectsRequestBuilder(self.request_adapter, self.path_parameters)
168+
169+
@property
170+
def validate_properties(self) -> ValidatePropertiesRequestBuilder:
171+
"""
172+
Provides operations to call the validateProperties method.
173+
"""
174+
from .validate_properties.validate_properties_request_builder import ValidatePropertiesRequestBuilder
175+
176+
return ValidatePropertiesRequestBuilder(self.request_adapter, self.path_parameters)
177+
138178
@dataclass
139179
class AppRoleAssignmentsRequestBuilderGetQueryParameters():
140180
"""
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
from __future__ import annotations
2+
from collections.abc import Callable
3+
from dataclasses import dataclass, field
4+
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
5+
from typing import Any, Optional, TYPE_CHECKING, Union
6+
7+
if TYPE_CHECKING:
8+
from ...models.base_delta_function_response import BaseDeltaFunctionResponse
9+
from ...models.directory_object import DirectoryObject
10+
11+
from ...models.base_delta_function_response import BaseDeltaFunctionResponse
12+
13+
@dataclass
14+
class DeltaGetResponse(BaseDeltaFunctionResponse, Parsable):
15+
# The value property
16+
value: Optional[list[DirectoryObject]] = None
17+
18+
@staticmethod
19+
def create_from_discriminator_value(parse_node: ParseNode) -> DeltaGetResponse:
20+
"""
21+
Creates a new instance of the appropriate class based on discriminator value
22+
param parse_node: The parse node to use to read the discriminator value and create the object
23+
Returns: DeltaGetResponse
24+
"""
25+
if parse_node is None:
26+
raise TypeError("parse_node cannot be null.")
27+
return DeltaGetResponse()
28+
29+
def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
30+
"""
31+
The deserialization information for the current model
32+
Returns: dict[str, Callable[[ParseNode], None]]
33+
"""
34+
from ...models.base_delta_function_response import BaseDeltaFunctionResponse
35+
from ...models.directory_object import DirectoryObject
36+
37+
from ...models.base_delta_function_response import BaseDeltaFunctionResponse
38+
from ...models.directory_object import DirectoryObject
39+
40+
fields: dict[str, Callable[[Any], None]] = {
41+
"value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DirectoryObject)),
42+
}
43+
super_fields = super().get_field_deserializers()
44+
fields.update(super_fields)
45+
return fields
46+
47+
def serialize(self,writer: SerializationWriter) -> None:
48+
"""
49+
Serializes information the current object
50+
param writer: Serialization writer to use to serialize this model
51+
Returns: None
52+
"""
53+
if writer is None:
54+
raise TypeError("writer cannot be null.")
55+
super().serialize(writer)
56+
writer.write_collection_of_object_values("value", self.value)
57+
58+
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
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 .delta_get_response import DeltaGetResponse
19+
20+
class DeltaRequestBuilder(BaseRequestBuilder):
21+
"""
22+
Provides operations to call the delta method.
23+
"""
24+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25+
"""
26+
Instantiates a new DeltaRequestBuilder 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}/appRoleAssignments/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
32+
33+
async def get(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> Optional[DeltaGetResponse]:
34+
"""
35+
Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.
36+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37+
Returns: Optional[DeltaGetResponse]
38+
Find more info here: https://learn.microsoft.com/graph/api/directoryobject-delta?view=graph-rest-beta
39+
"""
40+
request_info = self.to_get_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+
from .delta_get_response import DeltaGetResponse
51+
52+
return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping)
53+
54+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
55+
"""
56+
Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.
57+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
58+
Returns: RequestInformation
59+
"""
60+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
61+
request_info.configure(request_configuration)
62+
request_info.headers.try_add("Accept", "application/json")
63+
return request_info
64+
65+
def with_url(self,raw_url: str) -> DeltaRequestBuilder:
66+
"""
67+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
68+
param raw_url: The raw URL to use for the request builder.
69+
Returns: DeltaRequestBuilder
70+
"""
71+
if raw_url is None:
72+
raise TypeError("raw_url cannot be null.")
73+
return DeltaRequestBuilder(self.request_adapter, raw_url)
74+
75+
@dataclass
76+
class DeltaRequestBuilderGetQueryParameters():
77+
"""
78+
Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.
79+
"""
80+
def get_query_parameter(self,original_name: str) -> str:
81+
"""
82+
Maps the query parameters names to their encoded names for the URI template parsing.
83+
param original_name: The original query parameter name in the class.
84+
Returns: str
85+
"""
86+
if original_name is None:
87+
raise TypeError("original_name cannot be null.")
88+
if original_name == "count":
89+
return "%24count"
90+
if original_name == "expand":
91+
return "%24expand"
92+
if original_name == "filter":
93+
return "%24filter"
94+
if original_name == "orderby":
95+
return "%24orderby"
96+
if original_name == "search":
97+
return "%24search"
98+
if original_name == "select":
99+
return "%24select"
100+
if original_name == "skip":
101+
return "%24skip"
102+
if original_name == "top":
103+
return "%24top"
104+
return original_name
105+
106+
# Include count of items
107+
count: Optional[bool] = None
108+
109+
# Expand related entities
110+
expand: Optional[list[str]] = None
111+
112+
# Filter items by property values
113+
filter: Optional[str] = None
114+
115+
# Order items by property values
116+
orderby: Optional[list[str]] = None
117+
118+
# Search items by search phrases
119+
search: Optional[str] = None
120+
121+
# Select properties to be returned
122+
select: Optional[list[str]] = None
123+
124+
# Skip the first n items
125+
skip: Optional[int] = None
126+
127+
# Show only the first n items
128+
top: Optional[int] = None
129+
130+
131+
@dataclass
132+
class DeltaRequestBuilderGetRequestConfiguration(RequestConfiguration[DeltaRequestBuilderGetQueryParameters]):
133+
"""
134+
Configuration for the request such as headers, query parameters, and middleware options.
135+
"""
136+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
137+
138+

0 commit comments

Comments
 (0)