Skip to content

Commit

Permalink
Merge pull request #343 from microsoftgraph/beta/pipelinebuild/136169
Browse files Browse the repository at this point in the history
Generated beta models and request builders
  • Loading branch information
samwelkanda authored Feb 22, 2024
2 parents 5da6afa + 0322293 commit ff284fb
Show file tree
Hide file tree
Showing 13,416 changed files with 124,078 additions and 486,535 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations
from dataclasses import dataclass, field
from kiota_abstractions.base_request_builder import BaseRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.method import Method
from kiota_abstractions.request_adapter import RequestAdapter
Expand Down Expand Up @@ -43,7 +44,7 @@ def by_access_review_decision_id(self,access_review_decision_id: str) -> AccessR
url_tpl_params["accessReviewDecision%2Did"] = access_review_decision_id
return AccessReviewDecisionItemRequestBuilder(self.request_adapter, url_tpl_params)

async def get(self,request_configuration: Optional[AccessReviewDecisionsRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewDecisionCollectionResponse]:
async def get(self,request_configuration: Optional[RequestConfiguration] = None) -> Optional[AccessReviewDecisionCollectionResponse]:
"""
Get entities from accessReviewDecisions
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Expand All @@ -55,16 +56,15 @@ async def get(self,request_configuration: Optional[AccessReviewDecisionsRequestB
from ..models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
"XXX": ODataError,
}
if not self.request_adapter:
raise Exception("Http core is null")
from ..models.access_review_decision_collection_response import AccessReviewDecisionCollectionResponse

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

async def post(self,body: Optional[AccessReviewDecision] = None, request_configuration: Optional[AccessReviewDecisionsRequestBuilderPostRequestConfiguration] = None) -> Optional[AccessReviewDecision]:
async def post(self,body: Optional[AccessReviewDecision] = None, request_configuration: Optional[RequestConfiguration] = None) -> Optional[AccessReviewDecision]:
"""
Add new entity to accessReviewDecisions
param body: The request body
Expand All @@ -79,33 +79,26 @@ async def post(self,body: Optional[AccessReviewDecision] = None, request_configu
from ..models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
"XXX": ODataError,
}
if not self.request_adapter:
raise Exception("Http core is null")
from ..models.access_review_decision import AccessReviewDecision

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

def to_get_request_information(self,request_configuration: Optional[AccessReviewDecisionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
"""
Get entities from accessReviewDecisions
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
request_info = RequestInformation()
if request_configuration:
request_info.headers.add_all(request_configuration.headers)
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)
request_info.add_request_options(request_configuration.options)
request_info.url_template = self.url_template
request_info.path_parameters = self.path_parameters
request_info.http_method = Method.GET
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: Optional[AccessReviewDecision] = None, request_configuration: Optional[AccessReviewDecisionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation:
def to_post_request_information(self,body: Optional[AccessReviewDecision] = None, request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
"""
Add new entity to accessReviewDecisions
param body: The request body
Expand All @@ -114,13 +107,8 @@ def to_post_request_information(self,body: Optional[AccessReviewDecision] = None
"""
if not body:
raise TypeError("body cannot be null.")
request_info = RequestInformation()
if request_configuration:
request_info.headers.add_all(request_configuration.headers)
request_info.add_request_options(request_configuration.options)
request_info.url_template = self.url_template
request_info.path_parameters = self.path_parameters
request_info.http_method = Method.POST
request_info = RequestInformation(Method.POST, '{+baseurl}/accessReviewDecisions', 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
Expand Down Expand Up @@ -200,27 +188,4 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str:
top: Optional[int] = None


from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

@dataclass
class AccessReviewDecisionsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration):
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

"""
Configuration for the request such as headers, query parameters, and middleware options.
"""
# Request query parameters
query_parameters: Optional[AccessReviewDecisionsRequestBuilder.AccessReviewDecisionsRequestBuilderGetQueryParameters] = None


from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

@dataclass
class AccessReviewDecisionsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration):
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

"""
Configuration for the request such as headers, query parameters, and middleware options.
"""


Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations
from dataclasses import dataclass, field
from kiota_abstractions.base_request_builder import BaseRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.method import Method
from kiota_abstractions.request_adapter import RequestAdapter
Expand All @@ -25,7 +26,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
"""
super().__init__(request_adapter, "{+baseurl}/accessReviewDecisions/$count{?%24filter,%24search}", path_parameters)

async def get(self,request_configuration: Optional[CountRequestBuilderGetRequestConfiguration] = None) -> Optional[int]:
async def get(self,request_configuration: Optional[RequestConfiguration] = None) -> Optional[int]:
"""
Get the number of the resource
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Expand All @@ -37,27 +38,20 @@ async def get(self,request_configuration: Optional[CountRequestBuilderGetRequest
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
"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[CountRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration] = 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()
if request_configuration:
request_info.headers.add_all(request_configuration.headers)
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)
request_info.add_request_options(request_configuration.options)
request_info.url_template = self.url_template
request_info.path_parameters = self.path_parameters
request_info.http_method = Method.GET
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

Expand Down Expand Up @@ -97,17 +91,4 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str:
search: Optional[str] = None


from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

@dataclass
class CountRequestBuilderGetRequestConfiguration(BaseRequestConfiguration):
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

"""
Configuration for the request such as headers, query parameters, and middleware options.
"""
# Request query parameters
query_parameters: Optional[CountRequestBuilder.CountRequestBuilderGetQueryParameters] = None



Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations
from dataclasses import dataclass, field
from kiota_abstractions.base_request_builder import BaseRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.method import Method
from kiota_abstractions.request_adapter import RequestAdapter
Expand All @@ -26,7 +27,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D
"""
super().__init__(request_adapter, "{+baseurl}/accessReviewDecisions/{accessReviewDecision%2Did}{?%24expand,%24select}", path_parameters)

async def delete(self,request_configuration: Optional[AccessReviewDecisionItemRequestBuilderDeleteRequestConfiguration] = None) -> None:
async def delete(self,request_configuration: Optional[RequestConfiguration] = None) -> None:
"""
Delete entity from accessReviewDecisions
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Expand All @@ -38,14 +39,13 @@ async def delete(self,request_configuration: Optional[AccessReviewDecisionItemRe
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
"XXX": ODataError,
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)

async def get(self,request_configuration: Optional[AccessReviewDecisionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[AccessReviewDecision]:
async def get(self,request_configuration: Optional[RequestConfiguration] = None) -> Optional[AccessReviewDecision]:
"""
Get entity from accessReviewDecisions by key
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Expand All @@ -57,16 +57,15 @@ async def get(self,request_configuration: Optional[AccessReviewDecisionItemReque
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
"XXX": ODataError,
}
if not self.request_adapter:
raise Exception("Http core is null")
from ...models.access_review_decision import AccessReviewDecision

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

async def patch(self,body: Optional[AccessReviewDecision] = None, request_configuration: Optional[AccessReviewDecisionItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[AccessReviewDecision]:
async def patch(self,body: Optional[AccessReviewDecision] = None, request_configuration: Optional[RequestConfiguration] = None) -> Optional[AccessReviewDecision]:
"""
Update entity in accessReviewDecisions
param body: The request body
Expand All @@ -81,49 +80,37 @@ async def patch(self,body: Optional[AccessReviewDecision] = None, request_config
from ...models.o_data_errors.o_data_error import ODataError

error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
"XXX": ODataError,
}
if not self.request_adapter:
raise Exception("Http core is null")
from ...models.access_review_decision import AccessReviewDecision

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

def to_delete_request_information(self,request_configuration: Optional[AccessReviewDecisionItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation:
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
"""
Delete entity from accessReviewDecisions
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
request_info = RequestInformation()
if request_configuration:
request_info.headers.add_all(request_configuration.headers)
request_info.add_request_options(request_configuration.options)
request_info.url_template = self.url_template
request_info.path_parameters = self.path_parameters
request_info.http_method = Method.DELETE
request_info = RequestInformation(Method.DELETE, '{+baseurl}/accessReviewDecisions/{accessReviewDecision%2Did}', self.path_parameters)
request_info.configure(request_configuration)
request_info.headers.try_add("Accept", "application/json")
return request_info

def to_get_request_information(self,request_configuration: Optional[AccessReviewDecisionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
"""
Get entity from accessReviewDecisions by key
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
request_info = RequestInformation()
if request_configuration:
request_info.headers.add_all(request_configuration.headers)
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)
request_info.add_request_options(request_configuration.options)
request_info.url_template = self.url_template
request_info.path_parameters = self.path_parameters
request_info.http_method = Method.GET
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_patch_request_information(self,body: Optional[AccessReviewDecision] = None, request_configuration: Optional[AccessReviewDecisionItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation:
def to_patch_request_information(self,body: Optional[AccessReviewDecision] = None, request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
"""
Update entity in accessReviewDecisions
param body: The request body
Expand All @@ -132,13 +119,8 @@ def to_patch_request_information(self,body: Optional[AccessReviewDecision] = Non
"""
if not body:
raise TypeError("body cannot be null.")
request_info = RequestInformation()
if request_configuration:
request_info.headers.add_all(request_configuration.headers)
request_info.add_request_options(request_configuration.options)
request_info.url_template = self.url_template
request_info.path_parameters = self.path_parameters
request_info.http_method = Method.PATCH
request_info = RequestInformation(Method.PATCH, '{+baseurl}/accessReviewDecisions/{accessReviewDecision%2Did}', 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
Expand All @@ -153,16 +135,6 @@ def with_url(self,raw_url: Optional[str] = None) -> AccessReviewDecisionItemRequ
raise TypeError("raw_url cannot be null.")
return AccessReviewDecisionItemRequestBuilder(self.request_adapter, raw_url)

from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

@dataclass
class AccessReviewDecisionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration):
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

"""
Configuration for the request such as headers, query parameters, and middleware options.
"""

@dataclass
class AccessReviewDecisionItemRequestBuilderGetQueryParameters():
"""
Expand All @@ -189,27 +161,4 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str:
select: Optional[List[str]] = None


from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

@dataclass
class AccessReviewDecisionItemRequestBuilderGetRequestConfiguration(BaseRequestConfiguration):
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

"""
Configuration for the request such as headers, query parameters, and middleware options.
"""
# Request query parameters
query_parameters: Optional[AccessReviewDecisionItemRequestBuilder.AccessReviewDecisionItemRequestBuilderGetQueryParameters] = None


from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

@dataclass
class AccessReviewDecisionItemRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration):
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

"""
Configuration for the request such as headers, query parameters, and middleware options.
"""


Loading

0 comments on commit ff284fb

Please sign in to comment.