Skip to content

Commit

Permalink
feat(generation): update request builders and models
Browse files Browse the repository at this point in the history
Update generated files with build 165500
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Oct 1, 2024
1 parent e366cd6 commit 5e70b3f
Show file tree
Hide file tree
Showing 265 changed files with 7,262 additions and 1,274 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D

async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
"""
Delete a resourceConnection object.
Delete an operationalInsightsConnection object.
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/windowsupdates-resourceconnection-delete?view=graph-rest-beta
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-delete?view=graph-rest-beta
"""
request_info = self.to_delete_request_information(
request_configuration
Expand Down Expand Up @@ -94,7 +94,7 @@ async def patch(self,body: ResourceConnection, request_configuration: Optional[R

def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Delete a resourceConnection object.
Delete an operationalInsightsConnection object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D

async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
"""
Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
Delete an updatableAsset object.
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/windowsupdates-updatableassetgroup-delete?view=graph-rest-beta
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-delete?view=graph-rest-beta
"""
request_info = self.to_delete_request_information(
request_configuration
Expand All @@ -54,10 +54,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query

async def get(self,request_configuration: Optional[RequestConfiguration[UpdatableAssetItemRequestBuilderGetQueryParameters]] = None) -> Optional[UpdatableAsset]:
"""
Read the properties and relationships of an updatableAsset object.
Read the properties of an azureADDevice object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[UpdatableAsset]
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-get?view=graph-rest-beta
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-get?view=graph-rest-beta
"""
request_info = self.to_get_request_information(
request_configuration
Expand Down Expand Up @@ -98,7 +98,7 @@ async def patch(self,body: UpdatableAsset, request_configuration: Optional[Reque

def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
Delete an updatableAsset object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand All @@ -109,7 +109,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[UpdatableAssetItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Read the properties and relationships of an updatableAsset object.
Read the properties of an azureADDevice object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand Down Expand Up @@ -189,7 +189,7 @@ class UpdatableAssetItemRequestBuilderDeleteRequestConfiguration(RequestConfigur
@dataclass
class UpdatableAssetItemRequestBuilderGetQueryParameters():
"""
Read the properties and relationships of an updatableAsset object.
Read the properties of an azureADDevice object.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D

async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
"""
Delete a complianceChange object.
Delete a contentApproval object.
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/windowsupdates-compliancechange-delete?view=graph-rest-beta
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-delete?view=graph-rest-beta
"""
request_info = self.to_delete_request_information(
request_configuration
Expand All @@ -51,10 +51,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query

async def get(self,request_configuration: Optional[RequestConfiguration[ComplianceChangeItemRequestBuilderGetQueryParameters]] = None) -> Optional[ComplianceChange]:
"""
Read the properties and relationships of a complianceChange object.
Read the properties and relationships of a contentApproval object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[ComplianceChange]
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-get?view=graph-rest-beta
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-get?view=graph-rest-beta
"""
request_info = self.to_get_request_information(
request_configuration
Expand All @@ -72,11 +72,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Complian

async def patch(self,body: ComplianceChange, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ComplianceChange]:
"""
Update the properties of a contentApproval object.
Update the properties of a complianceChange object.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[ComplianceChange]
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-update?view=graph-rest-beta
Find more info here: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-update?view=graph-rest-beta
"""
if body is None:
raise TypeError("body cannot be null.")
Expand All @@ -96,7 +96,7 @@ async def patch(self,body: ComplianceChange, request_configuration: Optional[Req

def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Delete a complianceChange object.
Delete a contentApproval object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand All @@ -107,7 +107,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ComplianceChangeItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Read the properties and relationships of a complianceChange object.
Read the properties and relationships of a contentApproval object.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand All @@ -118,7 +118,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi

def to_patch_request_information(self,body: ComplianceChange, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Update the properties of a contentApproval object.
Update the properties of a complianceChange object.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
Expand Down Expand Up @@ -160,7 +160,7 @@ class ComplianceChangeItemRequestBuilderDeleteRequestConfiguration(RequestConfig
@dataclass
class ComplianceChangeItemRequestBuilderGetQueryParameters():
"""
Read the properties and relationships of a complianceChange object.
Read the properties and relationships of a contentApproval object.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
if TYPE_CHECKING:
from ....models.directory_object import DirectoryObject
from ....models.o_data_errors.o_data_error import ODataError
from .restore_post_request_body import RestorePostRequestBody

class RestoreRequestBuilder(BaseRequestBuilder):
"""
Expand All @@ -30,18 +29,15 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
"""
super().__init__(request_adapter, "{+baseurl}/administrativeUnits/{administrativeUnit%2Did}/restore", path_parameters)

async def post(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DirectoryObject]:
async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DirectoryObject]:
"""
Restore a recently deleted application, externalUserProfile, group, pendingExternalUserProfile, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This isn't applicable to security groups, which are deleted permanently. 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.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[DirectoryObject]
Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-beta
"""
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_post_request_information(
body, request_configuration
request_configuration
)
from ....models.o_data_errors.o_data_error import ODataError

Expand All @@ -54,19 +50,15 @@ async def post(self,body: RestorePostRequestBody, request_configuration: Optiona

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

def to_post_request_information(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Restore a recently deleted application, externalUserProfile, group, pendingExternalUserProfile, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This isn't applicable to security groups, which are deleted permanently. 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.
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.POST, 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) -> RestoreRequestBuilder:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D

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

def to_post_request_information(self,body: InvitePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Invite participants to the active call. For more information about how to handle operations, see commsOperation.
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.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
if TYPE_CHECKING:
from ....models.directory_object import DirectoryObject
from ....models.o_data_errors.o_data_error import ODataError
from .restore_post_request_body import RestorePostRequestBody

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

async def post(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DirectoryObject]:
async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DirectoryObject]:
"""
Restore a recently deleted application, externalUserProfile, group, pendingExternalUserProfile, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This isn't applicable to security groups, which are deleted permanently. 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.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[DirectoryObject]
Find more info here: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-beta
"""
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_post_request_information(
body, request_configuration
request_configuration
)
from ....models.o_data_errors.o_data_error import ODataError

Expand All @@ -54,19 +50,15 @@ async def post(self,body: RestorePostRequestBody, request_configuration: Optiona

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

def to_post_request_information(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Restore a recently deleted application, externalUserProfile, group, pendingExternalUserProfile, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This isn't applicable to security groups, which are deleted permanently. 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.
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.POST, 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) -> RestoreRequestBuilder:
Expand Down
Loading

0 comments on commit 5e70b3f

Please sign in to comment.