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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def by_application_template_id(self,application_template_id: str) -> Application

async def get(self,request_configuration: Optional[RequestConfiguration[ApplicationTemplatesRequestBuilderGetQueryParameters]] = None) -> Optional[ApplicationTemplateCollectionResponse]:
"""
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license.
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[ApplicationTemplateCollectionResponse]
Find more info here: https://learn.microsoft.com/graph/api/applicationtemplate-list?view=graph-rest-beta
Expand All @@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Applicat

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ApplicationTemplatesRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license.
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand Down Expand Up @@ -100,7 +100,7 @@ def count(self) -> CountRequestBuilder:
@dataclass
class ApplicationTemplatesRequestBuilderGetQueryParameters():
"""
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license.
Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. Details about optional risk properties such as riskScore and riskFactors are available with either the Microsoft Entra Suite or Microsoft Entra Internet Access license. If a risk property is included in the request without appropriate license, a @microsoft.graph.licenseRequired OData annotation is returned in the response.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def post(self,body: AcquireAccessTokenPostRequestBody, request_configurati
Returns: None
Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronization-acquireaccesstoken?view=graph-rest-beta
"""
warn("This action acquires an access token via Oauth Code Grant Flow. Code Grant will be completely deprecated so this action will be obsolete. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_post_request_information(
Expand All @@ -59,6 +60,7 @@ def to_post_request_information(self,body: AcquireAccessTokenPostRequestBody, re
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
warn("This action acquires an access token via Oauth Code Grant Flow. Code Grant will be completely deprecated so this action will be obsolete. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
Expand All @@ -73,6 +75,7 @@ def with_url(self,raw_url: str) -> AcquireAccessTokenRequestBuilder:
param raw_url: The raw URL to use for the request builder.
Returns: AcquireAccessTokenRequestBuilder
"""
warn("This action acquires an access token via Oauth Code Grant Flow. Code Grant will be completely deprecated so this action will be obsolete. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return AcquireAccessTokenRequestBuilder(self.request_adapter, raw_url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def post(self,body: ValidateCredentialsPostRequestBody, request_configurat
Returns: None
Find more info here: https://learn.microsoft.com/graph/api/synchronization-synchronizationjob-validatecredentials?view=graph-rest-beta
"""
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_post_request_information(
Expand All @@ -59,6 +60,7 @@ def to_post_request_information(self,body: ValidateCredentialsPostRequestBody, r
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
Expand All @@ -73,6 +75,7 @@ def with_url(self,raw_url: str) -> ValidateCredentialsRequestBuilder:
param raw_url: The raw URL to use for the request builder.
Returns: ValidateCredentialsRequestBuilder
"""
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return ValidateCredentialsRequestBuilder(self.request_adapter, raw_url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async def post(self,body: ValidateCredentialsPostRequestBody, request_configurat
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: None
"""
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_post_request_information(
Expand All @@ -58,6 +59,7 @@ def to_post_request_information(self,body: ValidateCredentialsPostRequestBody, r
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
Expand All @@ -72,6 +74,7 @@ def with_url(self,raw_url: str) -> ValidateCredentialsRequestBuilder:
param raw_url: The raw URL to use for the request builder.
Returns: ValidateCredentialsRequestBuilder
"""
warn("Use validateConnectivity instead. This action will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return ValidateCredentialsRequestBuilder(self.request_adapter, raw_url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[int]
"""
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
request_info = self.to_get_request_information(
request_configuration
)
Expand All @@ -53,6 +54,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
request_info.configure(request_configuration)
request_info.headers.try_add("Accept", "text/plain;q=0.9")
Expand All @@ -64,6 +66,7 @@ def with_url(self,raw_url: str) -> CountRequestBuilder:
param raw_url: The raw URL to use for the request builder.
Returns: CountRequestBuilder
"""
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return CountRequestBuilder(self.request_adapter, raw_url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ async def put(self,body: SecretsPutRequestBody, request_configuration: Optional[
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[SecretsPutResponse]
"""
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = self.to_put_request_information(
Expand All @@ -62,6 +63,7 @@ def to_put_request_information(self,body: SecretsPutRequestBody, request_configu
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if body is None:
raise TypeError("body cannot be null.")
request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters)
Expand All @@ -76,6 +78,7 @@ def with_url(self,raw_url: str) -> SecretsRequestBuilder:
param raw_url: The raw URL to use for the request builder.
Returns: SecretsRequestBuilder
"""
warn("Use connectivityParameters for oauth flows and scim endpoint connectivity. Use SynchronizationJobSettings for job-specific settings This property will be removed. as of 2026-02/SynchronizationSecret_Deprecation on 2026-02-06 and will be removed 2027-07-06", DeprecationWarning)
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return SecretsRequestBuilder(self.request_adapter, raw_url)
Expand Down
10 changes: 10 additions & 0 deletions msgraph_beta/generated/chats/item/chat_item_request_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from .send_activity_notification.send_activity_notification_request_builder import SendActivityNotificationRequestBuilder
from .start_migration.start_migration_request_builder import StartMigrationRequestBuilder
from .tabs.tabs_request_builder import TabsRequestBuilder
from .targeted_messages.targeted_messages_request_builder import TargetedMessagesRequestBuilder
from .unhide_for_user.unhide_for_user_request_builder import UnhideForUserRequestBuilder

class ChatItemRequestBuilder(BaseRequestBuilder):
Expand Down Expand Up @@ -292,6 +293,15 @@ def tabs(self) -> TabsRequestBuilder:

return TabsRequestBuilder(self.request_adapter, self.path_parameters)

@property
def targeted_messages(self) -> TargetedMessagesRequestBuilder:
"""
Provides operations to manage the targetedMessages property of the microsoft.graph.chat entity.
"""
from .targeted_messages.targeted_messages_request_builder import TargetedMessagesRequestBuilder

return TargetedMessagesRequestBuilder(self.request_adapter, self.path_parameters)

@property
def unhide_for_user(self) -> UnhideForUserRequestBuilder:
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
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

class CountRequestBuilder(BaseRequestBuilder):
"""
Provides operations to count the resources in the collection.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new CountRequestBuilder 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}/chats/{chat%2Did}/targetedMessages/$count{?%24filter,%24search}", path_parameters)

async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]:
"""
Get the number of the resource
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[int]
"""
request_info = self.to_get_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_primitive_async(request_info, "int", error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Get the number of the resource
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
request_info.configure(request_configuration)
request_info.headers.try_add("Accept", "text/plain;q=0.9")
return request_info

def with_url(self,raw_url: str) -> CountRequestBuilder:
"""
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: CountRequestBuilder
"""
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return CountRequestBuilder(self.request_adapter, raw_url)

@dataclass
class CountRequestBuilderGetQueryParameters():
"""
Get the number of the resource
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Maps the query parameters names to their encoded names for the URI template parsing.
param original_name: The original query parameter name in the class.
Returns: str
"""
if original_name is None:
raise TypeError("original_name cannot be null.")
if original_name == "filter":
return "%24filter"
if original_name == "search":
return "%24search"
return original_name

# Filter items by property values
filter: Optional[str] = None

# Search items by search phrases
search: Optional[str] = None


@dataclass
class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]):
"""
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
Loading