Skip to content
Merged
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 @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d

async def post(self,body: GetAvailableExtensionPropertiesPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[GetAvailableExtensionPropertiesPostResponse]:
"""
Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:
Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties:
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[GetAvailableExtensionPropertiesPostResponse]
Expand All @@ -57,7 +57,7 @@ async def post(self,body: GetAvailableExtensionPropertiesPostRequestBody, reques

def to_post_request_information(self,body: GetAvailableExtensionPropertiesPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:
Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties:
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 @@ -33,7 +33,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, d

async def post(self,body: AddKeyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[KeyCredential]:
"""
Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that dont have any existing valid certificates (no certificates have been added yet, or all certificates have expired), wont be able to use this service action. You can use the Update application operation to perform an update instead.
Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[KeyCredential]
Expand All @@ -57,7 +57,7 @@ async def post(self,body: AddKeyPostRequestBody, request_configuration: Optional

def to_post_request_information(self,body: AddKeyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that dont have any existing valid certificates (no certificates have been added yet, or all certificates have expired), wont be able to use this service action. You can use the Update application operation to perform an update instead.
Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead.
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
@@ -0,0 +1,50 @@
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass, field
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton
from typing import Any, Optional, TYPE_CHECKING, Union

@dataclass
class ConfirmCompromisedPostRequestBody(AdditionalDataHolder, BackedModel, Parsable):
# Stores model information.
backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False)

# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additional_data: dict[str, Any] = field(default_factory=dict)
# The requestIds property
request_ids: Optional[list[str]] = None

@staticmethod
def create_from_discriminator_value(parse_node: ParseNode) -> ConfirmCompromisedPostRequestBody:
"""
Creates a new instance of the appropriate class based on discriminator value
param parse_node: The parse node to use to read the discriminator value and create the object
Returns: ConfirmCompromisedPostRequestBody
"""
if parse_node is None:
raise TypeError("parse_node cannot be null.")
return ConfirmCompromisedPostRequestBody()

def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
"""
The deserialization information for the current model
Returns: dict[str, Callable[[ParseNode], None]]
"""
fields: dict[str, Callable[[Any], None]] = {
"requestIds": lambda n : setattr(self, 'request_ids', n.get_collection_of_primitive_values(str)),
}
return fields

def serialize(self,writer: SerializationWriter) -> None:
"""
Serializes information the current object
param writer: Serialization writer to use to serialize this model
Returns: None
"""
if writer is None:
raise TypeError("writer cannot be null.")
writer.write_collection_of_primitive_values("requestIds", self.request_ids)
writer.write_additional_data_value(self.additional_data)


Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass, field
from kiota_abstractions.base_request_builder import BaseRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from kiota_abstractions.default_query_parameters import QueryParameters
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.method import Method
from kiota_abstractions.request_adapter import RequestAdapter
from kiota_abstractions.request_information import RequestInformation
from kiota_abstractions.request_option import RequestOption
from kiota_abstractions.serialization import Parsable, ParsableFactory
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
from ....models.o_data_errors.o_data_error import ODataError
from .confirm_compromised_post_request_body import ConfirmCompromisedPostRequestBody

class ConfirmCompromisedRequestBuilder(BaseRequestBuilder):
"""
Provides operations to call the confirmCompromised method.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new ConfirmCompromisedRequestBuilder and sets the default values.
param path_parameters: The raw url or the url-template parameters for the request.
param request_adapter: The request adapter to use to execute the requests.
Returns: None
"""
super().__init__(request_adapter, "{+baseurl}/auditLogs/signIns/confirmCompromised", path_parameters)

async def post(self,body: ConfirmCompromisedPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
"""
Mark an event in the Microsoft Entra sign-in logs as risky. Events marked as risky by an admin are immediately flagged as high risk in Microsoft Entra ID Protection, overriding previous risk states. Admins can confirm that events flagged as risky by Microsoft Entra ID Protection are in fact risky. For details about investigating Identity Protection risks, see How to investigate risk.
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/signin-confirmcompromised?view=graph-rest-1.0
"""
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_post_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")
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)

def to_post_request_information(self,body: ConfirmCompromisedPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Mark an event in the Microsoft Entra sign-in logs as risky. Events marked as risky by an admin are immediately flagged as high risk in Microsoft Entra ID Protection, overriding previous risk states. Admins can confirm that events flagged as risky by Microsoft Entra ID Protection are in fact risky. For details about investigating Identity Protection risks, see How to investigate risk.
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) -> ConfirmCompromisedRequestBuilder:
"""
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
param raw_url: The raw URL to use for the request builder.
Returns: ConfirmCompromisedRequestBuilder
"""
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return ConfirmCompromisedRequestBuilder(self.request_adapter, raw_url)

@dataclass
class ConfirmCompromisedRequestBuilderPostRequestConfiguration(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
@@ -0,0 +1,50 @@
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass, field
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton
from typing import Any, Optional, TYPE_CHECKING, Union

@dataclass
class ConfirmSafePostRequestBody(AdditionalDataHolder, BackedModel, Parsable):
# Stores model information.
backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False)

# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additional_data: dict[str, Any] = field(default_factory=dict)
# The requestIds property
request_ids: Optional[list[str]] = None

@staticmethod
def create_from_discriminator_value(parse_node: ParseNode) -> ConfirmSafePostRequestBody:
"""
Creates a new instance of the appropriate class based on discriminator value
param parse_node: The parse node to use to read the discriminator value and create the object
Returns: ConfirmSafePostRequestBody
"""
if parse_node is None:
raise TypeError("parse_node cannot be null.")
return ConfirmSafePostRequestBody()

def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
"""
The deserialization information for the current model
Returns: dict[str, Callable[[ParseNode], None]]
"""
fields: dict[str, Callable[[Any], None]] = {
"requestIds": lambda n : setattr(self, 'request_ids', n.get_collection_of_primitive_values(str)),
}
return fields

def serialize(self,writer: SerializationWriter) -> None:
"""
Serializes information the current object
param writer: Serialization writer to use to serialize this model
Returns: None
"""
if writer is None:
raise TypeError("writer cannot be null.")
writer.write_collection_of_primitive_values("requestIds", self.request_ids)
writer.write_additional_data_value(self.additional_data)


Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass, field
from kiota_abstractions.base_request_builder import BaseRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from kiota_abstractions.default_query_parameters import QueryParameters
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.method import Method
from kiota_abstractions.request_adapter import RequestAdapter
from kiota_abstractions.request_information import RequestInformation
from kiota_abstractions.request_option import RequestOption
from kiota_abstractions.serialization import Parsable, ParsableFactory
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
from ....models.o_data_errors.o_data_error import ODataError
from .confirm_safe_post_request_body import ConfirmSafePostRequestBody

class ConfirmSafeRequestBuilder(BaseRequestBuilder):
"""
Provides operations to call the confirmSafe method.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new ConfirmSafeRequestBuilder and sets the default values.
param path_parameters: The raw url or the url-template parameters for the request.
param request_adapter: The request adapter to use to execute the requests.
Returns: None
"""
super().__init__(request_adapter, "{+baseurl}/auditLogs/signIns/confirmSafe", path_parameters)

async def post(self,body: ConfirmSafePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
"""
Mark an event in Microsoft Entra sign-in logs as safe. Admins can either mark the events flagged as risky by Microsoft Entra ID Protection as safe, or they can mark unflagged events as safe. For details about investigating Identity Protection risks, see How to investigate risk.
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/signin-confirmsafe?view=graph-rest-1.0
"""
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_post_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")
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)

def to_post_request_information(self,body: ConfirmSafePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Mark an event in Microsoft Entra sign-in logs as safe. Admins can either mark the events flagged as risky by Microsoft Entra ID Protection as safe, or they can mark unflagged events as safe. For details about investigating Identity Protection risks, see How to investigate risk.
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) -> ConfirmSafeRequestBuilder:
"""
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
param raw_url: The raw URL to use for the request builder.
Returns: ConfirmSafeRequestBuilder
"""
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return ConfirmSafeRequestBuilder(self.request_adapter, raw_url)

@dataclass
class ConfirmSafeRequestBuilderPostRequestConfiguration(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)


Loading