Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated models and request builders #942

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def serialize(self,writer: SerializationWriter) -> None:
"""
if writer is None:
raise TypeError("writer cannot be null.")
from .......models.browser_shared_cookie import BrowserSharedCookie
from .......models.browser_site import BrowserSite

writer.write_str_value("revision", self.revision)
writer.write_collection_of_object_values("sharedCookies", self.shared_cookies)
writer.write_collection_of_object_values("sites", self.sites)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class InstantiatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable):
additional_data: Dict[str, Any] = field(default_factory=dict)
# The displayName property
display_name: Optional[str] = None
# The serviceManagementReference property
service_management_reference: Optional[str] = None

@staticmethod
def create_from_discriminator_value(parse_node: ParseNode) -> InstantiatePostRequestBody:
Expand All @@ -32,6 +34,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
"""
fields: Dict[str, Callable[[Any], None]] = {
"displayName": lambda n : setattr(self, 'display_name', n.get_str_value()),
"serviceManagementReference": lambda n : setattr(self, 'service_management_reference', n.get_str_value()),
}
return fields

Expand All @@ -44,6 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None:
if writer is None:
raise TypeError("writer cannot be null.")
writer.write_str_value("displayName", self.display_name)
writer.write_str_value("serviceManagementReference", self.service_management_reference)
writer.write_additional_data_value(self.additional_data)


Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D

async def post(self,body: InstantiatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ApplicationServicePrincipal]:
"""
Add an instance of an application from the Microsoft Entra application gallery into your directory. The application template with ID 8adf8e6e-67b2-4cf2-a259-e3dc5476c621 can be used to add a non-gallery app that you can configure different single-sign on (SSO) modes like SAML SSO and password-based SSO.
Add an instance of an application from the Microsoft Entra application gallery into your directory. For non-gallery apps, use an application template with one of the following IDs to configure different single sign-on (SSO) modes like SAML SSO and password-based SSO.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[ApplicationServicePrincipal]
Expand All @@ -56,7 +56,7 @@ async def post(self,body: InstantiatePostRequestBody, request_configuration: Opt

def to_post_request_information(self,body: InstantiatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
"""
Add an instance of an application from the Microsoft Entra application gallery into your directory. The application template with ID 8adf8e6e-67b2-4cf2-a259-e3dc5476c621 can be used to add a non-gallery app that you can configure different single-sign on (SSO) modes like SAML SSO and password-based SSO.
Add an instance of an application from the Microsoft Entra application gallery into your directory. For non-gallery apps, use an application template with one of the following IDs to configure different single sign-on (SSO) modes like SAML SSO and password-based SSO.
param body: The request body
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
3 changes: 3 additions & 0 deletions msgraph/generated/applications/delta/delta_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def serialize(self,writer: SerializationWriter) -> None:
if writer is None:
raise TypeError("writer cannot be null.")
super().serialize(writer)
from ...models.application import Application
from ...models.base_delta_function_response import BaseDeltaFunctionResponse

writer.write_collection_of_object_values("value", self.value)


Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D

async def get(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> Optional[DeltaGetResponse]:
"""
Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For details, see Using delta query.
Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: Optional[DeltaGetResponse]
Find more info here: https://learn.microsoft.com/graph/api/application-delta?view=graph-rest-1.0
Expand All @@ -52,7 +52,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeltaReq

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For details, see Using delta query.
Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
Returns: RequestInformation
"""
Expand All @@ -74,7 +74,7 @@ def with_url(self,raw_url: str) -> DeltaRequestBuilder:
@dataclass
class DeltaRequestBuilderGetQueryParameters():
"""
Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For details, see Using delta query.
Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.
"""
def get_query_parameter(self,original_name: str) -> str:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def serialize(self,writer: SerializationWriter) -> None:
if writer is None:
raise TypeError("writer cannot be null.")
super().serialize(writer)
from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
from ...models.extension_property import ExtensionProperty

writer.write_collection_of_object_values("value", self.value)


Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def serialize(self,writer: SerializationWriter) -> None:
if writer is None:
raise TypeError("writer cannot be null.")
super().serialize(writer)
from ...models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
from ...models.directory_object import DirectoryObject

writer.write_collection_of_object_values("value", self.value)


Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def serialize(self,writer: SerializationWriter) -> None:
"""
if writer is None:
raise TypeError("writer cannot be null.")
from ....models.key_credential import KeyCredential
from ....models.password_credential import PasswordCredential

writer.write_object_value("keyCredential", self.key_credential)
writer.write_object_value("passwordCredential", self.password_credential)
writer.write_str_value("proof", self.proof)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def serialize(self,writer: SerializationWriter) -> None:
"""
if writer is None:
raise TypeError("writer cannot be null.")
from ....models.password_credential import PasswordCredential

writer.write_object_value("passwordCredential", self.password_credential)
writer.write_additional_data_value(self.additional_data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq
}
if not self.request_adapter:
raise Exception("Http core is null")
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
return await self.request_adapter.send_primitive_async(request_info, int, error_mapping)

def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def serialize(self,writer: SerializationWriter) -> None:
if writer is None:
raise TypeError("writer cannot be null.")
super().serialize(writer)
from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse

writer.write_collection_of_primitive_values("value", self.value)


Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def serialize(self,writer: SerializationWriter) -> None:
if writer is None:
raise TypeError("writer cannot be null.")
super().serialize(writer)
from ....models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse

writer.write_collection_of_primitive_values("value", self.value)


Loading