Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Messages

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

def to_post_request_information(self,body: ChatMessage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Send a new chatMessage in the specified channel or a chat.
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.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
Expand Down
7 changes: 6 additions & 1 deletion msgraph/generated/contacts/contacts_request_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d
param request_adapter: The request adapter to use to execute the requests.
Returns: None
"""
super().__init__(request_adapter, "{+baseurl}/contacts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24top}", path_parameters)
super().__init__(request_adapter, "{+baseurl}/contacts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)

def by_org_contact_id(self,org_contact_id: str) -> OrgContactItemRequestBuilder:
"""
Expand Down Expand Up @@ -162,6 +162,8 @@ def get_query_parameter(self,original_name: str) -> str:
return "%24search"
if original_name == "select":
return "%24select"
if original_name == "skip":
return "%24skip"
if original_name == "top":
return "%24top"
return original_name
Expand All @@ -184,6 +186,9 @@ def get_query_parameter(self,original_name: str) -> str:
# Select properties to be returned
select: Optional[list[str]] = None

# Skip the first n items
skip: Optional[int] = None

# Show only the first n items
top: Optional[int] = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d
"""
super().__init__(request_adapter, "{+baseurl}/contacts/{orgContact%2Did}{?%24expand,%24select}", path_parameters)

async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
"""
Delete entity from contacts
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: None
"""
request_info = self.to_delete_request_information(
request_configuration
)
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)

async def get(self,request_configuration: Optional[RequestConfiguration[OrgContactItemRequestBuilderGetQueryParameters]] = None) -> Optional[OrgContact]:
"""
Get the properties and relationships of an organizational contact.
Expand All @@ -62,6 +80,40 @@ async def get(self,request_configuration: Optional[RequestConfiguration[OrgConta

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

async def patch(self,body: OrgContact, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[OrgContact]:
"""
Update entity in contacts
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[OrgContact]
"""
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_patch_request_information(
body, request_configuration
)
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
raise Exception("Http core is null")
from ...models.org_contact import OrgContact

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

def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Delete entity from contacts
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters)
request_info.configure(request_configuration)
request_info.headers.try_add("Accept", "application/json")
return request_info

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[OrgContactItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Get the properties and relationships of an organizational contact.
Expand All @@ -73,6 +125,21 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
request_info.headers.try_add("Accept", "application/json")
return request_info

def to_patch_request_information(self,body: OrgContact, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Update entity in contacts
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
if body is None:
raise TypeError("body cannot be null.")
request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters)
request_info.configure(request_configuration)
request_info.headers.try_add("Accept", "application/json")
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
return request_info

def with_url(self,raw_url: str) -> OrgContactItemRequestBuilder:
"""
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
Expand Down Expand Up @@ -182,6 +249,13 @@ def transitive_member_of(self) -> TransitiveMemberOfRequestBuilder:

return TransitiveMemberOfRequestBuilder(self.request_adapter, self.path_parameters)

@dataclass
class OrgContactItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
"""
Configuration for the request such as headers, query parameters, and middleware options.
"""
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)

@dataclass
class OrgContactItemRequestBuilderGetQueryParameters():
"""
Expand Down Expand Up @@ -215,4 +289,11 @@ class OrgContactItemRequestBuilderGetRequestConfiguration(RequestConfiguration[O
"""
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)

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


Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceAp
Read properties and relationships of the deviceAppManagement object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[DeviceAppManagement]
Find more info here: https://learn.microsoft.com/graph/api/intune-policyset-deviceappmanagement-get?view=graph-rest-1.0
Find more info here: https://learn.microsoft.com/graph/api/intune-apps-deviceappmanagement-get?view=graph-rest-1.0
"""
request_info = self.to_get_request_information(
request_configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query

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

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppPolicyItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Read properties and relationships of the windowsInformationProtection object.
Read properties and relationships of the managedAppConfiguration object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand Down Expand Up @@ -159,7 +159,7 @@ class ManagedAppPolicyItemRequestBuilderDeleteRequestConfiguration(RequestConfig
@dataclass
class ManagedAppPolicyItemRequestBuilderGetQueryParameters():
"""
Read properties and relationships of the windowsInformationProtection object.
Read properties and relationships of the managedAppConfiguration object.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def post(self,body: TargetAppsPostRequestBody, request_configuration: Opti
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: None
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-targetedmanagedappprotection-targetapps?view=graph-rest-1.0
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0
"""
if body is None:
raise TypeError("body cannot be null.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ def by_managed_app_policy_id(self,managed_app_policy_id: str) -> ManagedAppPolic

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

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppPoliciesRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
List properties and relationships of the managedAppProtection objects.
List properties and relationships of the managedAppConfiguration objects.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand Down Expand Up @@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder:
@dataclass
class ManagedAppPoliciesRequestBuilderGetQueryParameters():
"""
List properties and relationships of the managedAppProtection objects.
List properties and relationships of the managedAppConfiguration objects.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def post(self,body: TargetAppsPostRequestBody, request_configuration: Opti
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: None
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-targetedmanagedappprotection-targetapps?view=graph-rest-1.0
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0
"""
if body is None:
raise TypeError("body cannot be null.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def post(self,body: TargetAppsPostRequestBody, request_configuration: Opti
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: None
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-targetedmanagedappprotection-targetapps?view=graph-rest-1.0
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0
"""
if body is None:
raise TypeError("body cannot be null.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ def by_managed_app_registration_id(self,managed_app_registration_id: str) -> Man

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

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppRegistrationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
List properties and relationships of the iosManagedAppRegistration objects.
List properties and relationships of the androidManagedAppRegistration objects.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand Down Expand Up @@ -150,7 +150,7 @@ def get_user_ids_with_flagged_app_registration(self) -> GetUserIdsWithFlaggedApp
@dataclass
class ManagedAppRegistrationsRequestBuilderGetQueryParameters():
"""
List properties and relationships of the iosManagedAppRegistration objects.
List properties and relationships of the androidManagedAppRegistration objects.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query

async def get(self,request_configuration: Optional[RequestConfiguration[ManagedAppStatusItemRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedAppStatus]:
"""
Read properties and relationships of the managedAppStatusRaw object.
Read properties and relationships of the managedAppStatus object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[ManagedAppStatus]
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappstatusraw-get?view=graph-rest-1.0
Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappstatus-get?view=graph-rest-1.0
"""
request_info = self.to_get_request_information(
request_configuration
Expand Down Expand Up @@ -105,7 +105,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppStatusItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Read properties and relationships of the managedAppStatusRaw object.
Read properties and relationships of the managedAppStatus object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand Down Expand Up @@ -149,7 +149,7 @@ class ManagedAppStatusItemRequestBuilderDeleteRequestConfiguration(RequestConfig
@dataclass
class ManagedAppStatusItemRequestBuilderGetQueryParameters():
"""
Read properties and relationships of the managedAppStatusRaw object.
Read properties and relationships of the managedAppStatus object.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Loading