Skip to content

Commit 40b9c54

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 201423
1 parent dcf585a commit 40b9c54

18 files changed

+1375
-4
lines changed

msgraph/generated/kiota-dom-export.txt

Lines changed: 146 additions & 0 deletions
Large diffs are not rendered by default.

msgraph/generated/kiota-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"descriptionHash": "B2FA7ABF690E531FF817BF174D140C84D65DAFBDEC961456F9DF7C5784E7FC3924A73B0A460D7ED81C7410B436708443A6FE16075FB72AC2AA98FB1A7AE637E4",
2+
"descriptionHash": "4A7676FDCEE3F1E69B32FDB0B878451D5F47293C7C1951863D16AF34DF176DFEC21F6F78BF87686D80E6CA242C16163E664975627C2AD62F8E982901C96A2A29",
33
"descriptionLocation": "../../msgraph-metadata/clean_v10_openapi/openapi.yaml",
44
"lockFileVersion": "1.0.0",
55
"kiotaVersion": "1.29.0",

msgraph/generated/models/application_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
@dataclass
1313
class ApplicationTemplate(Entity, Parsable):
14-
# The list of categories for the application. Supported values can be: Collaboration, Business Management, Consumer, Content management, CRM, Data services, Developer services, E-commerce, Education, ERP, Finance, Health, Human resources, IT infrastructure, Mail, Management, Marketing, Media, Productivity, Project management, Telecommunications, Tools, Travel, and Web design & hosting.
14+
# The list of categories for the application. Supported values can be: Collaboration, Business Management, Consumer, Content management, CRM, Data services, Developer services, E-commerce, Education, ERP, Finance, Health, Human resources, IT infrastructure, Mail, Management, Marketing, Media, Productivity, Project management, Telecommunications, Tools, Travel, and Web design & hosting. Supports $filter (contains).
1515
categories: Optional[list[str]] = None
1616
# A description of the application.
1717
description: Optional[str] = None
18-
# The name of the application.
18+
# The name of the application. Supports $filter (contains).
1919
display_name: Optional[str] = None
2020
# The home page URL of the application.
2121
home_page_url: Optional[str] = None

msgraph/generated/models/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Message(OutlookItem, Parsable):
8686
to_recipients: Optional[list[Recipient]] = None
8787
# The part of the body of the message that is unique to the current message. uniqueBody is not returned by default but can be retrieved for a given message by use of the ?$select=uniqueBody query. It can be in HTML or text format.
8888
unique_body: Optional[ItemBody] = None
89-
# The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame.
89+
# The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame.NOTE: When using this URL to access a message from a mailbox with delegate permissions, both the signed-in user and the target mailbox must be in the same database region. For example, an error is returned when a user with a mailbox in the EUR (Europe) region attempts to access messages from a mailbox in the NAM (North America) region.
9090
web_link: Optional[str] = None
9191

9292
@staticmethod

msgraph/generated/models/user.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from .calendar_group import CalendarGroup
1717
from .chat import Chat
1818
from .cloud_clipboard_root import CloudClipboardRoot
19+
from .cloud_p_c import CloudPC
1920
from .contact import Contact
2021
from .contact_folder import ContactFolder
2122
from .custom_security_attribute_value import CustomSecurityAttributeValue
@@ -109,6 +110,8 @@ class User(DirectoryObject, Parsable):
109110
city: Optional[str] = None
110111
# The cloudClipboard property
111112
cloud_clipboard: Optional[CloudClipboardRoot] = None
113+
# The user's Cloud PCs. Read-only. Nullable.
114+
cloud_p_cs: Optional[list[CloudPC]] = None
112115
# The name of the company that the user is associated with. This property can be useful for describing the company that a guest comes from. The maximum length is 64 characters.Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values).
113116
company_name: Optional[str] = None
114117
# Sets whether consent was obtained for minors. Allowed values: null, Granted, Denied, and NotRequired. For more information, see legal age group property definitions. Returned only on $select. Supports $filter (eq, ne, not, and in).
@@ -358,6 +361,7 @@ def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
358361
from .calendar_group import CalendarGroup
359362
from .chat import Chat
360363
from .cloud_clipboard_root import CloudClipboardRoot
364+
from .cloud_p_c import CloudPC
361365
from .contact import Contact
362366
from .contact_folder import ContactFolder
363367
from .custom_security_attribute_value import CustomSecurityAttributeValue
@@ -414,6 +418,7 @@ def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
414418
from .calendar_group import CalendarGroup
415419
from .chat import Chat
416420
from .cloud_clipboard_root import CloudClipboardRoot
421+
from .cloud_p_c import CloudPC
417422
from .contact import Contact
418423
from .contact_folder import ContactFolder
419424
from .custom_security_attribute_value import CustomSecurityAttributeValue
@@ -480,6 +485,7 @@ def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
480485
"chats": lambda n : setattr(self, 'chats', n.get_collection_of_object_values(Chat)),
481486
"city": lambda n : setattr(self, 'city', n.get_str_value()),
482487
"cloudClipboard": lambda n : setattr(self, 'cloud_clipboard', n.get_object_value(CloudClipboardRoot)),
488+
"cloudPCs": lambda n : setattr(self, 'cloud_p_cs', n.get_collection_of_object_values(CloudPC)),
483489
"companyName": lambda n : setattr(self, 'company_name', n.get_str_value()),
484490
"consentProvidedForMinor": lambda n : setattr(self, 'consent_provided_for_minor', n.get_str_value()),
485491
"contactFolders": lambda n : setattr(self, 'contact_folders', n.get_collection_of_object_values(ContactFolder)),
@@ -624,6 +630,7 @@ def serialize(self,writer: SerializationWriter) -> None:
624630
writer.write_collection_of_object_values("chats", self.chats)
625631
writer.write_str_value("city", self.city)
626632
writer.write_object_value("cloudClipboard", self.cloud_clipboard)
633+
writer.write_collection_of_object_values("cloudPCs", self.cloud_p_cs)
627634
writer.write_str_value("companyName", self.company_name)
628635
writer.write_str_value("consentProvidedForMinor", self.consent_provided_for_minor)
629636
writer.write_collection_of_object_values("contactFolders", self.contact_folders)
Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
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.cloud_p_c import CloudPC
18+
from ....models.cloud_p_c_collection_response import CloudPCCollectionResponse
19+
from ....models.o_data_errors.o_data_error import ODataError
20+
from .count.count_request_builder import CountRequestBuilder
21+
from .item.cloud_p_c_item_request_builder import CloudPCItemRequestBuilder
22+
23+
class CloudPCsRequestBuilder(BaseRequestBuilder):
24+
"""
25+
Provides operations to manage the cloudPCs property of the microsoft.graph.user entity.
26+
"""
27+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
28+
"""
29+
Instantiates a new CloudPCsRequestBuilder and sets the default values.
30+
param path_parameters: The raw url or the url-template parameters for the request.
31+
param request_adapter: The request adapter to use to execute the requests.
32+
Returns: None
33+
"""
34+
super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/cloudPCs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
35+
36+
def by_cloud_p_c_id(self,cloud_p_c_id: str) -> CloudPCItemRequestBuilder:
37+
"""
38+
Provides operations to manage the cloudPCs property of the microsoft.graph.user entity.
39+
param cloud_p_c_id: The unique identifier of cloudPC
40+
Returns: CloudPCItemRequestBuilder
41+
"""
42+
if cloud_p_c_id is None:
43+
raise TypeError("cloud_p_c_id cannot be null.")
44+
from .item.cloud_p_c_item_request_builder import CloudPCItemRequestBuilder
45+
46+
url_tpl_params = get_path_parameters(self.path_parameters)
47+
url_tpl_params["cloudPC%2Did"] = cloud_p_c_id
48+
return CloudPCItemRequestBuilder(self.request_adapter, url_tpl_params)
49+
50+
async def get(self,request_configuration: Optional[RequestConfiguration[CloudPCsRequestBuilderGetQueryParameters]] = None) -> Optional[CloudPCCollectionResponse]:
51+
"""
52+
The user's Cloud PCs. Read-only. Nullable.
53+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
54+
Returns: Optional[CloudPCCollectionResponse]
55+
"""
56+
request_info = self.to_get_request_information(
57+
request_configuration
58+
)
59+
from ....models.o_data_errors.o_data_error import ODataError
60+
61+
error_mapping: dict[str, type[ParsableFactory]] = {
62+
"XXX": ODataError,
63+
}
64+
if not self.request_adapter:
65+
raise Exception("Http core is null")
66+
from ....models.cloud_p_c_collection_response import CloudPCCollectionResponse
67+
68+
return await self.request_adapter.send_async(request_info, CloudPCCollectionResponse, error_mapping)
69+
70+
async def post(self,body: CloudPC, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CloudPC]:
71+
"""
72+
Create new navigation property to cloudPCs for users
73+
param body: The request body
74+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
75+
Returns: Optional[CloudPC]
76+
"""
77+
if body is None:
78+
raise TypeError("body cannot be null.")
79+
request_info = self.to_post_request_information(
80+
body, request_configuration
81+
)
82+
from ....models.o_data_errors.o_data_error import ODataError
83+
84+
error_mapping: dict[str, type[ParsableFactory]] = {
85+
"XXX": ODataError,
86+
}
87+
if not self.request_adapter:
88+
raise Exception("Http core is null")
89+
from ....models.cloud_p_c import CloudPC
90+
91+
return await self.request_adapter.send_async(request_info, CloudPC, error_mapping)
92+
93+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CloudPCsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
94+
"""
95+
The user's Cloud PCs. Read-only. Nullable.
96+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
97+
Returns: RequestInformation
98+
"""
99+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
100+
request_info.configure(request_configuration)
101+
request_info.headers.try_add("Accept", "application/json")
102+
return request_info
103+
104+
def to_post_request_information(self,body: CloudPC, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
105+
"""
106+
Create new navigation property to cloudPCs for users
107+
param body: The request body
108+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
109+
Returns: RequestInformation
110+
"""
111+
if body is None:
112+
raise TypeError("body cannot be null.")
113+
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
114+
request_info.configure(request_configuration)
115+
request_info.headers.try_add("Accept", "application/json")
116+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
117+
return request_info
118+
119+
def with_url(self,raw_url: str) -> CloudPCsRequestBuilder:
120+
"""
121+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
122+
param raw_url: The raw URL to use for the request builder.
123+
Returns: CloudPCsRequestBuilder
124+
"""
125+
if raw_url is None:
126+
raise TypeError("raw_url cannot be null.")
127+
return CloudPCsRequestBuilder(self.request_adapter, raw_url)
128+
129+
@property
130+
def count(self) -> CountRequestBuilder:
131+
"""
132+
Provides operations to count the resources in the collection.
133+
"""
134+
from .count.count_request_builder import CountRequestBuilder
135+
136+
return CountRequestBuilder(self.request_adapter, self.path_parameters)
137+
138+
@dataclass
139+
class CloudPCsRequestBuilderGetQueryParameters():
140+
"""
141+
The user's Cloud PCs. Read-only. Nullable.
142+
"""
143+
def get_query_parameter(self,original_name: str) -> str:
144+
"""
145+
Maps the query parameters names to their encoded names for the URI template parsing.
146+
param original_name: The original query parameter name in the class.
147+
Returns: str
148+
"""
149+
if original_name is None:
150+
raise TypeError("original_name cannot be null.")
151+
if original_name == "count":
152+
return "%24count"
153+
if original_name == "expand":
154+
return "%24expand"
155+
if original_name == "filter":
156+
return "%24filter"
157+
if original_name == "orderby":
158+
return "%24orderby"
159+
if original_name == "search":
160+
return "%24search"
161+
if original_name == "select":
162+
return "%24select"
163+
if original_name == "skip":
164+
return "%24skip"
165+
if original_name == "top":
166+
return "%24top"
167+
return original_name
168+
169+
# Include count of items
170+
count: Optional[bool] = None
171+
172+
# Expand related entities
173+
expand: Optional[list[str]] = None
174+
175+
# Filter items by property values
176+
filter: Optional[str] = None
177+
178+
# Order items by property values
179+
orderby: Optional[list[str]] = None
180+
181+
# Search items by search phrases
182+
search: Optional[str] = None
183+
184+
# Select properties to be returned
185+
select: Optional[list[str]] = None
186+
187+
# Skip the first n items
188+
skip: Optional[int] = None
189+
190+
# Show only the first n items
191+
top: Optional[int] = None
192+
193+
194+
@dataclass
195+
class CloudPCsRequestBuilderGetRequestConfiguration(RequestConfiguration[CloudPCsRequestBuilderGetQueryParameters]):
196+
"""
197+
Configuration for the request such as headers, query parameters, and middleware options.
198+
"""
199+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
200+
201+
@dataclass
202+
class CloudPCsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]):
203+
"""
204+
Configuration for the request such as headers, query parameters, and middleware options.
205+
"""
206+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
207+
208+

0 commit comments

Comments
 (0)