Skip to content

Commit 8785258

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 199349
1 parent 6a02494 commit 8785258

File tree

52 files changed

+304
-211
lines changed

Some content is hidden

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

52 files changed

+304
-211
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/contacts/contacts_request_builder.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d
3434
param request_adapter: The request adapter to use to execute the requests.
3535
Returns: None
3636
"""
37-
super().__init__(request_adapter, "{+baseurl}/contacts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24top}", path_parameters)
37+
super().__init__(request_adapter, "{+baseurl}/contacts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
3838

3939
def by_org_contact_id(self,org_contact_id: str) -> OrgContactItemRequestBuilder:
4040
"""
@@ -162,6 +162,8 @@ def get_query_parameter(self,original_name: str) -> str:
162162
return "%24search"
163163
if original_name == "select":
164164
return "%24select"
165+
if original_name == "skip":
166+
return "%24skip"
165167
if original_name == "top":
166168
return "%24top"
167169
return original_name
@@ -184,6 +186,9 @@ def get_query_parameter(self,original_name: str) -> str:
184186
# Select properties to be returned
185187
select: Optional[list[str]] = None
186188

189+
# Skip the first n items
190+
skip: Optional[int] = None
191+
187192
# Show only the first n items
188193
top: Optional[int] = None
189194

msgraph/generated/contacts/item/org_contact_item_request_builder.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d
4141
"""
4242
super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}{?%24expand,%24select}", path_parameters)
4343

44+
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
45+
"""
46+
Delete entity from contacts
47+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
48+
Returns: None
49+
"""
50+
request_info = self.to_delete_request_information(
51+
request_configuration
52+
)
53+
from ...models.o_data_errors.o_data_error import ODataError
54+
55+
error_mapping: dict[str, type[ParsableFactory]] = {
56+
"XXX": ODataError,
57+
}
58+
if not self.request_adapter:
59+
raise Exception("Http core is null")
60+
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)
61+
4462
async def get(self,request_configuration: Optional[RequestConfiguration[OrgContactItemRequestBuilderGetQueryParameters]] = None) -> Optional[OrgContact]:
4563
"""
4664
Get the properties and relationships of an organizational contact.
@@ -62,6 +80,40 @@ async def get(self,request_configuration: Optional[RequestConfiguration[OrgConta
6280

6381
return await self.request_adapter.send_async(request_info, OrgContact, error_mapping)
6482

83+
async def patch(self,body: OrgContact, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[OrgContact]:
84+
"""
85+
Update entity in contacts
86+
param body: The request body
87+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
88+
Returns: Optional[OrgContact]
89+
"""
90+
if body is None:
91+
raise TypeError("body cannot be null.")
92+
request_info = self.to_patch_request_information(
93+
body, request_configuration
94+
)
95+
from ...models.o_data_errors.o_data_error import ODataError
96+
97+
error_mapping: dict[str, type[ParsableFactory]] = {
98+
"XXX": ODataError,
99+
}
100+
if not self.request_adapter:
101+
raise Exception("Http core is null")
102+
from ...models.org_contact import OrgContact
103+
104+
return await self.request_adapter.send_async(request_info, OrgContact, error_mapping)
105+
106+
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
107+
"""
108+
Delete entity from contacts
109+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
110+
Returns: RequestInformation
111+
"""
112+
request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters)
113+
request_info.configure(request_configuration)
114+
request_info.headers.try_add("Accept", "application/json")
115+
return request_info
116+
65117
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[OrgContactItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
66118
"""
67119
Get the properties and relationships of an organizational contact.
@@ -73,6 +125,21 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
73125
request_info.headers.try_add("Accept", "application/json")
74126
return request_info
75127

128+
def to_patch_request_information(self,body: OrgContact, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
129+
"""
130+
Update entity in contacts
131+
param body: The request body
132+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
133+
Returns: RequestInformation
134+
"""
135+
if body is None:
136+
raise TypeError("body cannot be null.")
137+
request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters)
138+
request_info.configure(request_configuration)
139+
request_info.headers.try_add("Accept", "application/json")
140+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
141+
return request_info
142+
76143
def with_url(self,raw_url: str) -> OrgContactItemRequestBuilder:
77144
"""
78145
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
@@ -182,6 +249,13 @@ def transitive_member_of(self) -> TransitiveMemberOfRequestBuilder:
182249

183250
return TransitiveMemberOfRequestBuilder(self.request_adapter, self.path_parameters)
184251

252+
@dataclass
253+
class OrgContactItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
254+
"""
255+
Configuration for the request such as headers, query parameters, and middleware options.
256+
"""
257+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
258+
185259
@dataclass
186260
class OrgContactItemRequestBuilderGetQueryParameters():
187261
"""
@@ -215,4 +289,11 @@ class OrgContactItemRequestBuilderGetRequestConfiguration(RequestConfiguration[O
215289
"""
216290
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
217291

292+
@dataclass
293+
class OrgContactItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]):
294+
"""
295+
Configuration for the request such as headers, query parameters, and middleware options.
296+
"""
297+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
298+
218299

msgraph/generated/device_app_management/device_app_management_request_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceAp
5151
Read properties and relationships of the deviceAppManagement object.
5252
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5353
Returns: Optional[DeviceAppManagement]
54-
Find more info here: https://learn.microsoft.com/graph/api/intune-policyset-deviceappmanagement-get?view=graph-rest-1.0
54+
Find more info here: https://learn.microsoft.com/graph/api/intune-apps-deviceappmanagement-get?view=graph-rest-1.0
5555
"""
5656
request_info = self.to_get_request_information(
5757
request_configuration

msgraph/generated/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.py

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

5252
async def get(self,request_configuration: Optional[RequestConfiguration[ManagedAppPolicyItemRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedAppPolicy]:
5353
"""
54-
Read properties and relationships of the windowsInformationProtection object.
54+
Read properties and relationships of the managedAppConfiguration object.
5555
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5656
Returns: Optional[ManagedAppPolicy]
57-
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-windowsinformationprotection-get?view=graph-rest-1.0
57+
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappconfiguration-get?view=graph-rest-1.0
5858
"""
5959
request_info = self.to_get_request_information(
6060
request_configuration
@@ -106,7 +106,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo
106106

107107
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppPolicyItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
108108
"""
109-
Read properties and relationships of the windowsInformationProtection object.
109+
Read properties and relationships of the managedAppConfiguration object.
110110
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
111111
Returns: RequestInformation
112112
"""
@@ -159,7 +159,7 @@ class ManagedAppPolicyItemRequestBuilderDeleteRequestConfiguration(RequestConfig
159159
@dataclass
160160
class ManagedAppPolicyItemRequestBuilderGetQueryParameters():
161161
"""
162-
Read properties and relationships of the windowsInformationProtection object.
162+
Read properties and relationships of the managedAppConfiguration object.
163163
"""
164164
def get_query_parameter(self,original_name: str) -> str:
165165
"""

msgraph/generated/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async def post(self,body: TargetAppsPostRequestBody, request_configuration: Opti
3636
param body: The request body
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/intune-mam-targetedmanagedappprotection-targetapps?view=graph-rest-1.0
39+
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0
4040
"""
4141
if body is None:
4242
raise TypeError("body cannot be null.")

msgraph/generated/device_app_management/managed_app_policies/managed_app_policies_request_builder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ def by_managed_app_policy_id(self,managed_app_policy_id: str) -> ManagedAppPolic
4949

5050
async def get(self,request_configuration: Optional[RequestConfiguration[ManagedAppPoliciesRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedAppPolicyCollectionResponse]:
5151
"""
52-
List properties and relationships of the managedAppProtection objects.
52+
List properties and relationships of the managedAppConfiguration objects.
5353
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5454
Returns: Optional[ManagedAppPolicyCollectionResponse]
55-
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-list?view=graph-rest-1.0
55+
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappconfiguration-list?view=graph-rest-1.0
5656
"""
5757
request_info = self.to_get_request_information(
5858
request_configuration
@@ -93,7 +93,7 @@ async def post(self,body: ManagedAppPolicy, request_configuration: Optional[Requ
9393

9494
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppPoliciesRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
9595
"""
96-
List properties and relationships of the managedAppProtection objects.
96+
List properties and relationships of the managedAppConfiguration objects.
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 ManagedAppPoliciesRequestBuilderGetQueryParameters():
141141
"""
142-
List properties and relationships of the managedAppProtection objects.
142+
List properties and relationships of the managedAppConfiguration objects.
143143
"""
144144
def get_query_parameter(self,original_name: str) -> str:
145145
"""

msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async def post(self,body: TargetAppsPostRequestBody, request_configuration: Opti
3636
param body: The request body
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/intune-mam-targetedmanagedappprotection-targetapps?view=graph-rest-1.0
39+
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0
4040
"""
4141
if body is None:
4242
raise TypeError("body cannot be null.")

msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async def post(self,body: TargetAppsPostRequestBody, request_configuration: Opti
3636
param body: The request body
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/intune-mam-targetedmanagedappprotection-targetapps?view=graph-rest-1.0
39+
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0
4040
"""
4141
if body is None:
4242
raise TypeError("body cannot be null.")

msgraph/generated/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ def by_managed_app_registration_id(self,managed_app_registration_id: str) -> Man
5050

5151
async def get(self,request_configuration: Optional[RequestConfiguration[ManagedAppRegistrationsRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedAppRegistrationCollectionResponse]:
5252
"""
53-
List properties and relationships of the iosManagedAppRegistration objects.
53+
List properties and relationships of the androidManagedAppRegistration objects.
5454
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5555
Returns: Optional[ManagedAppRegistrationCollectionResponse]
56-
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-iosmanagedappregistration-list?view=graph-rest-1.0
56+
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-androidmanagedappregistration-list?view=graph-rest-1.0
5757
"""
5858
request_info = self.to_get_request_information(
5959
request_configuration
@@ -95,7 +95,7 @@ async def post(self,body: ManagedAppRegistration, request_configuration: Optiona
9595

9696
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppRegistrationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
9797
"""
98-
List properties and relationships of the iosManagedAppRegistration objects.
98+
List properties and relationships of the androidManagedAppRegistration objects.
9999
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
100100
Returns: RequestInformation
101101
"""
@@ -150,7 +150,7 @@ def get_user_ids_with_flagged_app_registration(self) -> GetUserIdsWithFlaggedApp
150150
@dataclass
151151
class ManagedAppRegistrationsRequestBuilderGetQueryParameters():
152152
"""
153-
List properties and relationships of the iosManagedAppRegistration objects.
153+
List properties and relationships of the androidManagedAppRegistration objects.
154154
"""
155155
def get_query_parameter(self,original_name: str) -> str:
156156
"""

0 commit comments

Comments
 (0)