Skip to content

Commit 2ac7d3b

Browse files
authored
Merge pull request #241 from microsoftgraph/v1.0/pipelinebuild/117926
Generated models and request builders
2 parents acb82a8 + 998cb56 commit 2ac7d3b

11,405 files changed

Lines changed: 297803 additions & 341731 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎msgraph/generated/admin/admin_request_builder.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from __future__ import annotations
2-
from dataclasses import dataclass
2+
from dataclasses import dataclass, field
33
from kiota_abstractions.get_path_parameters import get_path_parameters
44
from kiota_abstractions.method import Method
55
from kiota_abstractions.request_adapter import RequestAdapter
@@ -27,10 +27,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni
2727
pathParameters: The raw url or the Url template parameters for the request.
2828
requestAdapter: The request adapter to use to execute the requests.
2929
"""
30-
if path_parameters is None:
31-
raise Exception("path_parameters cannot be undefined")
32-
if request_adapter is None:
33-
raise Exception("request_adapter cannot be undefined")
30+
if not path_parameters:
31+
raise TypeError("path_parameters cannot be null.")
32+
if not request_adapter:
33+
raise TypeError("request_adapter cannot be null.")
3434
# Url template to use to build the URL for the current request builder
3535
self.url_template: str = "{+baseurl}/admin{?%24select,%24expand}"
3636

@@ -68,8 +68,8 @@ async def patch(self,body: Optional[admin.Admin] = None, request_configuration:
6868
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options.
6969
Returns: Optional[admin.Admin]
7070
"""
71-
if body is None:
72-
raise Exception("body cannot be undefined")
71+
if not body:
72+
raise TypeError("body cannot be null.")
7373
request_info = self.to_patch_request_information(
7474
body, request_configuration
7575
)
@@ -111,8 +111,8 @@ def to_patch_request_information(self,body: Optional[admin.Admin] = None, reques
111111
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options.
112112
Returns: RequestInformation
113113
"""
114-
if body is None:
115-
raise Exception("body cannot be undefined")
114+
if not body:
115+
raise TypeError("body cannot be null.")
116116
request_info = RequestInformation()
117117
request_info.url_template = self.url_template
118118
request_info.path_parameters = self.path_parameters
@@ -163,8 +163,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str:
163163
originalName: The original query parameter name in the class.
164164
Returns: str
165165
"""
166-
if original_name is None:
167-
raise Exception("original_name cannot be undefined")
166+
if not original_name:
167+
raise TypeError("original_name cannot be null.")
168168
if original_name == "expand":
169169
return "%24expand"
170170
if original_name == "select":

‎msgraph/generated/admin/edge/edge_request_builder.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from __future__ import annotations
2-
from dataclasses import dataclass
2+
from dataclasses import dataclass, field
33
from kiota_abstractions.get_path_parameters import get_path_parameters
44
from kiota_abstractions.method import Method
55
from kiota_abstractions.request_adapter import RequestAdapter
@@ -25,10 +25,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni
2525
pathParameters: The raw url or the Url template parameters for the request.
2626
requestAdapter: The request adapter to use to execute the requests.
2727
"""
28-
if path_parameters is None:
29-
raise Exception("path_parameters cannot be undefined")
30-
if request_adapter is None:
31-
raise Exception("request_adapter cannot be undefined")
28+
if not path_parameters:
29+
raise TypeError("path_parameters cannot be null.")
30+
if not request_adapter:
31+
raise TypeError("request_adapter cannot be null.")
3232
# Url template to use to build the URL for the current request builder
3333
self.url_template: str = "{+baseurl}/admin/edge{?%24select,%24expand}"
3434

@@ -85,8 +85,8 @@ async def patch(self,body: Optional[edge.Edge] = None, request_configuration: Op
8585
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options.
8686
Returns: Optional[edge.Edge]
8787
"""
88-
if body is None:
89-
raise Exception("body cannot be undefined")
88+
if not body:
89+
raise TypeError("body cannot be null.")
9090
request_info = self.to_patch_request_information(
9191
body, request_configuration
9292
)
@@ -144,8 +144,8 @@ def to_patch_request_information(self,body: Optional[edge.Edge] = None, request_
144144
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options.
145145
Returns: RequestInformation
146146
"""
147-
if body is None:
148-
raise Exception("body cannot be undefined")
147+
if not body:
148+
raise TypeError("body cannot be null.")
149149
request_info = RequestInformation()
150150
request_info.url_template = self.url_template
151151
request_info.path_parameters = self.path_parameters
@@ -190,8 +190,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str:
190190
originalName: The original query parameter name in the class.
191191
Returns: str
192192
"""
193-
if original_name is None:
194-
raise Exception("original_name cannot be undefined")
193+
if not original_name:
194+
raise TypeError("original_name cannot be null.")
195195
if original_name == "expand":
196196
return "%24expand"
197197
if original_name == "select":

‎msgraph/generated/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from __future__ import annotations
2-
from dataclasses import dataclass
2+
from dataclasses import dataclass, field
33
from kiota_abstractions.get_path_parameters import get_path_parameters
44
from kiota_abstractions.method import Method
55
from kiota_abstractions.request_adapter import RequestAdapter
@@ -25,10 +25,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni
2525
pathParameters: The raw url or the Url template parameters for the request.
2626
requestAdapter: The request adapter to use to execute the requests.
2727
"""
28-
if path_parameters is None:
29-
raise Exception("path_parameters cannot be undefined")
30-
if request_adapter is None:
31-
raise Exception("request_adapter cannot be undefined")
28+
if not path_parameters:
29+
raise TypeError("path_parameters cannot be null.")
30+
if not request_adapter:
31+
raise TypeError("request_adapter cannot be null.")
3232
# Url template to use to build the URL for the current request builder
3333
self.url_template: str = "{+baseurl}/admin/edge/internetExplorerMode{?%24select,%24expand}"
3434

@@ -85,8 +85,8 @@ async def patch(self,body: Optional[internet_explorer_mode.InternetExplorerMode]
8585
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options.
8686
Returns: Optional[internet_explorer_mode.InternetExplorerMode]
8787
"""
88-
if body is None:
89-
raise Exception("body cannot be undefined")
88+
if not body:
89+
raise TypeError("body cannot be null.")
9090
request_info = self.to_patch_request_information(
9191
body, request_configuration
9292
)
@@ -144,8 +144,8 @@ def to_patch_request_information(self,body: Optional[internet_explorer_mode.Inte
144144
requestConfiguration: Configuration for the request such as headers, query parameters, and middleware options.
145145
Returns: RequestInformation
146146
"""
147-
if body is None:
148-
raise Exception("body cannot be undefined")
147+
if not body:
148+
raise TypeError("body cannot be null.")
149149
request_info = RequestInformation()
150150
request_info.url_template = self.url_template
151151
request_info.path_parameters = self.path_parameters
@@ -190,8 +190,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str:
190190
originalName: The original query parameter name in the class.
191191
Returns: str
192192
"""
193-
if original_name is None:
194-
raise Exception("original_name cannot be undefined")
193+
if not original_name:
194+
raise TypeError("original_name cannot be null.")
195195
if original_name == "expand":
196196
return "%24expand"
197197
if original_name == "select":

‎msgraph/generated/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from __future__ import annotations
2-
from dataclasses import dataclass
2+
from dataclasses import dataclass, field
33
from kiota_abstractions.get_path_parameters import get_path_parameters
44
from kiota_abstractions.method import Method
55
from kiota_abstractions.request_adapter import RequestAdapter
@@ -23,10 +23,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni
2323
pathParameters: The raw url or the Url template parameters for the request.
2424
requestAdapter: The request adapter to use to execute the requests.
2525
"""
26-
if path_parameters is None:
27-
raise Exception("path_parameters cannot be undefined")
28-
if request_adapter is None:
29-
raise Exception("request_adapter cannot be undefined")
26+
if not path_parameters:
27+
raise TypeError("path_parameters cannot be null.")
28+
if not request_adapter:
29+
raise TypeError("request_adapter cannot be null.")
3030
# Url template to use to build the URL for the current request builder
3131
self.url_template: str = "{+baseurl}/admin/edge/internetExplorerMode/siteLists/$count{?%24search,%24filter}"
3232

@@ -84,8 +84,8 @@ def get_query_parameter(self,original_name: Optional[str] = None) -> str:
8484
originalName: The original query parameter name in the class.
8585
Returns: str
8686
"""
87-
if original_name is None:
88-
raise Exception("original_name cannot be undefined")
87+
if not original_name:
88+
raise TypeError("original_name cannot be null.")
8989
if original_name == "filter":
9090
return "%24filter"
9191
if original_name == "search":

0 commit comments

Comments
 (0)