Skip to content

Commit 1bb7c9a

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Update generated files with build 140016
1 parent df2ba43 commit 1bb7c9a

679 files changed

Lines changed: 10041 additions & 2009 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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
from __future__ import annotations
2+
from dataclasses import dataclass, field
3+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
4+
from kiota_abstractions.base_request_configuration import RequestConfiguration
5+
from kiota_abstractions.get_path_parameters import get_path_parameters
6+
from kiota_abstractions.method import Method
7+
from kiota_abstractions.request_adapter import RequestAdapter
8+
from kiota_abstractions.request_information import RequestInformation
9+
from kiota_abstractions.request_option import RequestOption
10+
from kiota_abstractions.serialization import Parsable, ParsableFactory
11+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
12+
13+
if TYPE_CHECKING:
14+
from .......models.o_data_errors.o_data_error import ODataError
15+
from .......models.windows_updates.applicable_content import ApplicableContent
16+
from .......models.windows_updates.applicable_content_collection_response import ApplicableContentCollectionResponse
17+
from .count.count_request_builder import CountRequestBuilder
18+
from .item.applicable_content_catalog_entry_item_request_builder import ApplicableContentCatalogEntryItemRequestBuilder
19+
20+
class ApplicableContentRequestBuilder(BaseRequestBuilder):
21+
"""
22+
Provides operations to manage the applicableContent property of the microsoft.graph.windowsUpdates.deploymentAudience entity.
23+
"""
24+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
25+
"""
26+
Instantiates a new ApplicableContentRequestBuilder and sets the default values.
27+
param path_parameters: The raw url or the url-template parameters for the request.
28+
param request_adapter: The request adapter to use to execute the requests.
29+
Returns: None
30+
"""
31+
super().__init__(request_adapter, "{+baseurl}/admin/windows/updates/deploymentAudiences/{deploymentAudience%2Did}/applicableContent{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
32+
33+
def by_applicable_content_catalog_entry_id(self,applicable_content_catalog_entry_id: str) -> ApplicableContentCatalogEntryItemRequestBuilder:
34+
"""
35+
Provides operations to manage the applicableContent property of the microsoft.graph.windowsUpdates.deploymentAudience entity.
36+
param applicable_content_catalog_entry_id: The unique identifier of applicableContent
37+
Returns: ApplicableContentCatalogEntryItemRequestBuilder
38+
"""
39+
if not applicable_content_catalog_entry_id:
40+
raise TypeError("applicable_content_catalog_entry_id cannot be null.")
41+
from .item.applicable_content_catalog_entry_item_request_builder import ApplicableContentCatalogEntryItemRequestBuilder
42+
43+
url_tpl_params = get_path_parameters(self.path_parameters)
44+
url_tpl_params["applicableContent%2DcatalogEntryId"] = applicable_content_catalog_entry_id
45+
return ApplicableContentCatalogEntryItemRequestBuilder(self.request_adapter, url_tpl_params)
46+
47+
async def get(self,request_configuration: Optional[RequestConfiguration] = None) -> Optional[ApplicableContentCollectionResponse]:
48+
"""
49+
Content eligible to deploy to devices in the audience. Not nullable. Read-only.
50+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
51+
Returns: Optional[ApplicableContentCollectionResponse]
52+
"""
53+
request_info = self.to_get_request_information(
54+
request_configuration
55+
)
56+
from .......models.o_data_errors.o_data_error import ODataError
57+
58+
error_mapping: Dict[str, ParsableFactory] = {
59+
"XXX": ODataError,
60+
}
61+
if not self.request_adapter:
62+
raise Exception("Http core is null")
63+
from .......models.windows_updates.applicable_content_collection_response import ApplicableContentCollectionResponse
64+
65+
return await self.request_adapter.send_async(request_info, ApplicableContentCollectionResponse, error_mapping)
66+
67+
async def post(self,body: Optional[ApplicableContent] = None, request_configuration: Optional[RequestConfiguration] = None) -> Optional[ApplicableContent]:
68+
"""
69+
Create new navigation property to applicableContent for admin
70+
param body: The request body
71+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
72+
Returns: Optional[ApplicableContent]
73+
"""
74+
if not body:
75+
raise TypeError("body cannot be null.")
76+
request_info = self.to_post_request_information(
77+
body, request_configuration
78+
)
79+
from .......models.o_data_errors.o_data_error import ODataError
80+
81+
error_mapping: Dict[str, ParsableFactory] = {
82+
"XXX": ODataError,
83+
}
84+
if not self.request_adapter:
85+
raise Exception("Http core is null")
86+
from .......models.windows_updates.applicable_content import ApplicableContent
87+
88+
return await self.request_adapter.send_async(request_info, ApplicableContent, error_mapping)
89+
90+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
91+
"""
92+
Content eligible to deploy to devices in the audience. Not nullable. Read-only.
93+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
94+
Returns: RequestInformation
95+
"""
96+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
97+
request_info.configure(request_configuration)
98+
request_info.headers.try_add("Accept", "application/json")
99+
return request_info
100+
101+
def to_post_request_information(self,body: Optional[ApplicableContent] = None, request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
102+
"""
103+
Create new navigation property to applicableContent for admin
104+
param body: The request body
105+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
106+
Returns: RequestInformation
107+
"""
108+
if not body:
109+
raise TypeError("body cannot be null.")
110+
request_info = RequestInformation(Method.POST, '{+baseurl}/admin/windows/updates/deploymentAudiences/{deploymentAudience%2Did}/applicableContent', self.path_parameters)
111+
request_info.configure(request_configuration)
112+
request_info.headers.try_add("Accept", "application/json")
113+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
114+
return request_info
115+
116+
def with_url(self,raw_url: Optional[str] = None) -> ApplicableContentRequestBuilder:
117+
"""
118+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
119+
param raw_url: The raw URL to use for the request builder.
120+
Returns: ApplicableContentRequestBuilder
121+
"""
122+
if not raw_url:
123+
raise TypeError("raw_url cannot be null.")
124+
return ApplicableContentRequestBuilder(self.request_adapter, raw_url)
125+
126+
@property
127+
def count(self) -> CountRequestBuilder:
128+
"""
129+
Provides operations to count the resources in the collection.
130+
"""
131+
from .count.count_request_builder import CountRequestBuilder
132+
133+
return CountRequestBuilder(self.request_adapter, self.path_parameters)
134+
135+
@dataclass
136+
class ApplicableContentRequestBuilderGetQueryParameters():
137+
"""
138+
Content eligible to deploy to devices in the audience. Not nullable. Read-only.
139+
"""
140+
def get_query_parameter(self,original_name: Optional[str] = None) -> str:
141+
"""
142+
Maps the query parameters names to their encoded names for the URI template parsing.
143+
param original_name: The original query parameter name in the class.
144+
Returns: str
145+
"""
146+
if not original_name:
147+
raise TypeError("original_name cannot be null.")
148+
if original_name == "count":
149+
return "%24count"
150+
if original_name == "expand":
151+
return "%24expand"
152+
if original_name == "filter":
153+
return "%24filter"
154+
if original_name == "orderby":
155+
return "%24orderby"
156+
if original_name == "search":
157+
return "%24search"
158+
if original_name == "select":
159+
return "%24select"
160+
if original_name == "skip":
161+
return "%24skip"
162+
if original_name == "top":
163+
return "%24top"
164+
return original_name
165+
166+
# Include count of items
167+
count: Optional[bool] = None
168+
169+
# Expand related entities
170+
expand: Optional[List[str]] = None
171+
172+
# Filter items by property values
173+
filter: Optional[str] = None
174+
175+
# Order items by property values
176+
orderby: Optional[List[str]] = None
177+
178+
# Search items by search phrases
179+
search: Optional[str] = None
180+
181+
# Select properties to be returned
182+
select: Optional[List[str]] = None
183+
184+
# Skip the first n items
185+
skip: Optional[int] = None
186+
187+
# Show only the first n items
188+
top: Optional[int] = None
189+
190+
191+
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
from __future__ import annotations
2+
from dataclasses import dataclass, field
3+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
4+
from kiota_abstractions.base_request_configuration import RequestConfiguration
5+
from kiota_abstractions.get_path_parameters import get_path_parameters
6+
from kiota_abstractions.method import Method
7+
from kiota_abstractions.request_adapter import RequestAdapter
8+
from kiota_abstractions.request_information import RequestInformation
9+
from kiota_abstractions.request_option import RequestOption
10+
from kiota_abstractions.serialization import Parsable, ParsableFactory
11+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
12+
13+
if TYPE_CHECKING:
14+
from ........models.o_data_errors.o_data_error import ODataError
15+
16+
class CountRequestBuilder(BaseRequestBuilder):
17+
"""
18+
Provides operations to count the resources in the collection.
19+
"""
20+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
21+
"""
22+
Instantiates a new CountRequestBuilder and sets the default values.
23+
param path_parameters: The raw url or the url-template parameters for the request.
24+
param request_adapter: The request adapter to use to execute the requests.
25+
Returns: None
26+
"""
27+
super().__init__(request_adapter, "{+baseurl}/admin/windows/updates/deploymentAudiences/{deploymentAudience%2Did}/applicableContent/$count{?%24filter,%24search}", path_parameters)
28+
29+
async def get(self,request_configuration: Optional[RequestConfiguration] = None) -> Optional[int]:
30+
"""
31+
Get the number of the resource
32+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
33+
Returns: Optional[int]
34+
"""
35+
request_info = self.to_get_request_information(
36+
request_configuration
37+
)
38+
from ........models.o_data_errors.o_data_error import ODataError
39+
40+
error_mapping: Dict[str, ParsableFactory] = {
41+
"XXX": ODataError,
42+
}
43+
if not self.request_adapter:
44+
raise Exception("Http core is null")
45+
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
46+
47+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration] = None) -> RequestInformation:
48+
"""
49+
Get the number of the resource
50+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
51+
Returns: RequestInformation
52+
"""
53+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
54+
request_info.configure(request_configuration)
55+
request_info.headers.try_add("Accept", "text/plain;q=0.9")
56+
return request_info
57+
58+
def with_url(self,raw_url: Optional[str] = None) -> CountRequestBuilder:
59+
"""
60+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
61+
param raw_url: The raw URL to use for the request builder.
62+
Returns: CountRequestBuilder
63+
"""
64+
if not raw_url:
65+
raise TypeError("raw_url cannot be null.")
66+
return CountRequestBuilder(self.request_adapter, raw_url)
67+
68+
@dataclass
69+
class CountRequestBuilderGetQueryParameters():
70+
"""
71+
Get the number of the resource
72+
"""
73+
def get_query_parameter(self,original_name: Optional[str] = None) -> str:
74+
"""
75+
Maps the query parameters names to their encoded names for the URI template parsing.
76+
param original_name: The original query parameter name in the class.
77+
Returns: str
78+
"""
79+
if not original_name:
80+
raise TypeError("original_name cannot be null.")
81+
if original_name == "filter":
82+
return "%24filter"
83+
if original_name == "search":
84+
return "%24search"
85+
return original_name
86+
87+
# Filter items by property values
88+
filter: Optional[str] = None
89+
90+
# Search items by search phrases
91+
search: Optional[str] = None
92+
93+
94+

0 commit comments

Comments
 (0)