Skip to content
Closed
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
146 changes: 146 additions & 0 deletions msgraph/generated/kiota-dom-export.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion msgraph/generated/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "B2FA7ABF690E531FF817BF174D140C84D65DAFBDEC961456F9DF7C5784E7FC3924A73B0A460D7ED81C7410B436708443A6FE16075FB72AC2AA98FB1A7AE637E4",
"descriptionHash": "4A7676FDCEE3F1E69B32FDB0B878451D5F47293C7C1951863D16AF34DF176DFEC21F6F78BF87686D80E6CA242C16163E664975627C2AD62F8E982901C96A2A29",
"descriptionLocation": "../../msgraph-metadata/clean_v10_openapi/openapi.yaml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.29.0",
Expand Down
4 changes: 2 additions & 2 deletions msgraph/generated/models/application_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

@dataclass
class ApplicationTemplate(Entity, Parsable):
# The list of categories for the application. Supported values can be: Collaboration, Business Management, Consumer, Content management, CRM, Data services, Developer services, E-commerce, Education, ERP, Finance, Health, Human resources, IT infrastructure, Mail, Management, Marketing, Media, Productivity, Project management, Telecommunications, Tools, Travel, and Web design & hosting.
# The list of categories for the application. Supported values can be: Collaboration, Business Management, Consumer, Content management, CRM, Data services, Developer services, E-commerce, Education, ERP, Finance, Health, Human resources, IT infrastructure, Mail, Management, Marketing, Media, Productivity, Project management, Telecommunications, Tools, Travel, and Web design & hosting. Supports $filter (contains).
categories: Optional[list[str]] = None
# A description of the application.
description: Optional[str] = None
# The name of the application.
# The name of the application. Supports $filter (contains).
display_name: Optional[str] = None
# The home page URL of the application.
home_page_url: Optional[str] = None
Expand Down
2 changes: 1 addition & 1 deletion msgraph/generated/models/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Message(OutlookItem, Parsable):
to_recipients: Optional[list[Recipient]] = None
# The part of the body of the message that is unique to the current message. uniqueBody is not returned by default but can be retrieved for a given message by use of the ?$select=uniqueBody query. It can be in HTML or text format.
unique_body: Optional[ItemBody] = None
# The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame.
# The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame.NOTE: When using this URL to access a message from a mailbox with delegate permissions, both the signed-in user and the target mailbox must be in the same database region. For example, an error is returned when a user with a mailbox in the EUR (Europe) region attempts to access messages from a mailbox in the NAM (North America) region.
web_link: Optional[str] = None

@staticmethod
Expand Down
7 changes: 7 additions & 0 deletions msgraph/generated/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from .calendar_group import CalendarGroup
from .chat import Chat
from .cloud_clipboard_root import CloudClipboardRoot
from .cloud_p_c import CloudPC
from .contact import Contact
from .contact_folder import ContactFolder
from .custom_security_attribute_value import CustomSecurityAttributeValue
Expand Down Expand Up @@ -109,6 +110,8 @@ class User(DirectoryObject, Parsable):
city: Optional[str] = None
# The cloudClipboard property
cloud_clipboard: Optional[CloudClipboardRoot] = None
# The user's Cloud PCs. Read-only. Nullable.
cloud_p_cs: Optional[list[CloudPC]] = None
# The name of the company that the user is associated with. This property can be useful for describing the company that a guest comes from. The maximum length is 64 characters.Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values).
company_name: Optional[str] = None
# Sets whether consent was obtained for minors. Allowed values: null, Granted, Denied, and NotRequired. For more information, see legal age group property definitions. Returned only on $select. Supports $filter (eq, ne, not, and in).
Expand Down Expand Up @@ -358,6 +361,7 @@ def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
from .calendar_group import CalendarGroup
from .chat import Chat
from .cloud_clipboard_root import CloudClipboardRoot
from .cloud_p_c import CloudPC
from .contact import Contact
from .contact_folder import ContactFolder
from .custom_security_attribute_value import CustomSecurityAttributeValue
Expand Down Expand Up @@ -414,6 +418,7 @@ def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
from .calendar_group import CalendarGroup
from .chat import Chat
from .cloud_clipboard_root import CloudClipboardRoot
from .cloud_p_c import CloudPC
from .contact import Contact
from .contact_folder import ContactFolder
from .custom_security_attribute_value import CustomSecurityAttributeValue
Expand Down Expand Up @@ -480,6 +485,7 @@ def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
"chats": lambda n : setattr(self, 'chats', n.get_collection_of_object_values(Chat)),
"city": lambda n : setattr(self, 'city', n.get_str_value()),
"cloudClipboard": lambda n : setattr(self, 'cloud_clipboard', n.get_object_value(CloudClipboardRoot)),
"cloudPCs": lambda n : setattr(self, 'cloud_p_cs', n.get_collection_of_object_values(CloudPC)),
"companyName": lambda n : setattr(self, 'company_name', n.get_str_value()),
"consentProvidedForMinor": lambda n : setattr(self, 'consent_provided_for_minor', n.get_str_value()),
"contactFolders": lambda n : setattr(self, 'contact_folders', n.get_collection_of_object_values(ContactFolder)),
Expand Down Expand Up @@ -624,6 +630,7 @@ def serialize(self,writer: SerializationWriter) -> None:
writer.write_collection_of_object_values("chats", self.chats)
writer.write_str_value("city", self.city)
writer.write_object_value("cloudClipboard", self.cloud_clipboard)
writer.write_collection_of_object_values("cloudPCs", self.cloud_p_cs)
writer.write_str_value("companyName", self.company_name)
writer.write_str_value("consentProvidedForMinor", self.consent_provided_for_minor)
writer.write_collection_of_object_values("contactFolders", self.contact_folders)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
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.cloud_p_c import CloudPC
from ....models.cloud_p_c_collection_response import CloudPCCollectionResponse
from ....models.o_data_errors.o_data_error import ODataError
from .count.count_request_builder import CountRequestBuilder
from .item.cloud_p_c_item_request_builder import CloudPCItemRequestBuilder

class CloudPCsRequestBuilder(BaseRequestBuilder):
"""
Provides operations to manage the cloudPCs property of the microsoft.graph.user entity.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new CloudPCsRequestBuilder 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}/users/{user%2Did}/cloudPCs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)

def by_cloud_p_c_id(self,cloud_p_c_id: str) -> CloudPCItemRequestBuilder:
"""
Provides operations to manage the cloudPCs property of the microsoft.graph.user entity.
param cloud_p_c_id: The unique identifier of cloudPC
Returns: CloudPCItemRequestBuilder
"""
if cloud_p_c_id is None:
raise TypeError("cloud_p_c_id cannot be null.")
from .item.cloud_p_c_item_request_builder import CloudPCItemRequestBuilder

url_tpl_params = get_path_parameters(self.path_parameters)
url_tpl_params["cloudPC%2Did"] = cloud_p_c_id
return CloudPCItemRequestBuilder(self.request_adapter, url_tpl_params)

async def get(self,request_configuration: Optional[RequestConfiguration[CloudPCsRequestBuilderGetQueryParameters]] = None) -> Optional[CloudPCCollectionResponse]:
"""
The user's Cloud PCs. Read-only. Nullable.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[CloudPCCollectionResponse]
"""
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")
from ....models.cloud_p_c_collection_response import CloudPCCollectionResponse

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

async def post(self,body: CloudPC, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CloudPC]:
"""
Create new navigation property to cloudPCs for users
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[CloudPC]
"""
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")
from ....models.cloud_p_c import CloudPC

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

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CloudPCsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
The user's Cloud PCs. Read-only. Nullable.
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", "application/json")
return request_info

def to_post_request_information(self,body: CloudPC, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Create new navigation property to cloudPCs for users
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) -> CloudPCsRequestBuilder:
"""
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: CloudPCsRequestBuilder
"""
if raw_url is None:
raise TypeError("raw_url cannot be null.")
return CloudPCsRequestBuilder(self.request_adapter, raw_url)

@property
def count(self) -> CountRequestBuilder:
"""
Provides operations to count the resources in the collection.
"""
from .count.count_request_builder import CountRequestBuilder

return CountRequestBuilder(self.request_adapter, self.path_parameters)

@dataclass
class CloudPCsRequestBuilderGetQueryParameters():
"""
The user's Cloud PCs. Read-only. Nullable.
"""
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 == "count":
return "%24count"
if original_name == "expand":
return "%24expand"
if original_name == "filter":
return "%24filter"
if original_name == "orderby":
return "%24orderby"
if original_name == "search":
return "%24search"
if original_name == "select":
return "%24select"
if original_name == "skip":
return "%24skip"
if original_name == "top":
return "%24top"
return original_name

# Include count of items
count: Optional[bool] = None

# Expand related entities
expand: Optional[list[str]] = None

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

# Order items by property values
orderby: Optional[list[str]] = None

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

# 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


@dataclass
class CloudPCsRequestBuilderGetRequestConfiguration(RequestConfiguration[CloudPCsRequestBuilderGetQueryParameters]):
"""
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 CloudPCsRequestBuilderPostRequestConfiguration(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