Skip to content

Commit

Permalink
Merge pull request #1063 from microsoftgraph/v1.0/pipelinebuild/176715
Browse files Browse the repository at this point in the history
Generated  models and request builders
  • Loading branch information
baywet authored Jan 15, 2025
2 parents 76191a6 + 90c21f0 commit 2f7ffe0
Show file tree
Hide file tree
Showing 13,439 changed files with 123,078 additions and 121,067 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 7 additions & 6 deletions msgraph/generated/admin/admin_request_builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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
Expand All @@ -9,7 +10,7 @@
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, Callable, Dict, List, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
Expand All @@ -26,7 +27,7 @@ class AdminRequestBuilder(BaseRequestBuilder):
"""
Provides operations to manage the admin singleton.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new AdminRequestBuilder and sets the default values.
param path_parameters: The raw url or the url-template parameters for the request.
Expand All @@ -46,7 +47,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[AdminReq
)
from ..models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand All @@ -69,7 +70,7 @@ async def patch(self,body: Admin, request_configuration: Optional[RequestConfigu
)
from ..models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand Down Expand Up @@ -188,10 +189,10 @@ def get_query_parameter(self,original_name: str) -> str:
return original_name

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

# Select properties to be returned
select: Optional[List[str]] = None
select: Optional[list[str]] = None


@dataclass
Expand Down
15 changes: 8 additions & 7 deletions msgraph/generated/admin/edge/edge_request_builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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
Expand All @@ -9,7 +10,7 @@
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, Callable, Dict, List, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
Expand All @@ -21,7 +22,7 @@ class EdgeRequestBuilder(BaseRequestBuilder):
"""
Provides operations to manage the edge property of the microsoft.graph.admin entity.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new EdgeRequestBuilder and sets the default values.
param path_parameters: The raw url or the url-template parameters for the request.
Expand All @@ -41,7 +42,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query
)
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand All @@ -59,7 +60,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[EdgeRequ
)
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand All @@ -82,7 +83,7 @@ async def patch(self,body: Edge, request_configuration: Optional[RequestConfigur
)
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand Down Expand Up @@ -174,10 +175,10 @@ def get_query_parameter(self,original_name: str) -> str:
return original_name

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

# Select properties to be returned
select: Optional[List[str]] = None
select: Optional[list[str]] = None


@dataclass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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
Expand All @@ -9,7 +10,7 @@
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, Callable, Dict, List, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
Expand All @@ -21,7 +22,7 @@ class InternetExplorerModeRequestBuilder(BaseRequestBuilder):
"""
Provides operations to manage the internetExplorerMode property of the microsoft.graph.edge entity.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new InternetExplorerModeRequestBuilder and sets the default values.
param path_parameters: The raw url or the url-template parameters for the request.
Expand All @@ -41,7 +42,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query
)
from ....models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand All @@ -59,7 +60,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Internet
)
from ....models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand All @@ -82,7 +83,7 @@ async def patch(self,body: InternetExplorerMode, request_configuration: Optional
)
from ....models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand Down Expand Up @@ -174,10 +175,10 @@ def get_query_parameter(self,original_name: str) -> str:
return original_name

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

# Select properties to be returned
select: Optional[List[str]] = None
select: Optional[list[str]] = None


@dataclass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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
Expand All @@ -9,7 +10,7 @@
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, Callable, Dict, List, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
Expand All @@ -19,7 +20,7 @@ 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:
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.
Expand All @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
)
from ......models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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
Expand All @@ -9,7 +10,7 @@
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, Callable, Dict, List, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
Expand All @@ -23,7 +24,7 @@ class BrowserSiteListItemRequestBuilder(BaseRequestBuilder):
"""
Provides operations to manage the siteLists property of the microsoft.graph.internetExplorerMode entity.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new BrowserSiteListItemRequestBuilder and sets the default values.
param path_parameters: The raw url or the url-template parameters for the request.
Expand All @@ -44,7 +45,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query
)
from ......models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand All @@ -63,7 +64,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[BrowserS
)
from ......models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand All @@ -87,7 +88,7 @@ async def patch(self,body: BrowserSiteList, request_configuration: Optional[Requ
)
from ......models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand Down Expand Up @@ -197,10 +198,10 @@ def get_query_parameter(self,original_name: str) -> str:
return original_name

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

# Select properties to be returned
select: Optional[List[str]] = None
select: Optional[list[str]] = None


@dataclass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
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, Callable, Dict, List, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union

if TYPE_CHECKING:
from .......models.browser_shared_cookie import BrowserSharedCookie
Expand All @@ -14,13 +15,13 @@ class PublishPostRequestBody(AdditionalDataHolder, BackedModel, Parsable):
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)
additional_data: dict[str, Any] = field(default_factory=dict)
# The revision property
revision: Optional[str] = None
# The sharedCookies property
shared_cookies: Optional[List[BrowserSharedCookie]] = None
shared_cookies: Optional[list[BrowserSharedCookie]] = None
# The sites property
sites: Optional[List[BrowserSite]] = None
sites: Optional[list[BrowserSite]] = None

@staticmethod
def create_from_discriminator_value(parse_node: ParseNode) -> PublishPostRequestBody:
Expand All @@ -33,18 +34,18 @@ def create_from_discriminator_value(parse_node: ParseNode) -> PublishPostRequest
raise TypeError("parse_node cannot be null.")
return PublishPostRequestBody()

def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
"""
The deserialization information for the current model
Returns: Dict[str, Callable[[ParseNode], None]]
Returns: dict[str, Callable[[ParseNode], None]]
"""
from .......models.browser_shared_cookie import BrowserSharedCookie
from .......models.browser_site import BrowserSite

from .......models.browser_shared_cookie import BrowserSharedCookie
from .......models.browser_site import BrowserSite

fields: Dict[str, Callable[[Any], None]] = {
fields: dict[str, Callable[[Any], None]] = {
"revision": lambda n : setattr(self, 'revision', n.get_str_value()),
"sharedCookies": lambda n : setattr(self, 'shared_cookies', n.get_collection_of_object_values(BrowserSharedCookie)),
"sites": lambda n : setattr(self, 'sites', n.get_collection_of_object_values(BrowserSite)),
Expand All @@ -59,9 +60,6 @@ def serialize(self,writer: SerializationWriter) -> None:
"""
if writer is None:
raise TypeError("writer cannot be null.")
from .......models.browser_shared_cookie import BrowserSharedCookie
from .......models.browser_site import BrowserSite

writer.write_str_value("revision", self.revision)
writer.write_collection_of_object_values("sharedCookies", self.shared_cookies)
writer.write_collection_of_object_values("sites", self.sites)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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
Expand All @@ -9,7 +10,7 @@
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, Callable, Dict, List, Optional, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union
from warnings import warn

if TYPE_CHECKING:
Expand All @@ -21,7 +22,7 @@ class PublishRequestBuilder(BaseRequestBuilder):
"""
Provides operations to call the publish method.
"""
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
"""
Instantiates a new PublishRequestBuilder and sets the default values.
param path_parameters: The raw url or the url-template parameters for the request.
Expand All @@ -44,7 +45,7 @@ async def post(self,body: PublishPostRequestBody, request_configuration: Optiona
)
from .......models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, type[ParsableFactory]] = {
error_mapping: dict[str, type[ParsableFactory]] = {
"XXX": ODataError,
}
if not self.request_adapter:
Expand Down
Loading

0 comments on commit 2f7ffe0

Please sign in to comment.