Skip to content

Commit e60d5ba

Browse files
authored
Merge pull request #901 from microsoftgraph/v1.0/pipelinebuild/163754
Generated models and request builders
2 parents 416fccc + af495fe commit e60d5ba

File tree

620 files changed

+2118
-997
lines changed

Some content is hidden

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

620 files changed

+2118
-997
lines changed

msgraph/generated/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name_request_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
2929
Returns: None
3030
"""
3131
if isinstance(path_parameters, dict):
32-
path_parameters['name'] = str(name)
32+
path_parameters['name'] = name
3333
super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials(name='{name}'){?%24expand,%24select}", path_parameters)
3434

3535
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
from __future__ import annotations
2+
from dataclasses import dataclass, field
3+
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
4+
from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton
5+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
6+
7+
@dataclass
8+
class RestorePostRequestBody(AdditionalDataHolder, BackedModel, Parsable):
9+
# Stores model information.
10+
backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False)
11+
12+
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
13+
additional_data: Dict[str, Any] = field(default_factory=dict)
14+
# The autoReconcileProxyConflict property
15+
auto_reconcile_proxy_conflict: Optional[bool] = None
16+
17+
@staticmethod
18+
def create_from_discriminator_value(parse_node: ParseNode) -> RestorePostRequestBody:
19+
"""
20+
Creates a new instance of the appropriate class based on discriminator value
21+
param parse_node: The parse node to use to read the discriminator value and create the object
22+
Returns: RestorePostRequestBody
23+
"""
24+
if parse_node is None:
25+
raise TypeError("parse_node cannot be null.")
26+
return RestorePostRequestBody()
27+
28+
def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
29+
"""
30+
The deserialization information for the current model
31+
Returns: Dict[str, Callable[[ParseNode], None]]
32+
"""
33+
fields: Dict[str, Callable[[Any], None]] = {
34+
"autoReconcileProxyConflict": lambda n : setattr(self, 'auto_reconcile_proxy_conflict', n.get_bool_value()),
35+
}
36+
return fields
37+
38+
def serialize(self,writer: SerializationWriter) -> None:
39+
"""
40+
Serializes information the current object
41+
param writer: Serialization writer to use to serialize this model
42+
Returns: None
43+
"""
44+
if writer is None:
45+
raise TypeError("writer cannot be null.")
46+
writer.write_bool_value("autoReconcileProxyConflict", self.auto_reconcile_proxy_conflict)
47+
writer.write_additional_data_value(self.additional_data)
48+
49+

msgraph/generated/applications/item/restore/restore_request_builder.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
if TYPE_CHECKING:
1616
from ....models.directory_object import DirectoryObject
1717
from ....models.o_data_errors.o_data_error import ODataError
18+
from .restore_post_request_body import RestorePostRequestBody
1819

1920
class RestoreRequestBuilder(BaseRequestBuilder):
2021
"""
@@ -29,15 +30,18 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
2930
"""
3031
super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/restore", path_parameters)
3132

32-
async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DirectoryObject]:
33+
async def post(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DirectoryObject]:
3334
"""
34-
Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
35+
Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
36+
param body: The request body
3537
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3638
Returns: Optional[DirectoryObject]
3739
Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0
3840
"""
41+
if body is None:
42+
raise TypeError("body cannot be null.")
3943
request_info = self.to_post_request_information(
40-
request_configuration
44+
body, request_configuration
4145
)
4246
from ....models.o_data_errors.o_data_error import ODataError
4347

@@ -50,15 +54,19 @@ async def post(self,request_configuration: Optional[RequestConfiguration[QueryPa
5054

5155
return await self.request_adapter.send_async(request_info, DirectoryObject, error_mapping)
5256

53-
def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
57+
def to_post_request_information(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
5458
"""
55-
Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
59+
Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
60+
param body: The request body
5661
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5762
Returns: RequestInformation
5863
"""
64+
if body is None:
65+
raise TypeError("body cannot be null.")
5966
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
6067
request_info.configure(request_configuration)
6168
request_info.headers.try_add("Accept", "application/json")
69+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
6270
return request_info
6371

6472
def with_url(self,raw_url: str) -> RestoreRequestBuilder:

msgraph/generated/applications_with_app_id/applications_with_app_id_request_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
2929
Returns: None
3030
"""
3131
if isinstance(path_parameters, dict):
32-
path_parameters['appId'] = str(app_id)
32+
path_parameters['appId'] = app_id
3333
super().__init__(request_adapter, "{+baseurl}/applications(appId='{appId}'){?%24expand,%24select}", path_parameters)
3434

3535
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:

msgraph/generated/applications_with_unique_name/applications_with_unique_name_request_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
2929
Returns: None
3030
"""
3131
if isinstance(path_parameters, dict):
32-
path_parameters['uniqueName'] = str(unique_name)
32+
path_parameters['uniqueName'] = unique_name
3333
super().__init__(request_adapter, "{+baseurl}/applications(uniqueName='{uniqueName}'){?%24expand,%24select}", path_parameters)
3434

3535
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:

msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py

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

5151
async def get(self,request_configuration: Optional[RequestConfiguration[ConversationMemberItemRequestBuilderGetQueryParameters]] = None) -> Optional[ConversationMember]:
5252
"""
53-
Retrieve a conversationMember from a chat or channel.
53+
Retrieve a conversationMember from a chat.
5454
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5555
Returns: Optional[ConversationMember]
56-
Find more info here: https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0
56+
Find more info here: https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0
5757
"""
5858
request_info = self.to_get_request_information(
5959
request_configuration
@@ -105,7 +105,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo
105105

106106
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ConversationMemberItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
107107
"""
108-
Retrieve a conversationMember from a chat or channel.
108+
Retrieve a conversationMember from a chat.
109109
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
110110
Returns: RequestInformation
111111
"""
@@ -149,7 +149,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(RequestConf
149149
@dataclass
150150
class ConversationMemberItemRequestBuilderGetQueryParameters():
151151
"""
152-
Retrieve a conversationMember from a chat or channel.
152+
Retrieve a conversationMember from a chat.
153153
"""
154154
def get_query_parameter(self,original_name: str) -> str:
155155
"""

msgraph/generated/chats/item/messages/messages_request_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Messages
7070

7171
async def post(self,body: ChatMessage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ChatMessage]:
7272
"""
73-
Send a new chatMessage in the specified channel or a chat.
73+
Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
7474
param body: The request body
7575
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
7676
Returns: Optional[ChatMessage]
77-
Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0
77+
Find more info here: https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0
7878
"""
7979
if body is None:
8080
raise TypeError("body cannot be null.")
@@ -105,7 +105,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
105105

106106
def to_post_request_information(self,body: ChatMessage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
107107
"""
108-
Send a new chatMessage in the specified channel or a chat.
108+
Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
109109
param body: The request body
110110
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
111111
Returns: RequestInformation

msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
3131
Returns: None
3232
"""
3333
if isinstance(path_parameters, dict):
34-
path_parameters['fromDateTime'] = str(from_date_time)
35-
path_parameters['toDateTime'] = str(to_date_time)
34+
path_parameters['fromDateTime'] = from_date_time
35+
path_parameters['toDateTime'] = to_date_time
3636
super().__init__(request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24count,%24filter,%24search,%24skip,%24top}", path_parameters)
3737

3838
async def get(self,request_configuration: Optional[RequestConfiguration[MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters]] = None) -> Optional[GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse]:

msgraph/generated/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time_request_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
3131
Returns: None
3232
"""
3333
if isinstance(path_parameters, dict):
34-
path_parameters['fromDateTime'] = str(from_date_time)
35-
path_parameters['toDateTime'] = str(to_date_time)
34+
path_parameters['fromDateTime'] = from_date_time
35+
path_parameters['toDateTime'] = to_date_time
3636
super().__init__(request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24count,%24filter,%24search,%24skip,%24top}", path_parameters)
3737

3838
async def get(self,request_configuration: Optional[RequestConfiguration[MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters]] = None) -> Optional[GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse]:

msgraph/generated/communications/calls/item/participants/invite/invite_request_builder.py

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

3333
async def post(self,body: InvitePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[InviteParticipantsOperation]:
3434
"""
35-
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.
35+
Invite participants to the active call. For more information about how to handle operations, see commsOperation.
3636
param body: The request body
3737
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3838
Returns: Optional[InviteParticipantsOperation]
39-
Find more info here: https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0
39+
Find more info here: https://learn.microsoft.com/graph/api/participant-invite?view=graph-rest-1.0
4040
"""
4141
if body is None:
4242
raise TypeError("body cannot be null.")
@@ -56,7 +56,7 @@ async def post(self,body: InvitePostRequestBody, request_configuration: Optional
5656

5757
def to_post_request_information(self,body: InvitePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
5858
"""
59-
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.
59+
Invite participants to the active call. For more information about how to handle operations, see commsOperation.
6060
param body: The request body
6161
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6262
Returns: RequestInformation

0 commit comments

Comments
 (0)