Skip to content

Commit 8377b99

Browse files
authored
Merge pull request #1366 from microsoftgraph/v1.0/pipelinebuild/199559
Generated models and request builders
2 parents 37cc34c + 6fc8672 commit 8377b99

File tree

148 files changed

+10372
-477
lines changed

Some content is hidden

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

148 files changed

+10372
-477
lines changed

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

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

7272
async def post(self,body: ChatMessage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ChatMessage]:
7373
"""
74-
Send a new chatMessage in the specified channel or a chat.
74+
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.
7575
param body: The request body
7676
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
7777
Returns: Optional[ChatMessage]
78-
Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0
78+
Find more info here: https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0
7979
"""
8080
if body is None:
8181
raise TypeError("body cannot be null.")
@@ -106,7 +106,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
106106

107107
def to_post_request_information(self,body: ChatMessage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
108108
"""
109-
Send a new chatMessage in the specified channel or a chat.
109+
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.
110110
param body: The request body
111111
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
112112
Returns: RequestInformation

msgraph/generated/communications/communications_request_builder.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
from ..models.o_data_errors.o_data_error import ODataError
1919
from .calls.calls_request_builder import CallsRequestBuilder
2020
from .call_records.call_records_request_builder import CallRecordsRequestBuilder
21+
from .get_all_online_meeting_messages.get_all_online_meeting_messages_request_builder import GetAllOnlineMeetingMessagesRequestBuilder
2122
from .get_presences_by_user_id.get_presences_by_user_id_request_builder import GetPresencesByUserIdRequestBuilder
2223
from .online_meetings.online_meetings_request_builder import OnlineMeetingsRequestBuilder
24+
from .online_meeting_conversations.online_meeting_conversations_request_builder import OnlineMeetingConversationsRequestBuilder
2325
from .presences.presences_request_builder import PresencesRequestBuilder
2426

2527
class CommunicationsRequestBuilder(BaseRequestBuilder):
@@ -58,7 +60,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Communic
5860
async def patch(self,body: CloudCommunications, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CloudCommunications]:
5961
"""
6062
Update communications
61-
param body: The request body
63+
param body: Represents a container that exposes navigation properties for cloud communications resources.
6264
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
6365
Returns: Optional[CloudCommunications]
6466
"""
@@ -92,7 +94,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
9294
def to_patch_request_information(self,body: CloudCommunications, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
9395
"""
9496
Update communications
95-
param body: The request body
97+
param body: Represents a container that exposes navigation properties for cloud communications resources.
9698
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
9799
Returns: RequestInformation
98100
"""
@@ -132,6 +134,15 @@ def calls(self) -> CallsRequestBuilder:
132134

133135
return CallsRequestBuilder(self.request_adapter, self.path_parameters)
134136

137+
@property
138+
def get_all_online_meeting_messages(self) -> GetAllOnlineMeetingMessagesRequestBuilder:
139+
"""
140+
Provides operations to call the getAllOnlineMeetingMessages method.
141+
"""
142+
from .get_all_online_meeting_messages.get_all_online_meeting_messages_request_builder import GetAllOnlineMeetingMessagesRequestBuilder
143+
144+
return GetAllOnlineMeetingMessagesRequestBuilder(self.request_adapter, self.path_parameters)
145+
135146
@property
136147
def get_presences_by_user_id(self) -> GetPresencesByUserIdRequestBuilder:
137148
"""
@@ -141,6 +152,15 @@ def get_presences_by_user_id(self) -> GetPresencesByUserIdRequestBuilder:
141152

142153
return GetPresencesByUserIdRequestBuilder(self.request_adapter, self.path_parameters)
143154

155+
@property
156+
def online_meeting_conversations(self) -> OnlineMeetingConversationsRequestBuilder:
157+
"""
158+
Provides operations to manage the onlineMeetingConversations property of the microsoft.graph.cloudCommunications entity.
159+
"""
160+
from .online_meeting_conversations.online_meeting_conversations_request_builder import OnlineMeetingConversationsRequestBuilder
161+
162+
return OnlineMeetingConversationsRequestBuilder(self.request_adapter, self.path_parameters)
163+
144164
@property
145165
def online_meetings(self) -> OnlineMeetingsRequestBuilder:
146166
"""
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_collection_pagination_count_response import BaseCollectionPaginationCountResponse
9+
from ...models.engagement_conversation_message import EngagementConversationMessage
10+
11+
from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
12+
13+
@dataclass
14+
class GetAllOnlineMeetingMessagesGetResponse(BaseCollectionPaginationCountResponse, Parsable):
15+
# The value property
16+
value: Optional[list[EngagementConversationMessage]] = None
17+
18+
@staticmethod
19+
def create_from_discriminator_value(parse_node: ParseNode) -> GetAllOnlineMeetingMessagesGetResponse:
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: GetAllOnlineMeetingMessagesGetResponse
24+
"""
25+
if parse_node is None:
26+
raise TypeError("parse_node cannot be null.")
27+
return GetAllOnlineMeetingMessagesGetResponse()
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_collection_pagination_count_response import BaseCollectionPaginationCountResponse
35+
from ...models.engagement_conversation_message import EngagementConversationMessage
36+
37+
from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
38+
from ...models.engagement_conversation_message import EngagementConversationMessage
39+
40+
fields: dict[str, Callable[[Any], None]] = {
41+
"value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(EngagementConversationMessage)),
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 .get_all_online_meeting_messages_get_response import GetAllOnlineMeetingMessagesGetResponse
19+
20+
class GetAllOnlineMeetingMessagesRequestBuilder(BaseRequestBuilder):
21+
"""
22+
Provides operations to call the getAllOnlineMeetingMessages method.
23+
"""
24+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25+
"""
26+
Instantiates a new GetAllOnlineMeetingMessagesRequestBuilder 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}/communications/getAllOnlineMeetingMessages(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
32+
33+
async def get(self,request_configuration: Optional[RequestConfiguration[GetAllOnlineMeetingMessagesRequestBuilderGetQueryParameters]] = None) -> Optional[GetAllOnlineMeetingMessagesGetResponse]:
34+
"""
35+
Get all Teams question and answer (Q&A) conversation messages in a tenant. This function returns a snapshot of all Q&A activity in JSON format. The export includes:- The original question or discussion text- The user who posted the message- All replies and responders- Vote counts- Moderation status (pending or dismissed)- Private replies- The meeting ID and organizer ID that are used for mapping to meeting metadata.
36+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37+
Returns: Optional[GetAllOnlineMeetingMessagesGetResponse]
38+
Find more info here: https://learn.microsoft.com/graph/api/cloudcommunications-getallonlinemeetingmessages?view=graph-rest-1.0
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 .get_all_online_meeting_messages_get_response import GetAllOnlineMeetingMessagesGetResponse
51+
52+
return await self.request_adapter.send_async(request_info, GetAllOnlineMeetingMessagesGetResponse, error_mapping)
53+
54+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GetAllOnlineMeetingMessagesRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
55+
"""
56+
Get all Teams question and answer (Q&A) conversation messages in a tenant. This function returns a snapshot of all Q&A activity in JSON format. The export includes:- The original question or discussion text- The user who posted the message- All replies and responders- Vote counts- Moderation status (pending or dismissed)- Private replies- The meeting ID and organizer ID that are used for mapping to meeting metadata.
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) -> GetAllOnlineMeetingMessagesRequestBuilder:
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: GetAllOnlineMeetingMessagesRequestBuilder
70+
"""
71+
if raw_url is None:
72+
raise TypeError("raw_url cannot be null.")
73+
return GetAllOnlineMeetingMessagesRequestBuilder(self.request_adapter, raw_url)
74+
75+
@dataclass
76+
class GetAllOnlineMeetingMessagesRequestBuilderGetQueryParameters():
77+
"""
78+
Get all Teams question and answer (Q&A) conversation messages in a tenant. This function returns a snapshot of all Q&A activity in JSON format. The export includes:- The original question or discussion text- The user who posted the message- All replies and responders- Vote counts- Moderation status (pending or dismissed)- Private replies- The meeting ID and organizer ID that are used for mapping to meeting metadata.
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 GetAllOnlineMeetingMessagesRequestBuilderGetRequestConfiguration(RequestConfiguration[GetAllOnlineMeetingMessagesRequestBuilderGetQueryParameters]):
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+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d
2727
param request_adapter: The request adapter to use to execute the requests.
2828
Returns: None
2929
"""
30-
super().__init__(request_adapter, "{+baseurl}/deviceManagement/telecomExpenseManagementPartners/$count{?%24filter,%24search}", path_parameters)
30+
super().__init__(request_adapter, "{+baseurl}/communications/onlineMeetingConversations/$count{?%24filter,%24search}", path_parameters)
3131

3232
async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]:
3333
"""

0 commit comments

Comments
 (0)