-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #701 from microsoftgraph/beta/pipelinebuild/175190
Generated beta models and request builders
- Loading branch information
Showing
296 changed files
with
5,281 additions
and
2,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
msgraph_beta/generated/administrative_units/item/restore/restore_post_request_body.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
from __future__ import annotations | ||
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 | ||
|
||
@dataclass | ||
class RestorePostRequestBody(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 newUserPrincipalName property | ||
new_user_principal_name: Optional[str] = None | ||
|
||
@staticmethod | ||
def create_from_discriminator_value(parse_node: ParseNode) -> RestorePostRequestBody: | ||
""" | ||
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: RestorePostRequestBody | ||
""" | ||
if parse_node is None: | ||
raise TypeError("parse_node cannot be null.") | ||
return RestorePostRequestBody() | ||
|
||
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]] = { | ||
"newUserPrincipalName": lambda n : setattr(self, 'new_user_principal_name', n.get_str_value()), | ||
} | ||
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_str_value("newUserPrincipalName", self.new_user_principal_name) | ||
writer.write_additional_data_value(self.additional_data) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
msgraph_beta/generated/applications/item/restore/restore_post_request_body.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
from __future__ import annotations | ||
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 | ||
|
||
@dataclass | ||
class RestorePostRequestBody(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 newUserPrincipalName property | ||
new_user_principal_name: Optional[str] = None | ||
|
||
@staticmethod | ||
def create_from_discriminator_value(parse_node: ParseNode) -> RestorePostRequestBody: | ||
""" | ||
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: RestorePostRequestBody | ||
""" | ||
if parse_node is None: | ||
raise TypeError("parse_node cannot be null.") | ||
return RestorePostRequestBody() | ||
|
||
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]] = { | ||
"newUserPrincipalName": lambda n : setattr(self, 'new_user_principal_name', n.get_str_value()), | ||
} | ||
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_str_value("newUserPrincipalName", self.new_user_principal_name) | ||
writer.write_additional_data_value(self.additional_data) | ||
|
||
|
Oops, something went wrong.