Skip to content

Commit 2d157c5

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Update generated files with build 120562
1 parent df56cae commit 2d157c5

File tree

119 files changed

+1685
-251
lines changed

Some content is hidden

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

119 files changed

+1685
-251
lines changed

msgraph/generated/agreements/item/file/file_request_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def delete(self,request_configuration: Optional[FileRequestBuilderDeleteRe
4949

5050
async def get(self,request_configuration: Optional[FileRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFile]:
5151
"""
52-
Retrieve the details of the default file for an agreement, including the language and version information. The file information is specified through the agreementFile object.
52+
Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the **Accept-Language** header.
5353
Args:
5454
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5555
Returns: Optional[AgreementFile]
@@ -112,7 +112,7 @@ def to_delete_request_information(self,request_configuration: Optional[FileReque
112112

113113
def to_get_request_information(self,request_configuration: Optional[FileRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
114114
"""
115-
Retrieve the details of the default file for an agreement, including the language and version information. The file information is specified through the agreementFile object.
115+
Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the **Accept-Language** header.
116116
Args:
117117
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
118118
Returns: RequestInformation
@@ -171,7 +171,7 @@ class FileRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration):
171171
@dataclass
172172
class FileRequestBuilderGetQueryParameters():
173173
"""
174-
Retrieve the details of the default file for an agreement, including the language and version information. The file information is specified through the agreementFile object.
174+
Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the **Accept-Language** header.
175175
"""
176176
def get_query_parameter(self,original_name: Optional[str] = None) -> str:
177177
"""

msgraph/generated/agreements/item/file/localizations/localizations_request_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def by_agreement_file_localization_id(self,agreement_file_localization_id: str)
4747

4848
async def get(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> Optional[AgreementFileLocalizationCollectionResponse]:
4949
"""
50-
The localized version of the terms of use agreement files attached to the agreement.
50+
Get a list of the default and localized agreement files.
5151
Args:
5252
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5353
Returns: Optional[AgreementFileLocalizationCollectionResponse]
@@ -94,7 +94,7 @@ async def post(self,body: Optional[AgreementFileLocalization] = None, request_co
9494

9595
def to_get_request_information(self,request_configuration: Optional[LocalizationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
9696
"""
97-
The localized version of the terms of use agreement files attached to the agreement.
97+
Get a list of the default and localized agreement files.
9898
Args:
9999
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
100100
Returns: RequestInformation
@@ -143,7 +143,7 @@ def count(self) -> CountRequestBuilder:
143143
@dataclass
144144
class LocalizationsRequestBuilderGetQueryParameters():
145145
"""
146-
The localized version of the terms of use agreement files attached to the agreement.
146+
Get a list of the default and localized agreement files.
147147
"""
148148
def get_query_parameter(self,original_name: Optional[str] = None) -> str:
149149
"""

msgraph/generated/applications/item/token_lifetime_policies/ref/ref_request_builder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni
3030

3131
async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> Optional[StringCollectionResponse]:
3232
"""
33-
List the tokenLifetimePolicy objects that are assigned to an application.
33+
List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application.
3434
Args:
3535
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
3636
Returns: Optional[StringCollectionResponse]
@@ -52,7 +52,7 @@ async def get(self,request_configuration: Optional[RefRequestBuilderGetRequestCo
5252

5353
async def post(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> None:
5454
"""
55-
Assign a tokenLifetimePolicy to an application.
55+
Assign a tokenLifetimePolicy to an application. You can have multiple tokenLifetimePolicy policies in a tenant but can assign only one tokenLifetimePolicy per application.
5656
Args:
5757
body: The request body
5858
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
@@ -74,7 +74,7 @@ async def post(self,body: Optional[ReferenceCreate] = None, request_configuratio
7474

7575
def to_get_request_information(self,request_configuration: Optional[RefRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
7676
"""
77-
List the tokenLifetimePolicy objects that are assigned to an application.
77+
List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application.
7878
Args:
7979
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
8080
Returns: RequestInformation
@@ -92,7 +92,7 @@ def to_get_request_information(self,request_configuration: Optional[RefRequestBu
9292

9393
def to_post_request_information(self,body: Optional[ReferenceCreate] = None, request_configuration: Optional[RefRequestBuilderPostRequestConfiguration] = None) -> RequestInformation:
9494
"""
95-
Assign a tokenLifetimePolicy to an application.
95+
Assign a tokenLifetimePolicy to an application. You can have multiple tokenLifetimePolicy policies in a tenant but can assign only one tokenLifetimePolicy per application.
9696
Args:
9797
body: The request body
9898
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
@@ -113,7 +113,7 @@ def to_post_request_information(self,body: Optional[ReferenceCreate] = None, req
113113
@dataclass
114114
class RefRequestBuilderGetQueryParameters():
115115
"""
116-
List the tokenLifetimePolicy objects that are assigned to an application.
116+
List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application.
117117
"""
118118
def get_query_parameter(self,original_name: Optional[str] = None) -> str:
119119
"""

msgraph/generated/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def by_token_lifetime_policy_id(self,token_lifetime_policy_id: str) -> TokenLife
4747

4848
async def get(self,request_configuration: Optional[TokenLifetimePoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[TokenLifetimePolicyCollectionResponse]:
4949
"""
50-
List the tokenLifetimePolicy objects that are assigned to an application.
50+
List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application.
5151
Args:
5252
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
5353
Returns: Optional[TokenLifetimePolicyCollectionResponse]
@@ -69,7 +69,7 @@ async def get(self,request_configuration: Optional[TokenLifetimePoliciesRequestB
6969

7070
def to_get_request_information(self,request_configuration: Optional[TokenLifetimePoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
7171
"""
72-
List the tokenLifetimePolicy objects that are assigned to an application.
72+
List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application.
7373
Args:
7474
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
7575
Returns: RequestInformation
@@ -106,7 +106,7 @@ def ref(self) -> RefRequestBuilder:
106106
@dataclass
107107
class TokenLifetimePoliciesRequestBuilderGetQueryParameters():
108108
"""
109-
List the tokenLifetimePolicy objects that are assigned to an application.
109+
List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application.
110110
"""
111111
def get_query_parameter(self,original_name: Optional[str] = None) -> str:
112112
"""
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
from __future__ import annotations
2+
from dataclasses import dataclass, field
3+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
4+
from kiota_abstractions.get_path_parameters import get_path_parameters
5+
from kiota_abstractions.method import Method
6+
from kiota_abstractions.request_adapter import RequestAdapter
7+
from kiota_abstractions.request_information import RequestInformation
8+
from kiota_abstractions.request_option import RequestOption
9+
from kiota_abstractions.response_handler import ResponseHandler
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.application import Application
15+
from ..models.o_data_errors.o_data_error import ODataError
16+
17+
class ApplicationsWithAppIdRequestBuilder(BaseRequestBuilder):
18+
"""
19+
Provides operations to manage the collection of application entities.
20+
"""
21+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, app_id: Optional[str] = None) -> None:
22+
"""
23+
Instantiates a new ApplicationsWithAppIdRequestBuilder and sets the default values.
24+
Args:
25+
app_id: Alternate key of application
26+
path_parameters: The raw url or the Url template parameters for the request.
27+
request_adapter: The request adapter to use to execute the requests.
28+
"""
29+
super().__init__(request_adapter, "{+baseurl}/applications(appId='{appId}'){?%24select,%24expand}", path_parameters)
30+
31+
async def delete(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderDeleteRequestConfiguration] = None) -> None:
32+
"""
33+
Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted.
34+
Args:
35+
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
36+
"""
37+
request_info = self.to_delete_request_information(
38+
request_configuration
39+
)
40+
from ..models.o_data_errors.o_data_error import ODataError
41+
42+
error_mapping: Dict[str, ParsableFactory] = {
43+
"4XX": ODataError,
44+
"5XX": ODataError,
45+
}
46+
if not self.request_adapter:
47+
raise Exception("Http core is null")
48+
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)
49+
50+
async def get(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderGetRequestConfiguration] = None) -> Optional[Application]:
51+
"""
52+
Get the properties and relationships of an application object.
53+
Args:
54+
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
55+
Returns: Optional[Application]
56+
"""
57+
request_info = self.to_get_request_information(
58+
request_configuration
59+
)
60+
from ..models.o_data_errors.o_data_error import ODataError
61+
62+
error_mapping: Dict[str, ParsableFactory] = {
63+
"4XX": ODataError,
64+
"5XX": ODataError,
65+
}
66+
if not self.request_adapter:
67+
raise Exception("Http core is null")
68+
from ..models.application import Application
69+
70+
return await self.request_adapter.send_async(request_info, Application, error_mapping)
71+
72+
async def patch(self,body: Optional[Application] = None, request_configuration: Optional[ApplicationsWithAppIdRequestBuilderPatchRequestConfiguration] = None) -> Optional[Application]:
73+
"""
74+
Update the properties of an application object.
75+
Args:
76+
body: The request body
77+
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
78+
Returns: Optional[Application]
79+
"""
80+
if not body:
81+
raise TypeError("body cannot be null.")
82+
request_info = self.to_patch_request_information(
83+
body, request_configuration
84+
)
85+
from ..models.o_data_errors.o_data_error import ODataError
86+
87+
error_mapping: Dict[str, ParsableFactory] = {
88+
"4XX": ODataError,
89+
"5XX": ODataError,
90+
}
91+
if not self.request_adapter:
92+
raise Exception("Http core is null")
93+
from ..models.application import Application
94+
95+
return await self.request_adapter.send_async(request_info, Application, error_mapping)
96+
97+
def to_delete_request_information(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation:
98+
"""
99+
Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted.
100+
Args:
101+
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
102+
Returns: RequestInformation
103+
"""
104+
request_info = RequestInformation()
105+
request_info.url_template = self.url_template
106+
request_info.path_parameters = self.path_parameters
107+
request_info.http_method = Method.DELETE
108+
if request_configuration:
109+
request_info.add_request_headers(request_configuration.headers)
110+
request_info.add_request_options(request_configuration.options)
111+
return request_info
112+
113+
def to_get_request_information(self,request_configuration: Optional[ApplicationsWithAppIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation:
114+
"""
115+
Get the properties and relationships of an application object.
116+
Args:
117+
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
118+
Returns: RequestInformation
119+
"""
120+
request_info = RequestInformation()
121+
request_info.url_template = self.url_template
122+
request_info.path_parameters = self.path_parameters
123+
request_info.http_method = Method.GET
124+
request_info.headers["Accept"] = ["application/json"]
125+
if request_configuration:
126+
request_info.add_request_headers(request_configuration.headers)
127+
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)
128+
request_info.add_request_options(request_configuration.options)
129+
return request_info
130+
131+
def to_patch_request_information(self,body: Optional[Application] = None, request_configuration: Optional[ApplicationsWithAppIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation:
132+
"""
133+
Update the properties of an application object.
134+
Args:
135+
body: The request body
136+
request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
137+
Returns: RequestInformation
138+
"""
139+
if not body:
140+
raise TypeError("body cannot be null.")
141+
request_info = RequestInformation()
142+
request_info.url_template = self.url_template
143+
request_info.path_parameters = self.path_parameters
144+
request_info.http_method = Method.PATCH
145+
request_info.headers["Accept"] = ["application/json"]
146+
if request_configuration:
147+
request_info.add_request_headers(request_configuration.headers)
148+
request_info.add_request_options(request_configuration.options)
149+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
150+
return request_info
151+
152+
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration
153+
154+
@dataclass
155+
class ApplicationsWithAppIdRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration):
156+
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration
157+
158+
"""
159+
Configuration for the request such as headers, query parameters, and middleware options.
160+
"""
161+
162+
@dataclass
163+
class ApplicationsWithAppIdRequestBuilderGetQueryParameters():
164+
"""
165+
Get the properties and relationships of an application object.
166+
"""
167+
def get_query_parameter(self,original_name: Optional[str] = None) -> str:
168+
"""
169+
Maps the query parameters names to their encoded names for the URI template parsing.
170+
Args:
171+
original_name: The original query parameter name in the class.
172+
Returns: str
173+
"""
174+
if not original_name:
175+
raise TypeError("original_name cannot be null.")
176+
if original_name == "expand":
177+
return "%24expand"
178+
if original_name == "select":
179+
return "%24select"
180+
return original_name
181+
182+
# Expand related entities
183+
expand: Optional[List[str]] = None
184+
185+
# Select properties to be returned
186+
select: Optional[List[str]] = None
187+
188+
189+
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration
190+
191+
@dataclass
192+
class ApplicationsWithAppIdRequestBuilderGetRequestConfiguration(BaseRequestConfiguration):
193+
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration
194+
195+
"""
196+
Configuration for the request such as headers, query parameters, and middleware options.
197+
"""
198+
# Request query parameters
199+
query_parameters: Optional[ApplicationsWithAppIdRequestBuilder.ApplicationsWithAppIdRequestBuilderGetQueryParameters] = None
200+
201+
202+
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration
203+
204+
@dataclass
205+
class ApplicationsWithAppIdRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration):
206+
from kiota_abstractions.base_request_configuration import BaseRequestConfiguration
207+
208+
"""
209+
Configuration for the request such as headers, query parameters, and middleware options.
210+
"""
211+
212+

0 commit comments

Comments
 (0)