-
Notifications
You must be signed in to change notification settings - Fork 42
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 #3 from microsoftgraph/v1.0/pipelinebuild/93081
Update generated files with build 93081
- Loading branch information
Showing
182 changed files
with
811 additions
and
176 deletions.
There are no files selected for viewing
217 changes: 217 additions & 0 deletions
217
...ed/applications/item/extension_properties/item/extension_property_item_request_builder.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,217 @@ | ||
from __future__ import annotations | ||
from dataclasses import dataclass | ||
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.response_handler import ResponseHandler | ||
from kiota_abstractions.serialization import Parsable, ParsableFactory | ||
from typing import Any, Callable, Dict, List, Optional, Union | ||
|
||
from .....models import extension_property | ||
from .....models.o_data_errors import o_data_error | ||
|
||
class ExtensionPropertyItemRequestBuilder(): | ||
""" | ||
Provides operations to manage the extensionProperties property of the microsoft.graph.application entity. | ||
""" | ||
def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: | ||
""" | ||
Instantiates a new ExtensionPropertyItemRequestBuilder and sets the default values. | ||
Args: | ||
pathParameters: The raw url or the Url template parameters for the request. | ||
requestAdapter: The request adapter to use to execute the requests. | ||
""" | ||
if not path_parameters: | ||
raise Exception("path_parameters cannot be undefined") | ||
if not request_adapter: | ||
raise Exception("request_adapter cannot be undefined") | ||
# Url template to use to build the URL for the current request builder | ||
self.url_template: str = "{+baseurl}/applications/{application%2Did}/extensionProperties/{extensionProperty%2Did}{?%24select,%24expand}" | ||
|
||
url_tpl_params = get_path_parameters(path_parameters) | ||
self.path_parameters = url_tpl_params | ||
self.request_adapter = request_adapter | ||
|
||
def create_delete_request_information(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: | ||
""" | ||
Delete navigation property extensionProperties for applications | ||
Args: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
Returns: RequestInformation | ||
""" | ||
request_info = RequestInformation() | ||
request_info.url_template = self.url_template | ||
request_info.path_parameters = self.path_parameters | ||
request_info.http_method = Method.DELETE | ||
if request_configuration: | ||
request_info.add_request_headers(request_configuration.headers) | ||
request_info.add_request_options(request_configuration.options) | ||
return request_info | ||
|
||
def create_get_request_information(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: | ||
""" | ||
Read-only. Nullable. Supports $expand and $filter (eq and ne when counting empty collections and only with advanced query parameters). | ||
Args: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
Returns: RequestInformation | ||
""" | ||
request_info = RequestInformation() | ||
request_info.url_template = self.url_template | ||
request_info.path_parameters = self.path_parameters | ||
request_info.http_method = Method.GET | ||
request_info.headers["Accept"] = "application/json" | ||
if request_configuration: | ||
request_info.add_request_headers(request_configuration.headers) | ||
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) | ||
request_info.add_request_options(request_configuration.options) | ||
return request_info | ||
|
||
def create_patch_request_information(self,body: Optional[extension_property.ExtensionProperty] = None, request_configuration: Optional[ExtensionPropertyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: | ||
""" | ||
Update the navigation property extensionProperties in applications | ||
Args: | ||
body: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
Returns: RequestInformation | ||
""" | ||
if not body: | ||
raise Exception("body cannot be undefined") | ||
request_info = RequestInformation() | ||
request_info.url_template = self.url_template | ||
request_info.path_parameters = self.path_parameters | ||
request_info.http_method = Method.PATCH | ||
request_info.headers["Accept"] = "application/json" | ||
if request_configuration: | ||
request_info.add_request_headers(request_configuration.headers) | ||
request_info.add_request_options(request_configuration.options) | ||
request_info.set_content_from_parsable(self.request_adapter, "application/json", body) | ||
return request_info | ||
|
||
async def delete(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderDeleteRequestConfiguration] = None, response_handler: Optional[ResponseHandler] = None) -> None: | ||
""" | ||
Delete navigation property extensionProperties for applications | ||
Args: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
responseHandler: Response handler to use in place of the default response handling provided by the core service | ||
""" | ||
request_info = self.create_delete_request_information( | ||
request_configuration | ||
) | ||
error_mapping: Dict[str, ParsableFactory] = { | ||
"4XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
"5XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
} | ||
if not self.request_adapter: | ||
raise Exception("Http core is null") | ||
return await self.request_adapter.send_no_response_content_async(request_info, response_handler, error_mapping) | ||
|
||
async def get(self,request_configuration: Optional[ExtensionPropertyItemRequestBuilderGetRequestConfiguration] = None, response_handler: Optional[ResponseHandler] = None) -> Optional[extension_property.ExtensionProperty]: | ||
""" | ||
Read-only. Nullable. Supports $expand and $filter (eq and ne when counting empty collections and only with advanced query parameters). | ||
Args: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
responseHandler: Response handler to use in place of the default response handling provided by the core service | ||
Returns: Optional[extension_property.ExtensionProperty] | ||
""" | ||
request_info = self.create_get_request_information( | ||
request_configuration | ||
) | ||
error_mapping: Dict[str, ParsableFactory] = { | ||
"4XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
"5XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
} | ||
if not self.request_adapter: | ||
raise Exception("Http core is null") | ||
return await self.request_adapter.send_async(request_info, extension_property.ExtensionProperty, response_handler, error_mapping) | ||
|
||
async def patch(self,body: Optional[extension_property.ExtensionProperty] = None, request_configuration: Optional[ExtensionPropertyItemRequestBuilderPatchRequestConfiguration] = None, response_handler: Optional[ResponseHandler] = None) -> Optional[extension_property.ExtensionProperty]: | ||
""" | ||
Update the navigation property extensionProperties in applications | ||
Args: | ||
body: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
responseHandler: Response handler to use in place of the default response handling provided by the core service | ||
Returns: Optional[extension_property.ExtensionProperty] | ||
""" | ||
if not body: | ||
raise Exception("body cannot be undefined") | ||
request_info = self.create_patch_request_information( | ||
body, request_configuration | ||
) | ||
error_mapping: Dict[str, ParsableFactory] = { | ||
"4XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
"5XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
} | ||
if not self.request_adapter: | ||
raise Exception("Http core is null") | ||
return await self.request_adapter.send_async(request_info, extension_property.ExtensionProperty, response_handler, error_mapping) | ||
|
||
@dataclass | ||
class ExtensionPropertyItemRequestBuilderDeleteRequestConfiguration(): | ||
""" | ||
Configuration for the request such as headers, query parameters, and middleware options. | ||
""" | ||
# Request headers | ||
headers: Optional[Dict[str, str]] = None | ||
|
||
# Request options | ||
options: Optional[List[RequestOption]] = None | ||
|
||
|
||
@dataclass | ||
class ExtensionPropertyItemRequestBuilderGetQueryParameters(): | ||
""" | ||
Read-only. Nullable. Supports $expand and $filter (eq and ne when counting empty collections and only with advanced query parameters). | ||
""" | ||
# Expand related entities | ||
expand: Optional[List[str]] = None | ||
|
||
# Select properties to be returned | ||
select: Optional[List[str]] = None | ||
|
||
def get_query_parameter(self,original_name: Optional[str] = None) -> str: | ||
""" | ||
Maps the query parameters names to their encoded names for the URI template parsing. | ||
Args: | ||
originalName: The original query parameter name in the class. | ||
Returns: str | ||
""" | ||
if not original_name: | ||
raise Exception("original_name cannot be undefined") | ||
if original_name == "expand": | ||
return "%24expand" | ||
if original_name == "select": | ||
return "%24select" | ||
return original_name | ||
|
||
|
||
@dataclass | ||
class ExtensionPropertyItemRequestBuilderGetRequestConfiguration(): | ||
""" | ||
Configuration for the request such as headers, query parameters, and middleware options. | ||
""" | ||
# Request headers | ||
headers: Optional[Dict[str, str]] = None | ||
|
||
# Request options | ||
options: Optional[List[RequestOption]] = None | ||
|
||
# Request query parameters | ||
query_parameters: Optional[ExtensionPropertyItemRequestBuilder.ExtensionPropertyItemRequestBuilderGetQueryParameters] = None | ||
|
||
|
||
@dataclass | ||
class ExtensionPropertyItemRequestBuilderPatchRequestConfiguration(): | ||
""" | ||
Configuration for the request such as headers, query parameters, and middleware options. | ||
""" | ||
# Request headers | ||
headers: Optional[Dict[str, str]] = None | ||
|
||
# Request options | ||
options: Optional[List[RequestOption]] = None | ||
|
||
|
||
|
160 changes: 160 additions & 0 deletions
160
...anagement/access_packages/item/incompatible_groups/incompatible_groups_request_builder.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,160 @@ | ||
from __future__ import annotations | ||
from dataclasses import dataclass | ||
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.response_handler import ResponseHandler | ||
from kiota_abstractions.serialization import Parsable, ParsableFactory | ||
from typing import Any, Callable, Dict, List, Optional, Union | ||
|
||
from ......models import group_collection_response | ||
from ......models.o_data_errors import o_data_error | ||
from .count import count_request_builder | ||
from .ref import ref_request_builder | ||
|
||
class IncompatibleGroupsRequestBuilder(): | ||
""" | ||
Provides operations to manage the incompatibleGroups property of the microsoft.graph.accessPackage entity. | ||
""" | ||
def count(self) -> count_request_builder.CountRequestBuilder: | ||
""" | ||
Provides operations to count the resources in the collection. | ||
""" | ||
return count_request_builder.CountRequestBuilder(self.request_adapter, self.path_parameters) | ||
|
||
def ref(self) -> ref_request_builder.RefRequestBuilder: | ||
""" | ||
Provides operations to manage the collection of identityGovernance entities. | ||
""" | ||
return ref_request_builder.RefRequestBuilder(self.request_adapter, self.path_parameters) | ||
|
||
def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: | ||
""" | ||
Instantiates a new IncompatibleGroupsRequestBuilder and sets the default values. | ||
Args: | ||
pathParameters: The raw url or the Url template parameters for the request. | ||
requestAdapter: The request adapter to use to execute the requests. | ||
""" | ||
if not path_parameters: | ||
raise Exception("path_parameters cannot be undefined") | ||
if not request_adapter: | ||
raise Exception("request_adapter cannot be undefined") | ||
# Url template to use to build the URL for the current request builder | ||
self.url_template: str = "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}" | ||
|
||
url_tpl_params = get_path_parameters(path_parameters) | ||
self.path_parameters = url_tpl_params | ||
self.request_adapter = request_adapter | ||
|
||
def create_get_request_information(self,request_configuration: Optional[IncompatibleGroupsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: | ||
""" | ||
Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. | ||
Args: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
Returns: RequestInformation | ||
""" | ||
request_info = RequestInformation() | ||
request_info.url_template = self.url_template | ||
request_info.path_parameters = self.path_parameters | ||
request_info.http_method = Method.GET | ||
request_info.headers["Accept"] = "application/json" | ||
if request_configuration: | ||
request_info.add_request_headers(request_configuration.headers) | ||
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) | ||
request_info.add_request_options(request_configuration.options) | ||
return request_info | ||
|
||
async def get(self,request_configuration: Optional[IncompatibleGroupsRequestBuilderGetRequestConfiguration] = None, response_handler: Optional[ResponseHandler] = None) -> Optional[group_collection_response.GroupCollectionResponse]: | ||
""" | ||
Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. | ||
Args: | ||
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options. | ||
responseHandler: Response handler to use in place of the default response handling provided by the core service | ||
Returns: Optional[group_collection_response.GroupCollectionResponse] | ||
""" | ||
request_info = self.create_get_request_information( | ||
request_configuration | ||
) | ||
error_mapping: Dict[str, ParsableFactory] = { | ||
"4XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
"5XX": o_data_error.ODataError.get_from_discriminator_value(), | ||
} | ||
if not self.request_adapter: | ||
raise Exception("Http core is null") | ||
return await self.request_adapter.send_async(request_info, group_collection_response.GroupCollectionResponse, response_handler, error_mapping) | ||
|
||
@dataclass | ||
class IncompatibleGroupsRequestBuilderGetQueryParameters(): | ||
""" | ||
Retrieve a list of the group objects that have been marked as incompatible on an accessPackage. | ||
""" | ||
# 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 | ||
|
||
def get_query_parameter(self,original_name: Optional[str] = None) -> str: | ||
""" | ||
Maps the query parameters names to their encoded names for the URI template parsing. | ||
Args: | ||
originalName: The original query parameter name in the class. | ||
Returns: str | ||
""" | ||
if not original_name: | ||
raise Exception("original_name cannot be undefined") | ||
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 | ||
|
||
|
||
@dataclass | ||
class IncompatibleGroupsRequestBuilderGetRequestConfiguration(): | ||
""" | ||
Configuration for the request such as headers, query parameters, and middleware options. | ||
""" | ||
# Request headers | ||
headers: Optional[Dict[str, str]] = None | ||
|
||
# Request options | ||
options: Optional[List[RequestOption]] = None | ||
|
||
# Request query parameters | ||
query_parameters: Optional[IncompatibleGroupsRequestBuilder.IncompatibleGroupsRequestBuilderGetQueryParameters] = None | ||
|
||
|
||
|
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
Oops, something went wrong.